Skip to main content
GET
/
v1
/
webhooks
/
{id}
/
logs
Get Webhook Delivery Logs
curl --request GET \
  --url https://api.example.com/v1/webhooks/{id}/logs \
  --header 'Authorization: <authorization>'
{
  "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

Authorization
string
required
Bearer token for authentication

Path Parameters

id
string (UUID)
required
Unique identifier of the webhook configuration

Query Parameters

limit
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"

Response

200 Success

count
integer
Number of log entries returned
logs
array
Array of delivery log entries
logs[].id
string (UUID)
Unique identifier for this log entry
logs[].eventId
string (UUID)
ID of the event that triggered this delivery
logs[].webhookId
string (UUID)
ID of the webhook endpoint
logs[].attemptNumber
integer
Delivery attempt number (1–6)
logs[].requestUrl
string
The URL the webhook was delivered to
logs[].requestHeaders
object
HTTP headers sent with the delivery, including X-Timestamp and X-Signature
logs[].requestBody
object
The webhook payload that was sent
logs[].responseStatus
integer | null
HTTP status code returned by your endpoint (null if the request failed to connect)
logs[].responseBody
string | null
Response body returned by your endpoint
logs[].errorMessage
string | null
Error message if delivery failed (e.g., connection timeout)
logs[].deliveryStatus
string
Delivery status: pending, processing, success, or failed
logs[].durationMs
integer | null
Response time in milliseconds (null if no response received)
logs[].createdAt
string (ISO 8601)
Timestamp of this delivery attempt
logs[].nextRetryAt
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"
}
  • GET /v1/webhooks/events - List all events
  • POST /v1/webhooks/events/{eventId}/retry - Retry a failed event delivery
  • GET /v1/webhooks/events/{eventId}/logs - View logs for a specific event