> For the complete documentation index, see [llms.txt](https://docs.ocaindonesia.co.id/whatsapp-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ocaindonesia.co.id/whatsapp-api/endpoint/sending-message-template-interactive.md).

# Sending Message Template Interactive

WhatsApp provides interactive message templates that clients can use to send messages with buttons included. The types of interactive buttons available are as follows:

**1. Button – Quick Reply**: This button can be filled with specific payloads. A suitable use case for this button is a yes or no question, where the recipient doesn't need to type a reply but only needs to press the button. Below is an example of a message using an interactive quick reply button template:

<figure><img src="/files/Ae8KiebU8st9A5lR2rtm" alt=""><figcaption></figcaption></figure>

**2. Button – Visit Website**\
This button can be used if the business wants to send a message containing a URL link. The URL link can be either static or dynamic. Below is an example of a message using an interactive visit website template.

<figure><img src="/files/BwrcfPfEGeuYBS6uUMXn" alt=""><figcaption></figcaption></figure>

**3. Button – Call Phone Number**: This button can be used if a business wants customers to initiate a phone call triggered by this call button. Here is an example message using an interactive button template for calling a phone number.

<figure><img src="/files/8qhnDK23nPVqoQxhYnXB" alt=""><figcaption></figcaption></figure>

## Steps to Use Interactive Templates

To use interactive WhatsApp templates, users need to complete a few steps:

1. **Request Interactive WhatsApp Template**\
   Users can request a template through the developer dashboard API. Please visit the website at [OCA Indonesia Developer](https://developer.ocaindonesia.co.id) and register the template according to the needs of the interactive template you want to use.

<figure><img src="/files/bscrgBjrpk7AudPQYjcb" alt=""><figcaption></figcaption></figure>

2. Please wait until the request template status changes to "Approved".

## **Sample Payload Request: Dynamic Visit Website Button**

```
{
    "phone_number": "{{receipient_phone_number}}",
    "message": {
        "type": "template",
        "template": {
            "template_code_id": "{{fill_with_template_code}}",
            "payload": [
                // if your body message have dynamic variable you should fill this body section
                {
                    "position": "body",
                    "parameters": [
                        {
                            "type": "text",
                            "text": "{{fill with your body parameter - Optional}}"
                        }
                    ]
                },
                {
                    "position": "button",
                    "parameters": [
                        {
                            "sub_type": "url",
                            "index": "0",
                            "parameters": [
                                //this parameter will be added to your url path ex: https: //example.com/your-unique-id
                                {
                                    "type": "text",
                                    "text": "{{fill with your unique ID}}"
                                }
                            ]
                        }
                    ]
                }
            ]
        }
    }
}
```

### Sample Payload Request – Button Quick Reply

```
{
    "phone_number": "{{receipient_phone_number}}",
    "message": {
        "type": "template",
        "template": {
            "template_code_id": "{{fill_with_template_code}}",
            "payload": [
                // if your body message have dynamic variable you should fill this body section
                {
                    "position": "body",
                    "parameters": [
                        {
                            "type": "text",
                            "text": "{{fill with your body parameter - Optional}}"
                        }
                    ]
                },
                {
                    "position": "button",
                    "parameters": [
                        {
                            "sub_type": "quick_reply",
                            "index": "0",
                            "parameters": [
                                {
                                    "type": "payload",
                                    "text": "{{fill with you payload button ex: YES}}"
                                }
                            ]
                        }
                    ]
                }
            ]
        }
    }
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ocaindonesia.co.id/whatsapp-api/endpoint/sending-message-template-interactive.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
