Set callback for an appID

Use this endpoint to configure a customer callback URL for the application.

🚧

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

Parameters

KeyDescriptionConstraints
PARTNER_TOKENJWT Token issues post Partner loginShould be a valid Partner JWT Token.
urlurl to set for custom callbackShould be a valid URL
modesmodes for which callback should be used. Taken as comma separated valuesShould be any of [NONE,READ,DELIVERED,SENT,DELETED,OTHERS,TEMPLATE,ACCOUNT]
directForwardingboolean value which is true if the events to be sent directly and false if the events need to be sent via the platform.Should only contain true or false value.
notifyWithPhoneThe boolean value is true if the events contain the source phone number. false otherwise.Should only contain true or false value.

Sample Request

curl --location --request PUT '{{partner_portal_base_url}}/partner/app/:appId/callback' \
--header 'token: {{PARTNER_TOKEN}}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'url={{callback_url}}' \
--data-urlencode 'directForwarding={{directForwarding}}' \
--data-urlencode 'notifyWithPhone={{notifyWithPhone}}' \
--data-urlencode 'modes={{modes}}'

Sample Response

{
    "status": "success",
    "callback": {
        "url" : "<callback_url>",
        "custom" : <true/false>,
        "modes" : [
            "<callback_modes_list>"
        ]
    }
}

Status Codes

Status CodeResponseComment
Success
200{ "status": "success", "callback": { "url" : "<callback_url>", "custom" : <true/false>, "modes" : [ "<callback_modes_list>" ] } }Custom URL set successfully.
Error
400{ "status": "error", "message": "Invalid App Details Passed" }Incorrect App Id Provided.
429{ "status": "error", "message": "Too Many Requests" }When the request rate limit exceeds.
500{ "status": "error", "message": "Unable to Set Callback URL" }Error occurred while setting the callback URL, try after some time.
Language
Click Try It! to start a request and see the response here!