> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gateway.connexease.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Template Headers

> Send templates with text, image, video, document, or location headers.

A template header can be text, an image, a video, a document, or a location. If the header has a variable or media, send its value in a `header` component. The parameter type must match the header format the template was approved with.

| Header format | Parameter `type` | Value |
| :- | :- | :- |
| Text with a variable | `text` | `text` |
| Image | `image` | `image.link` — JPG or PNG, max 5 MB |
| Video | `video` | `video.link` — MP4, max 16 MB |
| Document | `document` | `document.link`, optional `document.filename` — max 100 MB |
| Location | `location` | `location.latitude`, `location.longitude`, optional `name` and `address` |

> [!NOTE]
>
> A text header without a variable needs no `header` component. Media headers always need one, because the media is set per message.

***

## Text header

```bash cURL theme={null}
curl -X POST https://api.gateway.connexease.com/v1/wa/message \
  -H "Authorization: Bearer sk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "messaging_product": "whatsapp",
    "to": "905321234567",
    "type": "template",
    "template": {
      "name": "order_confirmation",
      "language": { "code": "en" },
      "components": [
        {
          "type": "header",
          "parameters": [{ "type": "text", "text": "12345" }]
        },
        {
          "type": "body",
          "parameters": [
            { "type": "text", "text": "John" },
            { "type": "text", "text": "#12345" },
            { "type": "text", "text": "3" }
          ]
        }
      ]
    }
  }'
```

```python Python theme={null}
import requests

requests.post(
    "https://api.gateway.connexease.com/v1/wa/message",
    headers={"Authorization": "Bearer sk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "Content-Type": "application/json"},
    json={
        "messaging_product": "whatsapp",
        "to": "905321234567",
        "type": "template",
        "template": {
            "name": "order_confirmation",
            "language": {"code": "en"},
            "components": [
                {"type": "header", "parameters": [{"type": "text", "text": "12345"}]},
                {"type": "body", "parameters": [
                    {"type": "text", "text": "John"},
                    {"type": "text", "text": "#12345"},
                    {"type": "text", "text": "3"}
                ]}
            ]
        }
    }
)
```

```javascript Node.js theme={null}
await fetch('https://api.gateway.connexease.com/v1/wa/message', {
  method: 'POST',
  headers: { 'Authorization': 'Bearer sk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'Content-Type': 'application/json' },
  body: JSON.stringify({
    messaging_product: 'whatsapp',
    to: '905321234567',
    type: 'template',
    template: {
      name: 'order_confirmation',
      language: { code: 'en' },
      components: [
        { type: 'header', parameters: [{ type: 'text', text: '12345' }] },
        { type: 'body', parameters: [
          { type: 'text', text: 'John' },
          { type: 'text', text: '#12345' },
          { type: 'text', text: '3' }
        ] }
      ]
    }
  }),
});
```

***

## Image header

```bash cURL theme={null}
curl -X POST https://api.gateway.connexease.com/v1/wa/message \
  -H "Authorization: Bearer sk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "messaging_product": "whatsapp",
    "to": "905321234567",
    "type": "template",
    "template": {
      "name": "promo_announcement",
      "language": { "code": "en_US" },
      "components": [
        {
          "type": "header",
          "parameters": [
            { "type": "image", "image": { "link": "https://example.com/promo-banner.jpg" } }
          ]
        },
        {
          "type": "body",
          "parameters": [
            { "type": "text", "text": "John" },
            { "type": "text", "text": "30%" }
          ]
        }
      ]
    }
  }'
```

```python Python theme={null}
requests.post(
    "https://api.gateway.connexease.com/v1/wa/message",
    headers={"Authorization": "Bearer sk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "Content-Type": "application/json"},
    json={
        "messaging_product": "whatsapp",
        "to": "905321234567",
        "type": "template",
        "template": {
            "name": "promo_announcement",
            "language": {"code": "en_US"},
            "components": [
                {"type": "header", "parameters": [
                    {"type": "image", "image": {"link": "https://example.com/promo-banner.jpg"}}
                ]},
                {"type": "body", "parameters": [
                    {"type": "text", "text": "John"},
                    {"type": "text", "text": "30%"}
                ]}
            ]
        }
    }
)
```

```javascript Node.js theme={null}
await fetch('https://api.gateway.connexease.com/v1/wa/message', {
  method: 'POST',
  headers: { 'Authorization': 'Bearer sk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'Content-Type': 'application/json' },
  body: JSON.stringify({
    messaging_product: 'whatsapp',
    to: '905321234567',
    type: 'template',
    template: {
      name: 'promo_announcement',
      language: { code: 'en_US' },
      components: [
        { type: 'header', parameters: [{ type: 'image', image: { link: 'https://example.com/promo-banner.jpg' } }] },
        { type: 'body', parameters: [{ type: 'text', text: 'John' }, { type: 'text', text: '30%' }] }
      ]
    }
  }),
});
```

***

## Video header

```bash theme={null}
curl -X POST https://api.gateway.connexease.com/v1/wa/message \
  -H "Authorization: Bearer sk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "messaging_product": "whatsapp",
    "to": "905321234567",
    "type": "template",
    "template": {
      "name": "product_launch",
      "language": { "code": "en" },
      "components": [
        {
          "type": "header",
          "parameters": [
            { "type": "video", "video": { "link": "https://example.com/videos/launch.mp4" } }
          ]
        }
      ]
    }
  }'
```

***

## Document header

```bash theme={null}
curl -X POST https://api.gateway.connexease.com/v1/wa/message \
  -H "Authorization: Bearer sk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "messaging_product": "whatsapp",
    "to": "905321234567",
    "type": "template",
    "template": {
      "name": "invoice_ready",
      "language": { "code": "en" },
      "components": [
        {
          "type": "header",
          "parameters": [
            {
              "type": "document",
              "document": {
                "link": "https://example.com/docs/invoice.pdf",
                "filename": "invoice_october_2026.pdf"
              }
            }
          ]
        },
        {
          "type": "body",
          "parameters": [{ "type": "text", "text": "John" }]
        }
      ]
    }
  }'
```

***

## Location header

```bash theme={null}
curl -X POST https://api.gateway.connexease.com/v1/wa/message \
  -H "Authorization: Bearer sk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "messaging_product": "whatsapp",
    "to": "905321234567",
    "type": "template",
    "template": {
      "name": "pickup_point",
      "language": { "code": "en" },
      "components": [
        {
          "type": "header",
          "parameters": [
            {
              "type": "location",
              "location": {
                "latitude": 41.0082376,
                "longitude": 28.9783589,
                "name": "Taksim Pickup Point",
                "address": "Taksim, Istanbul"
              }
            }
          ]
        }
      ]
    }
  }'
```

> [!TIP]
>
> Media links must be publicly reachable over HTTPS when Meta fetches them. Signed URLs work as long as they don't expire before delivery.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.