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 |
|
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. |
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 Code | Response | Comments |
---|---|---|
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 |