Get Webhook Delivery Logs
curl --request GET \
--url https://api.example.com/v1/webhooks/{id}/logs \
--header 'Authorization: <authorization>'import requests
url = "https://api.example.com/v1/webhooks/{id}/logs"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.example.com/v1/webhooks/{id}/logs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/webhooks/{id}/logs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/webhooks/{id}/logs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/webhooks/{id}/logs")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/webhooks/{id}/logs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"count": 2,
"logs": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"eventId": "660e8400-e29b-41d4-a716-446655440001",
"webhookId": "770e8400-e29b-41d4-a716-446655440002",
"attemptNumber": 1,
"requestUrl": "https://api.partner.com/webhooks/kyc",
"requestHeaders": {
"Content-Type": "application/json",
"X-Timestamp": "1704067200",
"X-Signature": "abc123def456..."
},
"requestBody": {
"eventType": "kyc.status.changed",
"userId": "user-123",
"status": "approved"
},
"responseStatus": 200,
"responseBody": "{\"received\": true}",
"errorMessage": null,
"deliveryStatus": "success",
"durationMs": 145,
"createdAt": "2025-12-29T10:00:00.000Z",
"nextRetryAt": null
},
{
"id": "551e8400-e29b-41d4-a716-446655440001",
"eventId": "661e8400-e29b-41d4-a716-446655440002",
"webhookId": "770e8400-e29b-41d4-a716-446655440002",
"attemptNumber": 1,
"requestUrl": "https://api.partner.com/webhooks/kyc",
"requestHeaders": {
"Content-Type": "application/json",
"X-Timestamp": "1704067500",
"X-Signature": "xyz789..."
},
"requestBody": {
"eventType": "card.activated",
"userId": "user-456"
},
"responseStatus": 500,
"responseBody": "Internal Server Error",
"errorMessage": null,
"deliveryStatus": "failed",
"durationMs": 312,
"createdAt": "2025-12-29T10:05:00.000Z",
"nextRetryAt": "2025-12-29T10:05:01.000Z"
}
]
}
Webhooks
Get Webhook Delivery Logs
Retrieve delivery logs for a specific webhook endpoint
GET
/
v1
/
webhooks
/
{id}
/
logs
Get Webhook Delivery Logs
curl --request GET \
--url https://api.example.com/v1/webhooks/{id}/logs \
--header 'Authorization: <authorization>'import requests
url = "https://api.example.com/v1/webhooks/{id}/logs"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.example.com/v1/webhooks/{id}/logs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/webhooks/{id}/logs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/webhooks/{id}/logs"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/webhooks/{id}/logs")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/webhooks/{id}/logs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"count": 2,
"logs": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"eventId": "660e8400-e29b-41d4-a716-446655440001",
"webhookId": "770e8400-e29b-41d4-a716-446655440002",
"attemptNumber": 1,
"requestUrl": "https://api.partner.com/webhooks/kyc",
"requestHeaders": {
"Content-Type": "application/json",
"X-Timestamp": "1704067200",
"X-Signature": "abc123def456..."
},
"requestBody": {
"eventType": "kyc.status.changed",
"userId": "user-123",
"status": "approved"
},
"responseStatus": 200,
"responseBody": "{\"received\": true}",
"errorMessage": null,
"deliveryStatus": "success",
"durationMs": 145,
"createdAt": "2025-12-29T10:00:00.000Z",
"nextRetryAt": null
},
{
"id": "551e8400-e29b-41d4-a716-446655440001",
"eventId": "661e8400-e29b-41d4-a716-446655440002",
"webhookId": "770e8400-e29b-41d4-a716-446655440002",
"attemptNumber": 1,
"requestUrl": "https://api.partner.com/webhooks/kyc",
"requestHeaders": {
"Content-Type": "application/json",
"X-Timestamp": "1704067500",
"X-Signature": "xyz789..."
},
"requestBody": {
"eventType": "card.activated",
"userId": "user-456"
},
"responseStatus": 500,
"responseBody": "Internal Server Error",
"errorMessage": null,
"deliveryStatus": "failed",
"durationMs": 312,
"createdAt": "2025-12-29T10:05:00.000Z",
"nextRetryAt": "2025-12-29T10:05:01.000Z"
}
]
}
Get Webhook Delivery Logs
GET https://api.baanx.com/v1/webhooks/{id}/logs Retrieves delivery logs for a specific webhook endpoint.Overview
Returns recent delivery attempts for a webhook endpoint, including HTTP status codes, response bodies, error messages, and response times. Useful for monitoring delivery health and debugging failures.Log retention: Delivery logs are kept for 7 days. Both successful and failed delivery attempts are included.
Authentication
This endpoint requires authentication via Bearer token:Authorization: Bearer YOUR_ACCESS_TOKEN
Request
Headers
string
required
Bearer token for authentication
Path Parameters
string (UUID)
required
Unique identifier of the webhook configuration
Query Parameters
integer
default:50
Maximum number of log entries to return. Range: 1–100.
Request Example
curl -X GET "https://api.baanx.com/v1/webhooks/550e8400-e29b-41d4-a716-446655440000/logs?limit=25" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
const webhookId = '550e8400-e29b-41d4-a716-446655440000';
const response = await fetch(
`https://api.baanx.com/v1/webhooks/${webhookId}/logs?limit=25`,
{
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
}
}
);
const data = await response.json();
console.log(data);
import requests
webhook_id = "550e8400-e29b-41d4-a716-446655440000"
url = f"https://api.baanx.com/v1/webhooks/{webhook_id}/logs"
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
}
params = {"limit": 25}
response = requests.get(url, headers=headers, params=params)
print(response.json())
const getWebhookLogs = async (webhookId: string, limit = 50) => {
const url = new URL(`https://api.baanx.com/v1/webhooks/${webhookId}/logs`);
url.searchParams.set('limit', String(limit));
const response = await fetch(url.toString(), {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
}
});
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
return await response.json();
};
Response
200 Success
integer
Number of log entries returned
array
Array of delivery log entries
string (UUID)
Unique identifier for this log entry
string (UUID)
ID of the event that triggered this delivery
string (UUID)
ID of the webhook endpoint
integer
Delivery attempt number (1–6)
string
The URL the webhook was delivered to
object
HTTP headers sent with the delivery, including
X-Timestamp and X-Signatureobject
The webhook payload that was sent
integer | null
HTTP status code returned by your endpoint (
null if the request failed to connect)string | null
Response body returned by your endpoint
string | null
Error message if delivery failed (e.g., connection timeout)
string
Delivery status:
pending, processing, success, or failedinteger | null
Response time in milliseconds (
null if no response received)string (ISO 8601)
Timestamp of this delivery attempt
string (ISO 8601) | null
Scheduled time for next retry attempt, if applicable
{
"count": 2,
"logs": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"eventId": "660e8400-e29b-41d4-a716-446655440001",
"webhookId": "770e8400-e29b-41d4-a716-446655440002",
"attemptNumber": 1,
"requestUrl": "https://api.partner.com/webhooks/kyc",
"requestHeaders": {
"Content-Type": "application/json",
"X-Timestamp": "1704067200",
"X-Signature": "abc123def456..."
},
"requestBody": {
"eventType": "kyc.status.changed",
"userId": "user-123",
"status": "approved"
},
"responseStatus": 200,
"responseBody": "{\"received\": true}",
"errorMessage": null,
"deliveryStatus": "success",
"durationMs": 145,
"createdAt": "2025-12-29T10:00:00.000Z",
"nextRetryAt": null
},
{
"id": "551e8400-e29b-41d4-a716-446655440001",
"eventId": "661e8400-e29b-41d4-a716-446655440002",
"webhookId": "770e8400-e29b-41d4-a716-446655440002",
"attemptNumber": 1,
"requestUrl": "https://api.partner.com/webhooks/kyc",
"requestHeaders": {
"Content-Type": "application/json",
"X-Timestamp": "1704067500",
"X-Signature": "xyz789..."
},
"requestBody": {
"eventType": "card.activated",
"userId": "user-456"
},
"responseStatus": 500,
"responseBody": "Internal Server Error",
"errorMessage": null,
"deliveryStatus": "failed",
"durationMs": 312,
"createdAt": "2025-12-29T10:05:00.000Z",
"nextRetryAt": "2025-12-29T10:05:01.000Z"
}
]
}
Error Responses
{
"message": "Not authenticated"
}
{
"message": "Not authorized"
}
{
"message": "Webhook config not found"
}
{
"message": "Notification service is not configured for this environment"
}
Related Endpoints
GET /v1/webhooks/events- List all eventsPOST /v1/webhooks/events/{eventId}/retry- Retry a failed event deliveryGET /v1/webhooks/events/{eventId}/logs- View logs for a specific event
Was this page helpful?