Allo

Créer un webhook

Crée un endpoint webhook abonné à un ou plusieurs types d'événements.

POST/v2/api/webhooks

Crée un endpoint webhook abonné à un ou plusieurs types d'événements.

  • url doit être une URL HTTPS accessible publiquement.
  • topics doit contenir au moins un type d'événement valide. Un topic inconnu renvoie une erreur 400 avec le code INVALID_EVENT_TYPE.
  • Le signing_secret n'est renvoyé que dans cette réponse. Conservez-le pour vérifier les signatures.

Autorisation

Authorizationstring · headerrequis

Api-Key ak_live_…

Corps

urlstring<uri>requis

HTTPS URL that will receive event deliveries.

topicsenum<string>[]requis

Event topics to subscribe to (at least one).

call.receivedcall.triggeredcall.answeredcall.completedtag.addedtag.removedsms.receivedsms.sentcontact.createdcontact.updatedsummary.updated

descriptionstring

Optional human-readable label.

Réponses

201Webhook created
dataobject

A webhook endpoint.

7 champs
idstring

Unique webhook endpoint ID.

urlstring<uri>

HTTPS URL that receives event deliveries.

topicsenum<string>[]

Event topics this endpoint is subscribed to.

call.receivedcall.triggeredcall.answeredcall.completedtag.addedtag.removedsms.receivedsms.sentcontact.createdcontact.updatedsummary.updated

descriptionstring | null

Optional human-readable label.

enabledboolean

Whether the endpoint is active.

signing_secretstring | null

Secret used to verify delivery signatures. Returned only when the webhook is created or fetched by ID.

created_atstring<date-time> | null

When the endpoint was created.

400
401
429