put https://partner.gupshup.io/partner/app//appPreference
Use this API to enable or disable template messaging for your Gupshup App
Attention
This guide is no longer maintained from 31st Jan 2025. Please refer the updated one here.
You will need below details to start using this API.
- App Id
- Partner App Token
Parameters
Parameters | Value | Description |
---|---|---|
Authorization | {{PARTNER_APP_TOKEN}} | Access Token for the application |
appId | {{APP_ID}} | Unique Identifier for Gupshup App |
isHSMEnabled | true/false | Use this flag to enable or disable template messaging for an App. Possible values: true or false |
Sample Request
curl --location --request PUT 'https://partner.gupshup.io/partner/app/{{APP_ID}}/appPreference' \
--header 'Authorization: {{PARTNER_APP_TOKEN}}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'isHSMEnabled=true'
Sample Response
Status: 202 Accepted
Status Codes
Status Code | Response | Comments |
---|---|---|
Success | ||
200 | { "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 |