Register Webhook
AI-generatedSummary
Register a new webhook URL with the WhatsApp API to receive specific event notifications related to a WhatsApp session.
Inputs
- Webhook URL (required) — URL to receive webhook events.
- Session ID — The WhatsApp session ID to associate with the webhook.
- Events — List of event types to subscribe to, such as message received, sent, read, delivered, QR code updates, and session status changes.
- Max Retries — Maximum number of retry attempts for failed webhook delivery attempts.
Output shape
a single record representing the registered webhook details or an error object if registration fails.
Returns the JSON response from the WhatsApp API after attempting to register the webhook, typically including webhook metadata or error information.
Examples
Example 1: Register a webhook to receive only 'message:received' events for a given WhatsApp session with the default retry count.
Set 'Webhook URL' to your public webhook endpoint, specify the 'Session ID', choose 'message:received' in Events, and leave Max Retries as default (3).