Attach Webhook

Attach a webhook to one or more senders (phone numbers or RCS agent IDs) to receive real-time event notifications. <br> You can attach an existing webhook by providing its ID, or create a new webhook by specifying a name and URL. Supports bulk operations with up to 50 senders per request. <br> Subscriptions are additive — attaching new senders does not remove existing ones. Re-attaching the same sender updates the event type filter without creating duplicates.

Authentication

PINNACLE-API-KEYstring
API Key authentication via header

Request

This endpoint expects an object.
senderslist of stringsRequired
Array of senders to attach the webhook to. Can be phone numbers in E.164 format or RCS agent IDs.
webhookIdstringOptional
Existing webhook ID (starts with `wh_`). Provide this OR `name` + `url` to create a new webhook. The webhook must be in ENABLED status. Disabled webhooks can be re-enabled from the [dashboard](https://app.pinnacle.sh/dashboard/development/webhooks).
namestringOptional>=1 character

Name for a new webhook (required if no webhookId).

urlstringOptionalformat: "uri"

HTTPS endpoint URL for a new webhook (required if no webhookId).

eventenum or nullOptional

Event type filter for the subscription. Set to null to receive all events.

USER.TYPING is only supported for RCS agent senders, not phone numbers.

Allowed values:

Response

Successfully attached webhook to the specified senders.

Senders that could not be found are returned in the failed array with error details.

webhookobject
eventenum or null
The event type filter applied to these subscriptions.
Allowed values:
senderslist of strings

Senders that were successfully attached (phone numbers in E.164 format or RCS agent IDs).

failedlist of objects
Senders that could not be attached, with error details.

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error
500
Internal Server Error