Update subscription by id

Updates the callback settings on an existing messaging subscription, such as the webhook URL, subscribed modes, or metadata.

Request parameters

Path parameters

KeyDescriptionValuesData TypeRequired/Optional
appIdIdentifier of the WhatsApp app the call acts on.6f414190-d45c-4671-bca1-fb6c3018cb13StringRequired
subIdIdentifier of the subscription.sub-7f3a2b1cStringRequired

Body

KeyDescriptionValuesData TypeRequired/Optional
urlHTTPS endpoint the events are delivered to.https://partner.example/webhook/whatsapp—Optional
modesComma-separated event types to deliver.MESSAGE,DISPATCHED,DELIVERED,READ,SENT,DELETED,OTHERS—Optional
tagLabel identifying this subscription among several on the same app.primary-webhook—Optional
showOnUIWhether the subscription is listed in the Partner Portal UI.true—Optional
versionWebhook payload version to deliver.3—Optional
metaJSON object of your own metadata, echoed back on delivery.{"env":"qa"}—Optional
activeWhether 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
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

Identifier of the WhatsApp app the call acts on.

string
required

Identifier of the subscription.

Form Data

application/x-www-form-urlencoded subscription update fields

string

HTTPS endpoint the events are delivered to.

string

Comma-separated event types to deliver.

string

Label identifying this subscription among several on the same app.

boolean

Whether the subscription is listed in the Partner Portal UI.

int32

Webhook payload version to deliver.

string

JSON object of your own metadata, echoed back on delivery.

boolean

Whether delivery is currently enabled for this subscription.

Responses

Language
Credentials
Bearer
Universal Token (UT)
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json