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

# POST Create Template

> Create a new WhatsApp message template.

## Create template

`POST /api/templates`

Submit a new WhatsApp message template for approval.

### Headers

**Cookie** `string` *required*

Session cookie (login via POST /api/auth/login)

```bash cURL theme={null}
curl -X POST https://zeplo.ai/api/templates \
  -H "Cookie: connect.sid=s%3A7HImZ-T2BxWSbUsf9dtWdOlBW4rVuORO.5J0Do0NyvBu%2BkTvu1aHvtNs00BKhkpUKTwiokLS0cpw" \
  -H "Content-Type: application/json" \
  -d '{
    "channelId": "647015955153740",
    "name": "order_confirmation",
    "category": "UTILITY",
    "language": "en",
    "body": "Hi {{1}}, your order #{{2}} has been confirmed!"
  }'
```

### Body parameters

**channelId** `string` *required*

WhatsApp channel ID.

**name** `string` *required*

Template name (snake\_case, unique per channel).

**category** `string` *required*

`MARKETING`, `UTILITY`, or `AUTHENTICATION`.

**language** `string` *required*

Language code (e.g., `en`, `es`, `hi`).

**header** `object`

Header config with `type` and content.

**body** `string` *required*

Template body text with `{{N}}` placeholders.

**footer** `string`

Footer text.

**buttons** `array`

Button definitions.

### Text template

```json theme={null}
{
  "channelId": "647015955153740",
  "name": "order_confirmation",
  "category": "UTILITY",
  "language": "en",
  "body": "Hi {{1}}, your order #{{2}} has been confirmed! Estimated delivery: {{3}}.",
  "footer": "Thank you for shopping with us",
  "buttons": [
    { "type": "QUICK_REPLY", "text": "Track Order" },
    { "type": "QUICK_REPLY", "text": "Contact Support" }
  ]
}
```

### Template with image header

```json theme={null}
{
  "channelId": "647015955153740",
  "name": "promo_banner",
  "category": "MARKETING",
  "language": "en",
  "header": {
    "type": "IMAGE",
    "imageUrl": "https://example.com/banner.jpg"
  },
  "body": "Don't miss our {{1}} sale! Up to {{2}}% off.",
  "buttons": [
    { "type": "URL", "text": "Shop Now", "url": "https://shop.example.com/{{1}}" }
  ]
}
```

```json Response theme={null}
{
  "success": true,
  "data": {
    "id": 16,
    "name": "order_confirmation",
    "category": "UTILITY",
    "status": "PENDING",
    "language": "en",
    "metaTemplateId": "9876543210",
    "createdAt": "2026-01-15T12:00:00Z"
  }
}
```

> [!NOTE]
>
> Templates must be approved by WhatsApp before they can be used. Approval typically takes 24-48 hours.


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