Skip to main content

Monitoring

Monitor webhook delivery status and troubleshoot failures.

Delivery Logs

Fetch recent delivery attempts:

curl "https://api.kula.ai/v1/webhooks/{id}/logs" \
-H "Authorization: Bearer your_api_token_here"

Response:

{
"logs": [
{
"id": "log_abc123",
"event": "application.created",
"event_id": "evt_xyz789",
"status": "delivered",
"response_code": 200,
"response_time_ms": 156,
"attempts": 1,
"created_at": "2025-01-15T10:30:00Z"
}
],
"pagination": {
"page": 1,
"total_pages": 5
}
}

Log Status

StatusDescription
pendingQueued or retrying
deliveredSuccessfully delivered
failedFailed after all retries

Log Retention

Delivery logs are kept for 30 days.

Log Fields

FieldDescription
eventEvent type
event_idUnique event identifier
statusDelivery status
response_codeHTTP response code
response_time_msResponse time in milliseconds
attemptsNumber of delivery attempts
response_bodyResponse body (on failure)

Filtering Logs

# Filter by status
curl "https://api.kula.ai/v1/webhooks/{id}/logs?status=failed"

# Filter by event type
curl "https://api.kula.ai/v1/webhooks/{id}/logs?event=application.created"

Troubleshooting

High Failure Rate

Check for:

  • Endpoint returning non-2xx status
  • Response timeout (> 10 seconds)
  • Invalid SSL certificate

Missing Events

Verify:

  • Endpoint is active (not disabled)
  • Event type is subscribed
  • No network issues

Endpoint Disabled

Check if auto-disabled due to failures:

curl "https://api.kula.ai/v1/webhooks/{id}" \
-H "Authorization: Bearer your_api_token_here"

Re-enable if needed:

curl -X POST "https://api.kula.ai/v1/webhooks/{id}/enable" \
-H "Authorization: Bearer your_api_token_here"