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

# Create template video

```http
POST /template/
Authorization: Bearer <cartat_api_token>
Content-Type: application/json
```

Use a `VIDEO` header when the template needs an approved video example. Upload the video first with `POST /template/media`, then send the returned media handle in `components[].example.header_handle`.

### Example

```json
{
  "name": "product_demo_video",
  "category": "MARKETING",
  "language": "en_US",
  "components": [
    {
      "type": "HEADER",
      "format": "VIDEO",
      "example": {
        "header_handle": ["uploaded_video_handle"]
      }
    },
    {
      "type": "BODY",
      "text": "Hi {{customer_name}}, watch this short product demo.",
      "example": {
        "body_text_named_params": [
          {
            "param_name": "customer_name",
            "example": "John"
          }
        ]
      }
    }
  ]
}
```

### Required validation

| Field                                         | Rule                                        |
| --------------------------------------------- | ------------------------------------------- |
| `components[].type`                           | Required for every component.               |
| `components[].format`                         | Required for `HEADER`; use `VIDEO`.         |
| `components[].example.header_handle`          | Required for media headers.                 |
| `components[].example.body_text_named_params` | Required when body text contains variables. |
