put
https://partner.gupshup.io/partner/bizgate/app//messaging/subscription/
Updates the callback settings on an existing messaging subscription, such as the webhook URL, subscribed modes, or metadata.
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 |
| subId | Identifier of the subscription. | sub-7f3a2b1c | String | Required |
Body
| Key | Description | Values | Data Type | Required/Optional |
|---|---|---|---|---|
| url | HTTPS endpoint the events are delivered to. | https://partner.example/webhook/whatsapp | — | Optional |
| modes | Comma-separated event types to deliver. | MESSAGE,DISPATCHED,DELIVERED,READ,SENT,DELETED,OTHERS | — | Optional |
| tag | Label identifying this subscription among several on the same app. | primary-webhook | — | Optional |
| showOnUI | Whether the subscription is listed in the Partner Portal UI. | true | — | Optional |
| version | Webhook payload version to deliver. | 3 | — | Optional |
| meta | JSON object of your own metadata, echoed back on delivery. | {"env":"qa"} | — | Optional |
| active | Whether delivery is currently enabled for this subscription. | true | — | Optional |
Sample cURL — Update subscription by id.
curl --request PUT \
--url 'https://partner.gupshup.io/partner/bizgate/app/6f414190-d45c-4671-bca1-fb6c3018cb13/messaging/subscription/sub-7f3a2b1c' \
--header 'Authorization: Bearer <UT>' \
--header 'Accept: application/json' \
--data-urlencode 'url=https://partner.example/webhook/whatsapp' \
--data-urlencode 'modes=MESSAGE,DISPATCHED,DELIVERED,READ,SENT,DELETED,OTHERS' \
--data-urlencode 'tag=primary-webhook' \
--data-urlencode 'showOnUI=true' \
--data-urlencode 'version=3' \
--data-urlencode 'meta={"env":"qa"}' \
--data-urlencode 'active=true'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…