post
https://partner.gupshup.io/partner/app//onboarding/marketing/msg
Sends a marketing WhatsApp message using a GIF-based template.
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
API Request
curl --location --request POST 'https://partner.gupshup.io/partner/app/{{APP_ID}}/onboarding/marketing/msg' \
--header 'Authorization: {{PARTNER_APP_TOKEN}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"recipient_type": "individual",
"messaging_product": "whatsapp",
"to": "{{DESTINATION}}",
"type": "template",
"template": {
"name": "{{TEMPLATE_NAME}}",
"language": {
"policy": "deterministic",
"code": "{{LANGUAGE_CODE}}"
},
"namespace": "{{NAMESPACE}}",
"components": [
{
"type": "header",
"parameters": [
{
"type": "GIF",
"gif": {
"link": "{{GIF_URL}}"
}
}
]
},
{
"type": "body"
}
]
}
}'
Response
| Status code | Response | Comments |
|---|---|---|
| 200 | | |
| 429 | | 10 Requests per Minute |
| 500 | | For any Internal Error |
Request Parameters
Headers
| Key | Description | Value | Data Type | Required/ Optional | Constraints |
|---|---|---|---|---|---|
| Authorization | Access Token for the application | {{PARTNER_APP_TOKEN}} | String | Required | Should be a valid Partner App Access Token |
Path Parameters
| Key | Description | Value | Data Type | Required/ Optional | Constraints |
|---|---|---|---|---|---|
| APP_ID | App ID to fetch the access token | {{APP_ID}} | String | Required | 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 |
JSON Body Parameters
| Key | Description | Value | Data Type | Required/ Optional | Constraints |
|---|---|---|---|---|---|
| recipient_type | Type of recipient | individual | String | Required | Must be "individual" for single recipient |
| messaging_product | Messaging platform | whatsapp | String | Required | Must be "whatsapp" |
| to | Destination Phone Number | {{DESTINATION}} | String | Required | Valid phone number with country code |
| type | Message type | template | String | Required | Must be "template" for template messages |
| template | Template object containing template details | See template structure below | Object | Required | Must include name, language, namespace, and components |
Template Object Structure
| Key | Description | Value | Data Type | Required/ Optional | Constraints |
|---|---|---|---|---|---|
| name | Template name | {{TEMPLATE_NAME}} | String | Required | Must be an approved template name t |
| language | Language object | {"policy": "deterministic", "code": "en"} | Object | Required | Contains policy and language code |
| namespace | Template namespace | {{NAMESPACE}} | String | Required | WABA namespace for the template |
| components | Array of template components | | Array | Required | Must include header and body components |