WA-AKG icon

WA-AKG

Interact with WA-AKG WhatsApp Gateway API

Webhook → Create

AI-generated

Summary

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={}

Links

Discussion