> For the complete documentation index, see [llms.txt](https://docs.taqnyat.sa/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.taqnyat.sa/api-reference/send-templates/send-video-template.md).

# Send Video Template

Use this endpoint to send an approved WhatsApp template that includes a **video**.

The video must be available through a public HTTP or HTTPS URL.

### Endpoint

```http
POST /messages/
```

Full URL:

```
https://api.taqnyat.sa/wa/v2/messages/
```

### Authentication

Include your Bearer Token in the request header:

```http
Authorization: Bearer <YOUR_TOKEN>
Content-Type: application/json
```

### Request Parameters

| Parameter       | Type   | Required | Description                                 |
| --------------- | ------ | -------- | ------------------------------------------- |
| `type`          | String | Yes      | Must be `video`.                            |
| `url`           | String | Yes      | Public HTTP or HTTPS URL of the video file. |
| `template.name` | String | Yes      | Name of the approved template.              |
| `code`          | String | Yes      | Language code of the template.              |

### Example Payload

```json
{
  "type": "video",
  "url": "https://example.com/videos/product-demo.mp4",
  "template": {
    "name": "product_demo"
  },
  "code": "en"
}
```

### Example Request

```bash
curl --location 'https://api.taqnyat.sa/wa/v2/messages/' \
--header 'Authorization: Bearer <YOUR_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
  "type": "video",
  "url": "https://example.com/videos/product-demo.mp4",
  "template": {
    "name": "product_demo"
  },
  "code": "en"
}'
```

### Video Requirements

The video URL should:

* Use `HTTP` or `HTTPS`.
* Be publicly accessible.
* Not require authentication or login.
* Point directly to the video file.
* Use a supported WhatsApp video format.

The current Taqnyat reference supports:

* `video/mp4`
* `video/3gpp`

with a post-processing limit of **16 MB**.

### Template Requirements

Before sending:

* The template must already be approved.
* The template must contain a video media component.
* The template name must match the approved template exactly.
* The language code must match the configured template language.
* The recipient must meet the applicable opt-in and messaging requirements.

### Response

The current Taqnyat API reference does not document the exact JSON response body for this request.

Add the actual production response after testing the endpoint in Postman.

### Message Status

After the request is accepted, use the **Delivery Status Callback** to track the message status, such as:

* `sent`
* `delivered`
* `read`
* `failed`

### Notes

* Make sure the video remains publicly accessible while the message is being processed.
* If the file cannot be retrieved or does not meet the supported format or size requirements, delivery may fail.
* Use the same approved template language and name configured in your WhatsApp account.
