---
updatedAt: 2026-06-26T06:59:48.000Z
agentTools:
  projectIndex: https://partner-docs.gupshup.io/llms.txt
---

# Interactive Message Templates

<Callout icon="📘" theme="info">
  Interactive message templates expand the content you can send recipients beyond the standard message  
  template and media messages template types to include interactive buttons using the components object.

  There are two types of predefined buttons:

  * **Call-to-Action** - Allows your customer to call a phone number and visit a website.
  * **Quick Reply** - Allows your customer to return a simple text message.

  These buttons can be attached to text messages or media messages. Once your interactive message templates  
  have been created and approved, you can use them in notification messages as well as customer service/care messages.

  **NOTE**:

  1. Sending Marketing Templates through MM Lite for enhanced delivery optimization. For more details, refer to [_MM Lite_](https://partner-docs.gupshup.io/docs/marketing-messages-lite-mm-lite-api) document.
  2. Use the `recipient` parameter only when BSUID is enabled for the app.
  3. When both `to` and `recipient` fields are used in the payload, the `to` field gets the priority.
</Callout>

## Request Parameters

<HTMLBlock>{`
<table style="width: 100%; border-collapse: collapse;">
<thead>
<tr>
  <th style="border: 1px solid #ddd; padding: 8px;">Key</th>
  <th style="border: 1px solid #ddd; padding: 8px;">Value</th>
  <th style="border: 1px solid #ddd; padding: 8px;">Description</th>
  <th style="border: 1px solid #ddd; padding: 8px;">Data type</th>
  <th style="border: 1px solid #ddd; padding: 8px;">Required/Optional</th>
  <th style="border: 1px solid #ddd; padding: 8px;">Constraints</th>
</tr>
</thead>
<tbody>
<tr>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>Authorization</p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>{{PARTNER_APP_TOKEN}}</p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>Access Token for the application</p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>String</p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>Required</p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>Should be a valid<br>Partner App Access<br>Token.</p>
</td>
</tr>
<tr>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>appId</p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>{{APP_ID}}</p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>App ID to fetch the<br>access token</p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>String</p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>Required</p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>The ID should be a valid app Id of Gupshup.</p>
</td>
</tr>
<tr>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>messaging_product</p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>whatsapp</p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>Messaging product</p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>String</p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>Required</p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"></td>
</tr>
<tr>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>recipient_type</p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>individual</p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>Recipient type</p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>String</p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>Required</p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"></td>
</tr>
<tr>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>to</p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>91785876xxxx</p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>Destination phone number where the message needs to be sent</p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>String</p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>Required (Can be optional if BSUID is enabled for the app and recipient parameter is used instead)</p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>Must be a valid phone number</p>
</td>
</tr>
<tr>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>recipient</p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>IN.461449821882xxxx</p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>Destination BSUID where the message needs to be sent</p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>String</p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>Optional</p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>Must be a valid BSUID</p>
</td>
</tr>
<tr>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>type</p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>template</p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>Messaging type</p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>String</p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>Required</p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>The type should be <code>template</code> to send a template message.</p>
</td>
</tr>
<tr>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>template</p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"><p><code>{   	&lt;BODY&gt;   }</code></p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>Template message inside body</p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>Object</p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"><p>Required</p>
</td>
  <td style="border: 1px solid #ddd; padding: 8px;"></td>
</tr>
</tbody>
</table>
`}</HTMLBlock>

## Sample Request

```curl
curl --location 'https://partner.gupshup.io/partner/app/{{APP_ID}}/v3/message' \
--header 'accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: {{PARTNER_APP_TOKEN}}' \
--data '{
	"messaging_product": "whatsapp",
	"recipient_type": "individual",
  "to": "PHONE_NUMBER",
	"recipient": "BSUID",
	"type": "template",
	"template": {
		"name": "TEMPLATE_NAME",
		"language": {
			"code": "LANGUAGE_AND_LOCALE_CODE"
		},
		"components": [
			{
				"type": "header",
				"parameters": [
					{
						"type": "image",
						"image": {
							"link": "http(s)://URL"
						}
					}
				]
			},
			{
				"type": "body",
				"parameters": [
					{
						"type": "text",
						"text": "TEXT_STRING"
					},
					{
						"type": "currency",
						"currency": {
							"fallback_value": "VALUE",
							"code": "USD",
							"amount_1000": NUMBER
						}
					},
					{
						"type": "date_time",
						"date_time": {
						"fallback_value": "MONTH DAY, YEAR"
						}
					}
				]
			},
			{
				"type": "button",
				"sub_type": "quick_reply",
				"index": "0",
				"parameters": [
					{
						"type": "payload",
						"payload": "PAYLOAD"
					}
				]
			},
			{
				"type": "button",
				"sub_type": "quick_reply",
				"index": "1",
				"parameters": [
					{
						"type": "payload",
						"payload": "PAYLOAD"
					}
				]
			}
		]
	}
}'
```

## Sample Response

```json
{
	"messages": [
		{
			"id":	"GUPSHUP_MESSAGE_ID"
		}
 	],
	"messaging_product": "whatsapp",
	"contacts": [	  
		{	  
			"input": "DESTINATION_PHONE_NO",
			"wa_id": "DESTINATION_PHONE_NO"
		}
	]
}
```

## Status Codes

| Status Code | Response                                                                                                                                                                                                 | Comments                                       |
| :---------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------- |
| **Success** |                                                                                                                                                                                                          |                                                |
| 200         | `{ 	"messages": [ 		{ 			"id":	"GUPSHUP_MESSAGE_ID" 		}  	], 	"messaging_product": "whatsapp", 	"contacts": [	   		{	   			"input": "DESTINATION_PHONE_NO", 			"wa_id": "DESTINATION_PHONE_NO" 		} 	] }` |                                                |
| **Error**   |                                                                                                                                                                                                          |                                                |
| 400         | `{   	"message": "Callback Billing must be enabled for this API",   	"status": "error"   }`                                                                                                              | if Callback billing is not enabled for the app |
| 400         | `{   	"message": "Invalid App Details",   	"status": "error"   }`                                                                                                                                        | if app details are not found                   |
| 401         | `{   	"status": "error",   	"message": "Authentication Failed"   }`                                                                                                                                      | When API key authentication fails              |

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Partner Portal API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://partner.gupshup.io"
    }
  ],
  "paths": {
    "/partner/app/{appId}/v3/message": {
      "post": {
        "summary": "Interactive Message Templates",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "messaging_product": "whatsapp",
                  "recipient_type": "individual",
                  "to": "PHONE_NUMBER",
                  "type": "template",
                  "template": {
                    "name": "TEMPLATE_NAME",
                    "language": {
                      "code": "LANGUAGE_AND_LOCALE_CODE"
                    },
                    "components": [
                      {
                        "type": "header",
                        "parameters": [
                          {
                            "type": "image",
                            "image": {
                              "link": "http(s)://URL"
                            }
                          }
                        ]
                      },
                      {
                        "type": "body",
                        "parameters": [
                          {
                            "type": "text",
                            "text": "TEXT_STRING"
                          },
                          {
                            "type": "currency",
                            "currency": {
                              "fallback_value": "VALUE",
                              "code": "USD",
                              "amount_1000": "NUMBER"
                            }
                          },
                          {
                            "type": "date_time",
                            "date_time": {
                              "fallback_value": "MONTH DAY, YEAR"
                            }
                          }
                        ]
                      },
                      {
                        "type": "button",
                        "sub_type": "quick_reply",
                        "index": "0",
                        "parameters": [
                          {
                            "type": "payload",
                            "payload": "PAYLOAD"
                          }
                        ]
                      },
                      {
                        "type": "button",
                        "sub_type": "quick_reply",
                        "index": "1",
                        "parameters": [
                          {
                            "type": "payload",
                            "payload": "PAYLOAD"
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "Your app token, please refer [**Get access token api**](https://partner-docs.gupshup.io/reference/get_partner-app-appid-token) to get the token from partner documentation.",
            "example": "sk_61b3021c97214370b341f8baaae0xxxx",
            "required": true
          },
          {
            "name": "appId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "Unique identifier of the app.",
            "example": "9e97650d-xxxx-xxxx-xxxx-4cdf47c3fa68"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "messages": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "example": "GUPSHUP_MESSAGE_ID"
                          }
                        }
                      },
                      "example": [
                        {
                          "id": "GUPSHUP_MESSAGE_ID"
                        }
                      ]
                    },
                    "messaging_product": {
                      "type": "string",
                      "example": "whatsapp"
                    },
                    "contacts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "input": {
                            "type": "string",
                            "example": "DESTINATION_PHONE_NO"
                          },
                          "wa_id": {
                            "type": "string",
                            "example": "DESTINATION_PHONE_NO"
                          }
                        }
                      },
                      "example": [
                        {
                          "input": "DESTINATION_PHONE_NO",
                          "wa_id": "DESTINATION_PHONE_NO"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Callback Billing must be enabled for this API"
                    },
                    "status": {
                      "type": "string",
                      "example": "error"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Authentication Failed"
                    },
                    "status": {
                      "type": "string",
                      "example": "error"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```