Update Inbound Events on App's Callback

Use this API to update the type of events you receive on your callback URL for your Gupshup app.

🚧

⚠We are going to be deprecating this API soon, we request you that you start using the subscription API, as it provides you with a granular control for event management on your callback URL

Request Parameters

Key Value Description Data type Required/Optional Constraints

Authorization

{{PARTNER_APP_TOKEN}}

Access Token for the application

String

Required

Should be a valid Partner App Access Token

appId

{{APP_ID}}

appId for the app whose business email need to verify.

String

Required

  • The ID should be a valid app Id of Gupshup
  • It should belong to the same account as the apikey

modes

{{MODES}}

Update inbound events that you want to receive on your App's callback URL. You may provide all the values for which you want to receive events. If no values are provided, all events will be deselected.
Possible values - DLR events: DELIVERED, READ, SENT, DELETED, and OTHERS.
System events: TEMPLATE and ACCOUNT.

String

Required

Sample Request

curl --location --request PUT 'https://partner.gupshup.io/partner/app/{{APP_ID}}/callback/mode' \
--header 'Authorization: {{PARTNER_APP_TOKEN}}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'modes={{MODES}}'	

Sample Response

{
    "callback": {
        "custom": false,
        "modes": [
            "SENT",
            "DELIVERED",
            "READ",
            "DELETED"
        ]
    },
    "status": "success"
}

Status Codes

Status CodeResponseComments
Success
200{ "callback": { "custom": false, "modes": [ "SENT", "DELIVERED", "READ", "DELETED" ] }, "status": "success" }
Error
429{ "status": "error", "message": "Too Many Requests" }10 Requests per Minute
500{ "status": "error", "message": "Internal server error. Please try again later and If Issue still persist than contact Gupshup Dev Support" }For any Internal Error
Language
Click Try It! to start a request and see the response here!