Aller au contenu
Esc
↑↓naviguer↵ouvrir⌘Japerçu

Create a webhook

POST/webhooks
Autorisation
AuthorizationJeton Bearer · headerrequis

A BillionSend API key (bs_…).

Corps de la requête
requisapplication/json
endpointstring<uri>requis
longueur max 2048
eventsstring[]requis
min 1 éléments
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.

max 100 éléments
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.

Réponses
200

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

objectstringrequis
Valeurs autorisées :webhook
idstring<uuid>requis
signing_secretstringrequis
401

Missing, malformed, unknown or revoked API key

statusCodenumberrequis
namestringrequis
messagestringrequis
403

Plan webhook endpoint limit reached

statusCodenumberrequis
namestringrequis
messagestringrequis
422

Validation error

statusCodenumberrequis
namestringrequis
messagestringrequis
429

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

statusCodenumberrequis
namestringrequis
messagestringrequis
Essayer
Serveur
Autorisation
Corpsapplication/json
Requête
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"
}'
Réponse
{
  "object": "webhook",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "signing_secret": "string"
}

Cette page vous a-t-elle été utile ?