# Send Media 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 the media template message to the end user.

## Request

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

Authentication location: `header`

Authentication name: `apikey`

### Request schema


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

### Request example


```json
{
  "raw_example": "{\n\"messaging_product\": \"whatsapp\",\n\"recipient_type\": \"individual\",\n\"to\": \"{{Recipient number}}\",\n\"type\": \"template\",\n\"template\": {\n\"name\": \"template-name\",\n\"language\": {\n\"code\": \"language-and-locale-code\"\n},\n\"components\": [\n{\n\"type\": \"header\",\n\n\"parameters\": [\n{\n\"type\": \"image\",\n\"image\": {\n\"link\": \"http(s):\n}\n}\n]\n},\n{\n\"type\": \"body\",\n\"parameters\": [\n{\n\"type\": \"text\",\n\"text\": \"text-string\"\n},\n{\n\"type\": \"currency\",\n\"currency\": {\n\"fallback_value\": \"$100.99\",\n\"code\": \"USD\",\n\"amount_1000\": 100990\n}\n},\n{\n\"type\": \"date_time\",\n\"date_time\": {\n\"fallback_value\": \"February 25, 1977\",\n\n\"day_of_week\": 5,\n\"year\": 1977,\n\"month\": 2,\n\"day_of_month\": 25,\n\"hour\": 15,\n\"minute\": 33,\n\"calendar\": \"GREGORIAN\"\n}\n}\n]\n}\n]\n}\n}"
}
```

## Response schema


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

## Response examples


```json
{
  "200": {
    "raw_example": "{\n\"messaging_product\": \"whatsapp\",\n\"contacts\": [\n{\n\"input\": \"9175XXXXXXXX\",\n\"wa_id\": \"9175XXXXXXXX\"\n}\n],\n\"messages\": [\n{\n\n\"id\":\n\"wamid.HBgMOTE3OTcyODkyNzEyFQIAERgSQzAwRDEzNkQ1NDFFNkM3NkEzAA=\n=\"\n}\n]\n}\n"
  }
}
```

## 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."
  }
]
```
