# Template Message

Whatsapp message templates are pre-defined message format used to send notifications or initiate conversations with your customers. Messages can include appointment reminders, shipping information, issue resolution or payment updates. Before sending a message template, you need to create one. See [Create Message Templates for Your WhatsApp Business Account](/whatsapp-api/getting-started/create-whatsapp-template.md) for more information

To send a template message, make <mark style="color:red;">`POST`</mark> it to **`/{{Channel-ID}}/messages`** and attach a message template object, Whatsapp Business API supports messages of interactive type as in the list below:

1. Text based message templates
2. Media based message templates
3. Interactive Message Templates

A successful response includes an object with an identifier prefixed with **`wamid`**. Use the **`wamid`** to track your message status.

#### **Text Based Message Templates**

```json
{
    "messaging_product": "whatsapp",
    "recipient_type": "individual",
    "to": "{{Recipient-Phone-Number}}",
    "type": "template",
    "template": {
        "name": "template-name",
        "language": {
            "code": "language-and-locale-code"
        },
        "components": [
            {
                "type": "body",
                "parameters": [
                    {
                        "type": "text",
                        "text": "text-string"
                    },
                    {
                        "type": "currency",
                        "currency": {
                            "fallback_value": "$100.99",
                            "code": "USD",
                            "amount_1000": 100990
                        }
                    },
                    {
                        "type": "date_time",
                        "date_time": {
                            "fallback_value": "February 25, 1977",
                            "day_of_week": 5,
                            "year": 1977,
                            "month": 2,
                            "day_of_month": 25,
                            "hour": 15,
                            "minute": 33,
                            "calendar": "GREGORIAN"
                        }
                    }
                ]
            }
        ]
    }
}
```

#### Media Based Message Templates

```json
{
  "messaging_product": "whatsapp",
  "recipient_type": "individual",
  "to": "{{Receipient-Phone-Number}}",
  "type": "template",
  "template": {
    "name": ""template-name",
    "language": {
      "code": "language-and-locale-code"
    },
    "components": [
      {
        "type": "header",
        "parameters": [
          {
            "type": "image",
            "image": {
              "link": "https://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"
            }
          }
        ]
      }
    ]
  }
}
```

#### Interactive Message Templates

```json
{
  "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"
          }
        ]
      }
    ]
  }
}
```

{% hint style="info" %}
please refer to this [document ](https://developers.facebook.com/docs/whatsapp/cloud-api/reference/messages#template-object)as well to see the possible of `Template object`
{% endhint %}


---

# Agent Instructions: 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-wa.neuapix.com/whatsapp-api/whatsapp-api/send-messages/template-message.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.
