post
https://partner.gupshup.io/partner/bizgate/app//messaging/subscription
Creates a new messaging subscription on a WhatsApp app so the supplied webhook URL starts receiving callbacks for the requested modes.
Request parameters
Path parameters
| Key | Description | Values | Data Type | Required/Optional |
|---|---|---|---|---|
| appId | Identifier of the WhatsApp app the call acts on. | 6f414190-d45c-4671-bca1-fb6c3018cb13 | String | Required |
Body
| Key | Description | Values | Data Type | Required/Optional |
|---|---|---|---|---|
| modes | Comma-separated event types to deliver. Required, and must not be blank. WAME adds STANDBY_STATUSES, STANDBY_MESSAGE_ECHOES, STANDBY_MESSAGES, and MESSAGING_HANDOVERS for Multi-App / handover webhooks; other values are forwarded to WASS as-is. | MESSAGE,DISPATCHED,DELIVERED,READ,SENT,DELETED,OTHERS,STANDBY_STATUSES,STANDBY_MESSAGE_ECHOES,STANDBY_MESSAGES,MESSAGING_HANDOVERS | — | Required |
| tag | Label identifying this subscription among several on the same app. Required, and must not be blank: a whitespace-only tag was stored as the literal string "null". | primary-webhook | — | Required |
| showOnUI | Whether the subscription is listed in the Partner Portal UI. | true | — | Optional |
| version | Webhook payload version to deliver. Required. Boxed deliberately: as a primitive an omitted version bound to 0 and was persisted silently. | 3 | — | Required |
| url | HTTPS endpoint the events are delivered to. | https://partner.example/webhook/whatsapp | — | Required |
| meta | JSON object of your own metadata, echoed back on delivery. | {"env":"qa"} | — | Optional |
Sample cURL — Create subscription.
curl --request POST \
--url 'https://partner.gupshup.io/partner/bizgate/app/6f414190-d45c-4671-bca1-fb6c3018cb13/messaging/subscription' \
--header 'Authorization: Bearer <UT>' \
--header 'Accept: application/json' \
--data-urlencode 'modes=MESSAGE,DISPATCHED,DELIVERED,READ,SENT,DELETED,OTHERS,STANDBY_STATUSES,STANDBY_MESSAGE_ECHOES,STANDBY_MESSAGES,MESSAGING_HANDOVERS' \
--data-urlencode 'tag=primary-webhook' \
--data-urlencode 'showOnUI=true' \
--data-urlencode 'version=3' \
--data-urlencode 'url=https://partner.example/webhook/whatsapp' \
--data-urlencode 'meta={"env":"qa"}'Sample success response (200)
{
"status": "success",
"data": {
"subscription": {
"id": "sub-7f3a2b1c",
"tag": "primary-webhook",
"appId": "6f414190-d45c-4671-bca1-fb6c3018cb13",
"url": "https://partner.example/webhook/whatsapp",
"active": true,
"version": 3,
"mode": 0,
"modes": [
"MESSAGE",
"DELIVERED",
"READ"
],
"showOnUI": true,
"createdOn": 1779091144256,
"modifiedOn": 1779091144256
}
}
}Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…