Update App Subscription

This API endpoint enables partners to update configuration of a specific webhook subscription by its unique subscription ID. This allows for granular modifications to individual subscriptions without affecting other webhooks or recreating the subscription. Common use cases include updating webhook URLs, changing event modes, modifying metadata, or toggling subscription status.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Request Parameters

KeyDescriptionValueData typeRequired/OptionalConstraints
AuthorizationAccess Token for the application{{PARTNER_APP_TOKEN}}StringRequiredShould be a valid Partner App Access Token
appIdApp ID to fetch the access token{{APP_ID}}StringRequired
  • The Id should be a valid app Id of Gupshup. - The App must be associated with the account that owns the PARTNER_APP_TOKEN being used
SUBSCRIPTION_ID2xxxxStringRequiredThe identifier for the subscription to updated.
modesStages in subscription processing<MODES>String
  • Should be one of the following : NONE, READ, DELIVERED, SENT, DELETED, OTHERS - for version 3 TEMPLATE, ACCOUNT, COPY are not supported
tagName tag for URL<name_tag_for_url>StringOptionaltag must be unique for each app
urlCallback URL<callback_url>StringOptionalShould be valid URL
versionVersion<version>IntegerOptionalShould be one of the following : 2,3
doCheckFor bypassing URL check<for_bypassing_url_check>BooleanOptionalShould be a boolean value : true/false
activeactive status of subscription<true/false>BooleanOptionalShould be a boolean value : true/false

Sample Request

curl --location --request PUT 'https://partner.gupshup.io/partner/app/{{APP_ID}}/subscription/{{SUBSCRIPTION_ID}}' \
--header 'Authorization: {{PARTNER_APP_TOKEN}}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'url=<callback_url>' \
--data-urlencode 'tag=<name_tag_for_url>' \
--data-urlencode 'version=<Version>' \
--data-urlencode 'modes=<MODES>' \
--data-urlencode 'doCheck=<for_bypassing_url_check>' \
--data-urlencode 'active=<true/false>'

Sample Response

{
  "status" : "success",
  "subscription" : {
    "active" : true,
    "appId" : "657c0203-0b4d-4ba1-bbf5-a679cfa35a16",
    "createdOn" : 1739862125507,
    "id" : "32595",
    "latencyBucket" : "lt_1_s",
    "mode" : 1025,
    "modes" : [ "SENT", "ENQUEUED" ],
    "modifiedOn" : 1739870558358,
    "showOnUI" : false,
    "tag" : "V33i4",
    "url" : "https://01hqjda5pbywgv7xw5e9ckd5e800-51132d4cc32709e9078d.requestinspector.com",
    "version" : 2
  }
}

Status Codes


Status CodeResponseComments
Success
200

{

"status" : "success","subscription" :{"active" : true,
"appId" : "657c0203-0b4d-4ba1-bbf5-a679cfa35a16",
"createdOn" : 1739862125507,
"id" : "32595",
"latencyBucket" : "lt_1_s",
"mode" : 1025,
"modes" : ["SENT", "ENQUEUED"],
"modifiedOn" : 1739870558358,
"showOnUI" : false,
"tag" : "V33i4",
"url" : "https://01hqjda5pbywgv7xw5e9ckd5e800-51132d4cc32709e9078d.requestinspector.com",
"version" : 2
}
}

Error
400

{

"status": "error","message": "API key is not associated with partner"}

when API key not found on partner DB
400

{

"status": "error","message": "Subscription Does Not Exist"}

When a subscription does not exist with the provided subcriptionId
401

{

"status": "error","message": "Authentication Failed"}

When authentication fails
403

{

"status": "error","message": "Not Subscription Owner"}

When the requested subscription is not associated with the provided appId
429

{

"status": "error","message": "Too Many Requests"}

Path Params
string
required
integer
required
Form Data
string

Optional

string

Optional

integer

Optional

string

Optional

boolean

Optional

boolean

Optional

Headers
string
required
Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json