Actions98
- Auto Reply Actions
- Chat Actions
- Contact Actions
- Group Actions
- Label Actions
- Message Actions
- Media Actions
- Notification Actions
- Profile Actions
- Scheduler Actions
- Session Actions
- Status Update Actions
- System Actions
- User Actions
- Webhook Actions
Webhook → Create
AI-generatedSummary
Creates a new webhook endpoint for the selected session.
Inputs
- sessionId (required) — The Session ID to use for this request
- webhookUrl (required) — The endpoint URL that will receive HTTP POST events
- webhookEvents (required) — Comma-separated list of events to subscribe to (e.g., message.received, message.sent, group.update)
- additionalFields — Optional extra fields such as webhook secret for signature verification
Output shape
a webhook object representing the newly created webhook (includes webhookId, url, events, and secret)
The response contains the full webhook definition; optional fields may be omitted if not provided.
Examples
Example 1: Set up a webhook to receive message events
sessionId=mySession, webhookUrl=https://example.com/webhook, webhookEvents=message.received, message.sent, additionalFields={}
Example 2: Create a webhook with secret for HMAC verification
sessionId=mySession, webhookUrl=https://example.com/webhook, webhookEvents=message.received, additionalFields={webhookSecret=superSecret123}
Example 3: Update an existing webhook
sessionId=mySession, webhookId=123, webhookUrl=https://example.com/newurl, webhookEvents=group.update, additionalFields={}