webhooks

Register Webhook

Register webhook callback URL for async job notifications.

Webhook Events:

  • job.completed - Job finished successfully
  • job.failed - Job encountered error
  • job.cancelled - Job was cancelled

Webhook Payload:

{
    "event": "job.completed",
    "job_id": "550e8400-e29b-41d4-a716-446655440000",
    "timestamp": "2025-01-08T12:00:25Z",
    "data": {
        "job_id": "550e8400-e29b-41d4-a716-446655440000",
        "status": "completed",
        "result": {...}
    }
}

Signature Verification:

  • HMAC-SHA256 signature in X-Bellator-Signature header
  • Format: sha256=<hex_signature>
  • Payload: JSON-serialized webhook payload (deterministic order)

Delivery Guarantees:

  • At-least-once delivery
  • Max 3 retry attempts with exponential backoff
  • 5 second initial retry delay, 15 second max delay
  • Target delivery: <5 seconds after job completion

Best Practices:

  • Return 2xx status code quickly (<1 second)
  • Process webhook payload asynchronously
  • Verify signature if secret provided
  • Implement idempotency using job_id
post/api/v1/webhooks/register

Request

  • Base URL: https://api.bellatorsi.com (the document declares no server; this is the origin it was published from)
  • URL: https://api.bellatorsi.com/api/v1/webhooks/register
  • Auth: none declared

Headers

x-api-keystring nullable
authorizationstring nullable
x-bellator-internal-dispatchstring nullable

Request body

urlstring uri required

Webhook callback URL

eventsstring[]

Events to trigger webhook

secretstring nullable

Shared secret for webhook signature validation

Example request

{
  "events": [
    "job.completed",
    "job.failed"
  ],
  "secret": "whsec_abc123",
  "url": "https://customer.example.com/webhooks/bellator"
}

Response

Success - Webhook registered

object required

Changes

No recorded changes to this operation across all 1 revision of this API.