# Send Authentication Template Message

**POST** `/{phone_number_id}/messages`

Product: [WhatsApp](https://devdocs.pinnacle.in/docs/whatsapp.md)  
Version: [3.0](https://devdocs.pinnacle.in/docs/whatsapp/3-0.md)

This API is used to send an authentication template message.

## Request

URL: `https://partnersv1.pinbot.ai/v3/{phone_number_id}/messages`

Authentication location: `header`

Authentication name: `apikey`

### Request schema


```json
{
  "type": "object",
  "properties": {
    "to": {
      "type": "string"
    },
    "type": {
      "type": "string"
    },
    "template": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "language": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string"
            }
          }
        },
        "components": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string"
              },
              "parameters": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "text": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "recipient_type": {
      "type": "string"
    },
    "messaging_product": {
      "type": "string"
    }
  }
}
```

### Request example


```json
{
  "to": "{{recipient_no}}",
  "type": "template",
  "template": {
    "name": "zero_tap_ttt_vk_fff",
    "language": {
      "code": "en_US"
    },
    "components": [
      {
        "type": "body",
        "parameters": [
          {
            "text": "84984519",
            "type": "text"
          }
        ]
      },
      {
        "type": "button",
        "index": "0",
        "sub_type": "url",
        "parameters": [
          {
            "text": "8498451119",
            "type": "text"
          }
        ]
      }
    ]
  },
  "recipient_type": "individual",
  "messaging_product": "whatsapp"
}
```

## Response schema


```json
{
  "type": "object",
  "properties": {
    "raw_example": {
      "type": "string"
    }
  }
}
```

## Response examples


```json
{
  "200": {
    "raw_example": "{\n\"messaging_product\": \"whatsapp\",\n\n\"contacts\": [\n{\n\"input\": \"9175XXXXXXXX\",\n\"wa_id\": \"9175XXXXXXXX\"\n}\n],\n\"messages\": [\n{\n\"id\":\n\"wamid.HBgMOTE3OTcyODkyNzEyFQIAERgSQzAwRDEzNkQ1NDFFNkM3NkEzAA=\n=\"\n}\n]\n}\n\nBusiness APIs Batch -3 (PARTNERS)"
  }
}
```

## Status codes


```json
[
  {
    "code": 200,
    "description": "The request was successful."
  },
  {
    "code": 400,
    "description": "Bad request or invalid parameters."
  },
  {
    "code": 401,
    "description": "API key is missing or invalid."
  },
  {
    "code": 403,
    "description": "The request is not authorized for this resource."
  },
  {
    "code": 404,
    "description": "The requested resource was not found."
  },
  {
    "code": 500,
    "description": "The server encountered an error."
  }
]
```
