BeaconBox
Esc

Type to search.

Dashboard

Create a webhook endpoint

Register an endpoint. The signing secret is in this response and nowhere else.

POST/api/v1/webhook-endpoints

Request

curl -X POST https://api.beaconbox.eu/api/v1/webhook-endpoints \
  -H "Authorization: Bearer $BEACONBOX_API_KEY" \
  -H "Content-Type: application/json"
  -d '{
       "url": "https://example.com/hooks/beaconbox"
     }'

Body

FieldTypeDescription
url
required
stringHTTPS URL to POST events to. Must resolve to a public address: private, loopback and link-local addresses are rejected, and redirects are never followed.
description
optional
stringYour own label for this endpoint.
event_types
optional
"message.delivered" | "message.opened" | "message.bounced" | "message.failed" | "message.complained" | "message.not_sent" | "sms.delivered" | "sms.failed" | "sms.rejected" | "whatsapp.delivered" | "whatsapp.failed" | "whatsapp.rejected" | "whatsapp.read" | "whatsapp.inbound_message" | "credits.low_balance" | "plan.past_due" | "plan.lapsed" | "plan.allowance_exceeded"[]Events to receive. Leave empty to receive all of them, including types added later; otherwise a new event type would silently pass you by.

Response

Returns 201.

FieldTypeDescription
idstring
urlstring
descriptionstring
secretstringMasked. The full value is shown only when the endpoint is created.
event_typesstring[]Empty means every event type.
disabledbooleanTrue once too many consecutive deliveries have exhausted their retries. Delete and re-create the endpoint once the receiver is healthy again.
consecutive_failuresinteger
last_success_atdate-time | null
last_errorstring | null
created_atdate-time

Errors

Failures are { "error_code": "..." } with a stable dotted code. See Errors for the codes worth branching on and the three outcomes that look like failures and are not.