v1

latestOpenAPI 3.0.02026-07-2483164186.3 KB
Webhook

Edit Webhooks

Edit Webhooks

post/v2/webhook/{webhookId}

Path parameters

webhookIdstring required

The webhook ID

Request body

urlstring uri required

URL of the webhook

method'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' required

HTTP method used for the webhook

headersobject

Custom headers to be sent with the webhook

bodyobject

Payload to be sent with the webhook

queryobject

Query parameters to be included in the webhook URL

bodyFormat'JSON' | 'FORM_DATA'

Format of the body content

webhookEventsstring[] required

Events that trigger the webhook

retryOnTimeoutboolean

Retry the webhook call on timeout

namestring required

Name of the webhook

wabaNumbersstring[] required

List of WABA numbers associated with the webhook

Example request

{
  "url": "https://example.com/webhook",
  "method": "POST",
  "headers": {
    "Authorization": "Bearer token"
  },
  "bodyFormat": "JSON",
  "authorization": {
    "type": "BEARER",
    "payload": "some-secure-token"
  },
  "webhookEvents": [
    "MESSAGE_RECEIVED",
    "CLOSE_CONVERSATION"
  ],
  "wabaNumbers": [
    "+919999999999"
  ]
}

Response

Edit Webhook

invalidWabaNumbersstring[] required

A list of invalid WABA numbers

Example response

{
  "validWebhooks": [
    {
      "wabaNumber": "+919999999999",
      "webhookEventType": "MESSAGE_RECEIVED"
    }
  ],
  "invalidWebhooks": [
    {
      "wabaNumber": "+918888888888",
      "webhookEventType": "INVALID_EVENT"
    }
  ],
  "invalidWabaNumbers": [
    "+918888888880"
  ]
}