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"
}'client.webhook_endpoints.create("https://example.com/hooks")$client->webhookEndpoints->create("https://example.com/hooks")Body
| Field | Type | Description |
|---|---|---|
urlrequired | string | HTTPS URL to POST events to. Must resolve to a public address: private, loopback and link-local addresses are rejected, and redirects are never followed. |
descriptionoptional | string | Your own label for this endpoint. |
event_typesoptional | "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.
| Field | Type | Description |
|---|---|---|
id | string | |
url | string | |
description | string | |
secret | string | Masked. The full value is shown only when the endpoint is created. |
event_types | string[] | Empty means every event type. |
disabled | boolean | True once too many consecutive deliveries have exhausted their retries. Delete and re-create the endpoint once the receiver is healthy again. |
consecutive_failures | integer | |
last_success_at | date-time | null | |
last_error | string | null | |
created_at | date-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.
