Attach Webhook

Connect a webhook to your phone number to receive real-time notifications for incoming messages, delivery status updates, and other communication events.

Path parameters

phonestringRequired

The phone number you want to attach the webhook to in E.164 format. Make sure it is url encoded (i.e. replace the leading + with %2B).

Must be a phone number that you own and have already purchased through the API.

Headers

PINNACLE-API-KEYstringRequired

Request

This endpoint expects an object.
Update WebhookobjectRequired

Attach a webhook you’ve already created in your account to this phone number.

OR
Create WebhookobjectRequired
Create a new webhook and immediately attach it to your phone number.

Response

Successfully updated/added webhook to the number.

To detach webhooks check out Detach Webhook.

webhookobject
Detailed information about the attached webhook.
eventenum
Specific event type configured for this webhook attachment.
Allowed values:
phoneNumberstring
Phone number in E.164 format that is linked to the webhook.

Errors