Webhooks

Register, list, and delete webhook endpoints.

Webhook endpoints receive signed payout events. For the delivery model, signature verification, and best practices, see the Webhooks guide; for each event's payload, see Webhook events.

Create an endpoint

POST /v1/webhooks — Scope: webhooks:write

Registers an HTTPS endpoint and subscribes it to events. The response includes the signing secret, returned once — store it to verify deliveries.

Body parameters

FieldTypeRequiredDescription
urlstringYesYour endpoint. Must be https:// with a host.
eventsstring[]YesAt least one event. Each must be one of the known events (below).

Subscribable events

  • payout.created
  • payout.processing
  • payout.completed
  • payout.failed
  • payout.blocked

Request

bash
curl https://api.caiboglobal.com/v1/webhooks \
  -H "X-API-Key: $CAIBO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://api.example.com/caibo/webhook",
    "events": ["payout.completed", "payout.failed", "payout.blocked"]
  }'

Response — 201 Created

json
{
  "id": "whe_1a2b3c4d",
  "object": "webhook_endpoint",
  "url": "https://api.example.com/caibo/webhook",
  "events": ["payout.completed", "payout.failed", "payout.blocked"],
  "active": true,
  "secret": "whsec_9f8e7d6c5b4a3f2e1d0c9b8a7f6e5d4c",
  "created_at": "2026-07-23T14:03:00Z"
}
The secret is shown only in this response. Store it securely — you can't retrieve it again. If it's lost or leaked, delete the endpoint and create a new one.

Errors

HTTPtypecodeWhen
400invalid_request_errorbad_requestA non-https or malformed url, no events, or an unknown event name.
401authentication_errorapi_key_missing / api_key_invalidNo key, or an unknown/revoked key.
403permission_errorscope_insufficientThe key lacks webhooks:write.
429rate_limit_errorrate_limitedToo many requests.

List endpoints

GET /v1/webhooks — Scope: webhooks:read

Returns your registered endpoints. The signing secret is never returned on list.

bash
curl https://api.caiboglobal.com/v1/webhooks \
  -H "X-API-Key: $CAIBO_API_KEY"

Response — 200 OK

json
{
  "object": "list",
  "data": [
    {
      "id": "whe_1a2b3c4d",
      "object": "webhook_endpoint",
      "url": "https://api.example.com/caibo/webhook",
      "events": ["payout.completed", "payout.failed", "payout.blocked"],
      "active": true,
      "created_at": "2026-07-23T14:03:00Z"
    }
  ]
}

Errors

HTTPtypecodeWhen
401authentication_errorapi_key_missing / api_key_invalidNo key, or an unknown/revoked key.
403permission_errorscope_insufficientThe key lacks webhooks:read.
429rate_limit_errorrate_limitedToo many requests.

Delete an endpoint

DELETE /v1/webhooks/{id} — Scope: webhooks:write

Deletes an endpoint. It stops receiving deliveries immediately. Returns 204 No Content.

bash
curl -X DELETE https://api.caiboglobal.com/v1/webhooks/whe_1a2b3c4d \
  -H "X-API-Key: $CAIBO_API_KEY"

Errors

HTTPtypecodeWhen
401authentication_errorapi_key_missing / api_key_invalidNo key, or an unknown/revoked key.
403permission_errorscope_insufficientThe key lacks webhooks:write.
404invalid_request_errorresource_missingNo such endpoint for your organization.