Saltar al contenido
Esc
↑↓navegar↵abrir⌘Jvista previa

Create a webhook

POST/webhooks
Autorización
AuthorizationToken Bearer · headerobligatorio

A BillionSend API key (bs_…).

Cuerpo de la solicitud
obligatorioapplication/json
endpointstring<uri>obligatorio
longitud máx. 2048
eventsstring[]obligatorio
mín. 1 elementos
inbox_idsstring<uuid>[] | null

BillionSend extension: inbox events and email.received reach this endpoint only for these inboxes of the team (at most 100). null means every inbox. Omitted: every inbox.

máx. 100 elementos
signing_secretstring

Signing secret to use instead of minting one: whsec_ followed by base64 of 24-64 bytes (the Standard Webhooks format). An existing secret carried over keeps the receiver verifying unchanged; when omitted, a new one is generated.

Respuestas
200

Webhook created; signing_secret is also retrievable via GET /webhooks/{id}

objectstringobligatorio
Valores permitidos:webhook
idstring<uuid>obligatorio
signing_secretstringobligatorio
401

Missing, malformed, unknown or revoked API key

statusCodenumberobligatorio
namestringobligatorio
messagestringobligatorio
403

Plan webhook endpoint limit reached

statusCodenumberobligatorio
namestringobligatorio
messagestringobligatorio
422

Validation error

statusCodenumberobligatorio
namestringobligatorio
messagestringobligatorio
429

Over the rate limit (rate_limit_exceeded, with Retry-After)

statusCodenumberobligatorio
namestringobligatorio
messagestringobligatorio
Pruébalo
Servidor
Autorización
Cuerpoapplication/json
Solicitud
curl -X POST 'https://api.billionsend.com/webhooks' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "endpoint": "http://example.com",
  "events": [
    "email.scheduled"
  ],
  "inbox_ids": [
    "497f6eca-6276-4993-bfeb-53cbbbba6f08"
  ],
  "signing_secret": "string"
}'
Respuesta
{
  "object": "webhook",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "signing_secret": "string"
}

¿Te ha resultado útil esta página?