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

# WhatsApp Templates API — Submit & Manage Templates

> Submit, manage, and sync WhatsApp Message Templates via the Vobiz API - Meta-approved formats required for all proactive business-initiated outbound messaging.

> [!WARNING]
>
> **Meta approval required** - Templates must be approved by Meta before they can be sent. Newly created templates start with status `pending`; approval typically takes a few minutes to 24 hours. [Sync templates](#sync-templates-from-meta) to pick up Meta's decision.

**Base URL:** `https://api.vobiz.ai/api/v1/Account/{auth_id}/WhatsApp`

**Authentication:** every request needs the `X-Auth-ID: MA_XXXXXXXX` and `X-Auth-Token: YOUR_AUTH_TOKEN` headers, and the `{auth_id}` in the path must be the account those credentials belong to. Set `Content-Type: application/json` on requests with a JSON body. Get your credentials from [console.vobiz.ai](https://console.vobiz.ai).

The `{channelId}` path parameter is the `id` (UUID) of the channel the templates belong to, as returned by the [Channels API](https://www.vobiz.ai/docs/whatsapp/api/channels.md).

> [!NOTE]
>
> Template create and list are always scoped to a channel under `/Channel/{channelId}/Template/`.

## Template categories

| Category | Use case |
| - | - |
| `UTILITY` | Transactional - orders, receipts, alerts |
| `MARKETING` | Promotional - offers, announcements |
| `AUTHENTICATION` | OTP and security codes only |

## List templates

```http theme={null}
GET https://api.vobiz.ai/api/v1/Account/{auth_id}/WhatsApp/Channel/{channelId}/Template/
```

Returns the channel's templates as Vobiz last saw them, sorted by name and language. The list isn't paginated: it returns every template in one response. Run [Sync templates](#sync-templates-from-meta) first to pick up review results and templates created in Meta Business Manager. This request takes no request body.

| Query param | Description |
| - | - |
| `status` | Return only templates with this status. Statuses are lowercase and the match is exact, so send `approved`, not `APPROVED`. |

```bash cURL theme={null}
curl -X GET \
  "https://api.vobiz.ai/api/v1/Account/MA_XXXXXXXX/WhatsApp/Channel/{channelId}/Template/?status=approved" \
  -H "X-Auth-ID: MA_XXXXXXXX" \
  -H "X-Auth-Token: YOUR_AUTH_TOKEN"
```

```json 200 OK theme={null}
{
  "items": [
    {
      "id": "9d8f1e2a-4c3b-4a1d-8e7f-1a2b3c4d5e6f",
      "account_id": "MA_XXXXXXXX",
      "channel_id": "0a8f3feb-9598-47f2-8a6c-df1aeb306ae1",
      "waba_id": "123456789012345",
      "meta_template_id": "1234567890123456",
      "name": "order_confirmation",
      "language": "en_US",
      "category": "UTILITY",
      "status": "approved",
      "components": [
        { "type": "BODY", "text": "Your order {{1}} has been confirmed. Delivery: {{2}}" }
      ],
      "quality_score": "",
      "created_at": "2026-10-05T11:39:13Z",
      "updated_at": "2026-10-05T16:41:37Z"
    }
  ],
  "total": 1,
  "page": 1,
  "limit": 250,
  "has_more": false
}
```

## Create template

```http theme={null}
POST https://api.vobiz.ai/api/v1/Account/{auth_id}/WhatsApp/Channel/{channelId}/Template/
```

Submit a new template to Meta for review on the channel's WABA. Vobiz saves it with status `pending`. The request body uses Meta's component format. Use double-brace numbered placeholders like `{{1}}`, `{{2}}` for dynamic content in the `BODY`. If Meta rejects the template, the request returns `400` with Meta's message. Returns `201 Created`.

### Request body

| Field | Required | Description |
| - | - | - |
| `name` | Yes | Template name, `lowercase_snake_case` |
| `language` | Yes | Language code (e.g. `en_US`) |
| `category` | Yes | `MARKETING`, `UTILITY`, or `AUTHENTICATION` |
| `components` | No | Array of component objects (Meta format) |

Each component object:

| Field | Description |
| - | - |
| `type` | `HEADER`, `BODY`, `FOOTER`, or `BUTTONS` |
| `format` | Optional. `TEXT`, `IMAGE`, `VIDEO`, or `DOCUMENT` (for `HEADER`) |
| `text` | Component text. `BODY` text may use `{{1}}`, `{{2}}` placeholders |
| `buttons` | Array of `{ type, text, url?, phone_number? }`. `type` is `QUICK_REPLY`, `URL`, or `PHONE_NUMBER` |
| `example` | Sample values: `{ "header_handle": [], "body_text": [[]] }`. A media `HEADER` needs `header_handle` from [Upload a header sample](#upload-a-header-sample). |

```bash cURL theme={null}
curl -X POST \
  "https://api.vobiz.ai/api/v1/Account/MA_XXXXXXXX/WhatsApp/Channel/{channelId}/Template/" \
  -H "X-Auth-ID: MA_XXXXXXXX" \
  -H "X-Auth-Token: YOUR_AUTH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "order_confirmation",
    "language": "en_US",
    "category": "UTILITY",
    "components": [
      {
        "type": "BODY",
        "text": "Your order {{1}} has been confirmed. Delivery: {{2}}",
        "example": { "body_text": [["ORD-12345", "March 15"]] }
      },
      {
        "type": "BUTTONS",
        "buttons": [
          { "type": "URL", "text": "Track order", "url": "https://example.com/track" }
        ]
      }
    ]
  }'
```

```json 201 Created theme={null}
{
  "id": "9d8f1e2a-4c3b-4a1d-8e7f-1a2b3c4d5e6f",
  "account_id": "MA_XXXXXXXX",
  "channel_id": "0a8f3feb-9598-47f2-8a6c-df1aeb306ae1",
  "waba_id": "123456789012345",
  "meta_template_id": "1234567890123456",
  "name": "order_confirmation",
  "language": "en_US",
  "category": "UTILITY",
  "status": "pending",
  "components": [
    {
      "type": "BODY",
      "text": "Your order {{1}} has been confirmed. Delivery: {{2}}",
      "example": { "body_text": [["ORD-12345", "March 15"]] }
    },
    {
      "type": "BUTTONS",
      "buttons": [
        { "type": "URL", "text": "Track order", "url": "https://example.com/track" }
      ]
    }
  ],
  "quality_score": "",
  "created_at": "2026-10-05T11:39:13Z",
  "updated_at": "2026-10-05T11:39:13Z"
}
```

## Upload a header sample

```http theme={null}
POST https://api.vobiz.ai/api/v1/Account/{auth_id}/WhatsApp/Template/HeaderHandle/
```

For a template with an `IMAGE`, `VIDEO`, or `DOCUMENT` header, upload sample media first. Send `multipart/form-data` with a `channel_id` field and a `file` field (up to 16 MB). Put the returned `handle` in the header component's `example.header_handle` array when you create the template.

```bash cURL theme={null}
curl -X POST \
  "https://api.vobiz.ai/api/v1/Account/MA_XXXXXXXX/WhatsApp/Template/HeaderHandle/" \
  -H "X-Auth-ID: MA_XXXXXXXX" \
  -H "X-Auth-Token: YOUR_AUTH_TOKEN" \
  -F "channel_id=0a8f3feb-9598-47f2-8a6c-df1aeb306ae1" \
  -F "file=@/path/to/banner.jpg;type=image/jpeg"
```

```json 200 OK theme={null}
{ "handle": "4::aW1hZ2UvanBlZw==:ARZ..." }
```

## Sync templates from Meta

```http theme={null}
POST https://api.vobiz.ai/api/v1/Account/{auth_id}/WhatsApp/Channel/{channelId}/Template/Sync/
```

Pulls up to 250 templates and their current statuses from the channel's WABA and saves them to your Vobiz account. Call this after creating templates in Meta Business Manager directly, or after Meta reviews a template (for example, when it moves from `pending` to `approved`). Returns the number of templates synced. This request takes no request body.

```bash cURL theme={null}
curl -X POST \
  "https://api.vobiz.ai/api/v1/Account/MA_XXXXXXXX/WhatsApp/Channel/{channelId}/Template/Sync/" \
  -H "X-Auth-ID: MA_XXXXXXXX" \
  -H "X-Auth-Token: YOUR_AUTH_TOKEN"
```

```json 200 OK theme={null}
{ "synced": 7 }
```

## Template object

| Field | Type | Description |
| - | - | - |
| `id` | UUID | Vobiz template ID. Pass it as `template_id` when you [create a campaign](https://www.vobiz.ai/docs/whatsapp/api/campaigns.md). |
| `account_id` | string | Owning account (`MA_XXXXXXXX`) |
| `channel_id` | UUID | Channel the template belongs to |
| `waba_id` | string | Meta WhatsApp Business Account ID |
| `meta_template_id` | string | Meta's template ID |
| `name` | string | Template name (`lowercase_snake_case`) |
| `language` | string | Language code (e.g. `en_US`) |
| `category` | string | Uppercase category, for example `MARKETING`, `UTILITY`, or `AUTHENTICATION` |
| `status` | string | Meta review status in lowercase, for example `approved`, `pending`, or `rejected`. Only `approved` templates can be used in campaigns. |
| `components` | array | The template's components in Meta's format |
| `quality_score` | string | Meta quality rating, for example `GREEN`. Empty until Meta reports one. |
| `created_at` | RFC3339 | Creation timestamp (UTC) |
| `updated_at` | RFC3339 | Last update timestamp (UTC) |

## Sending a template message

Creating a template does not send anything. To send an approved template, use the [Messages API](https://www.vobiz.ai/docs/whatsapp/api/send-message.md) with `type: "template"`.

```bash cURL theme={null}
curl -X POST \
  "https://api.vobiz.ai/api/v1/Account/MA_XXXXXXXX/WhatsApp/Message/" \
  -H "X-Auth-ID: MA_XXXXXXXX" \
  -H "X-Auth-Token: YOUR_AUTH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "channel_id": "{channelId}",
    "to": "+919876543210",
    "type": "template",
    "template": {
      "name": "order_confirmation",
      "language": { "code": "en_US" },
      "category": "utility",
      "components": [
        {
          "type": "body",
          "parameters": [
            { "type": "text", "text": "ORD-12345" },
            { "type": "text", "text": "March 15" }
          ]
        }
      ]
    }
  }'
```


## OpenAPI

````yaml openapi-whatsapp.yaml GET /api/v1/Account/{auth_id}/WhatsApp/Channel/{channelId}/Template/
openapi: 3.1.0
info:
  title: Vobiz WhatsApp API
  description: >
    Connect WhatsApp Business channels, submit message templates, send text,
    media and template

    messages, place and answer WhatsApp voice calls, run template campaigns, and
    manage contacts,

    canned responses, webhooks (callbacks) and media on the WhatsApp Business
    Platform through Vobiz.


    **Base URL:** `https://api.vobiz.ai/api/v1/Account/{auth_id}/WhatsApp`,
    where `{auth_id}` is your

    account Auth ID. Paths in descriptions, such as `POST /Message/`, are
    relative to it. The trailing

    slash is optional on every path.


    **Authentication:** every request needs the `X-Auth-ID` and `X-Auth-Token`
    headers. The

    `{auth_id}` in the path must be the account those credentials belong to,
    otherwise the request

    returns `403`. Send `Content-Type: application/json` on requests with a JSON
    body.


    **Conventions:** field names are snake_case. IDs that Vobiz issues
    (channels, templates,

    contacts, conversations, messages, campaigns, webhooks) are UUIDs; send them
    exactly as

    returned. Timestamps are RFC 3339 in UTC.

    Errors return a flat object with one `error` string. Authentication and
    authorization errors

    (`401` and `403`) nest a `code` and `message` under `error`.
  version: '1.0'
  contact:
    email: support@vobiz.ai
    url: https://www.vobiz.ai
servers:
  - url: https://api.vobiz.ai
    description: Production
security:
  - AuthID: []
    AuthToken: []
tags:
  - name: Channels
    description: >-
      WhatsApp Business phone numbers connected to your Vobiz account. Every
      send, template, call and campaign runs on a channel.
  - name: SIP integration
    description: >-
      Route a channel's WhatsApp voice calls over SIP to your own PBX or contact
      center instead of the browser (WebRTC) calling flow.
  - name: Templates
    description: >-
      Meta-approved message templates, the only messages you can send outside
      the 24-hour customer service window.
  - name: Numbers
    description: >-
      Search and buy WhatsApp-capable numbers from Vobiz inventory, or verify
      ownership of a number you already have (BYON).
  - name: Conversations
    description: >-
      Threads between one of your channels and one contact, with their message
      history.
  - name: Messages
    description: Send text, media and template messages.
  - name: Calls
    description: >-
      Place, answer and end WhatsApp Business voice calls with WebRTC signaling,
      and list call history.
  - name: Webhooks
    description: >-
      Subscriptions that deliver inbound messages, delivery status and call
      events to your server.
  - name: Media
    description: >-
      Upload media for outbound messages and download inbound attachments
      without handling Meta access tokens.
  - name: Contacts
    description: >-
      The people you message, with tags and custom attributes used for campaign
      targeting.
  - name: Canned responses
    description: Reusable reply snippets that inbox agents insert with a shortcut.
  - name: Campaigns
    description: >-
      Bulk sends of one approved template to a tagged, selected or full contact
      audience.
paths:
  /api/v1/Account/{auth_id}/WhatsApp/Channel/{channelId}/Template/:
    parameters:
      - $ref: '#/components/parameters/AuthId'
      - $ref: '#/components/parameters/TemplateChannelId'
    get:
      tags:
        - Templates
      summary: List templates
      description: >-
        Returns the channel's templates as Vobiz last saw them, sorted by name
        and language, in one page. Run `POST
        /Channel/{channelId}/Template/Sync/` first to pick up review results and
        templates created in Meta Business Manager. A channel that isn't on your
        account returns an empty list.
      operationId: whatsapp-list-templates
      parameters:
        - name: status
          in: query
          description: >-
            Return only templates with this status. Statuses are lowercase, for
            example `approved`, `pending` or `rejected`.
          schema:
            type: string
            example: approved
      responses:
        '200':
          description: The channel's templates.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateList'
              example:
                items:
                  - id: 9d8f1e2a-4c3b-4a1d-8e7f-1a2b3c4d5e6f
                    account_id: MA_XXXXXXXX
                    channel_id: 0a8f3feb-9598-47f2-8a6c-df1aeb306ae1
                    waba_id: '123456789012345'
                    meta_template_id: '1234567890123456'
                    name: order_confirmation
                    language: en_US
                    category: UTILITY
                    status: approved
                    components:
                      - type: BODY
                        text: 'Your order {{1}} has been confirmed. Delivery: {{2}}'
                    quality_score: ''
                    created_at: '2026-10-05T11:39:13Z'
                    updated_at: '2026-10-05T16:41:37Z'
                total: 1
                page: 1
                limit: 250
                has_more: false
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  parameters:
    AuthId:
      name: auth_id
      in: path
      required: true
      description: Your account Auth ID. It must match the `X-Auth-ID` header.
      schema:
        type: string
        example: MA_XXXXXXXX
    TemplateChannelId:
      name: channelId
      in: path
      required: true
      description: >-
        The `id` (UUID) of the channel the templates belong to, as returned by
        `GET /Channel/`.
      schema:
        type: string
        format: uuid
      example: 0a8f3feb-9598-47f2-8a6c-df1aeb306ae1
  schemas:
    TemplateList:
      type: object
      required:
        - items
        - total
        - page
        - limit
        - has_more
      properties:
        items:
          type: array
          description: >-
            Templates sorted by name, then language. Empty array when none
            match.
          items:
            $ref: '#/components/schemas/Template'
        total:
          type: integer
          description: Number of templates returned.
          example: 1
        page:
          type: integer
          description: >-
            The page number. The list returns every matching template at once,
            so this is `1`.
          example: 1
        limit:
          type: integer
          description: The page size, `250`.
          example: 250
        has_more:
          type: boolean
          description: '`false`, because the list returns every matching template at once.'
          example: false
    Template:
      type: object
      required:
        - id
        - account_id
        - channel_id
        - waba_id
        - meta_template_id
        - name
        - language
        - category
        - status
        - components
        - quality_score
        - created_at
        - updated_at
      properties:
        id:
          type: string
          format: uuid
          description: >-
            Vobiz template ID. Pass it as `template_id` when you create a
            campaign.
          example: 9d8f1e2a-4c3b-4a1d-8e7f-1a2b3c4d5e6f
        account_id:
          type: string
          example: MA_XXXXXXXX
        channel_id:
          type: string
          format: uuid
          example: 0a8f3feb-9598-47f2-8a6c-df1aeb306ae1
        waba_id:
          type: string
          example: '123456789012345'
        meta_template_id:
          type: string
          description: Meta's template ID.
          example: '1234567890123456'
        name:
          type: string
          description: Template name.
          example: order_confirmation
        language:
          type: string
          description: Template language code.
          example: en_US
        category:
          type: string
          description: >-
            Template category in uppercase, for example `MARKETING`, `UTILITY`
            or `AUTHENTICATION`.
          example: UTILITY
        status:
          type: string
          description: >-
            Meta review status in lowercase, for example `approved`, `pending`
            or `rejected`. Only `approved` templates can be used in campaigns.
          example: approved
        components:
          type: array
          description: The template's components in Meta's format.
          items:
            $ref: '#/components/schemas/TemplateComponent'
        quality_score:
          type: string
          description: Meta's quality rating. Empty until Meta reports one.
          example: GREEN
        created_at:
          type: string
          format: date-time
          example: '2026-10-05T11:39:13Z'
        updated_at:
          type: string
          format: date-time
          example: '2026-10-05T16:41:37Z'
    GatewayError:
      type: object
      description: The body of an authentication (`401`) or authorization (`403`) error.
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: integer
              description: The HTTP status code, repeated.
              example: 401
            message:
              type: string
              description: What went wrong.
              example: Invalid authentication credentials
    Error:
      type: object
      description: >-
        An error response: a flat object with one `error` string. Use the HTTP
        status code to decide how to handle the error, and log `error` for
        diagnosis.
      required:
        - error
      properties:
        error:
          type: string
          description: >-
            Human-readable explanation of the error. Branch on the HTTP status
            code rather than on this text.
          example: channel not found
    TemplateComponent:
      type: object
      description: >-
        One template component in Meta's format, for example
        `{"type":"BODY","text":"Hi {{1}}"}`. Common fields are `type` (`HEADER`,
        `BODY`, `FOOTER` or `BUTTONS`), `format`, `text`, `buttons` and
        `example`.
      additionalProperties: true
      properties:
        type:
          type: string
          description: Component type, for example `HEADER`, `BODY`, `FOOTER` or `BUTTONS`.
          example: BODY
        format:
          type: string
          description: Header format, for example `TEXT`, `IMAGE`, `VIDEO` or `DOCUMENT`.
          example: TEXT
        text:
          type: string
          description: >-
            Component text. `BODY` text may use numbered placeholders such as
            `{{1}}`.
          example: Your order {{1}} has shipped.
  responses:
    Unauthorized:
      description: Missing or invalid `X-Auth-ID` / `X-Auth-Token`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GatewayError'
          examples:
            invalid:
              summary: Invalid credentials
              value:
                error:
                  code: 401
                  message: Invalid authentication credentials
            missing:
              summary: Missing credentials
              value:
                error:
                  code: 401
                  message: >-
                    Authentication required: provide either Authorization header
                    or X-Auth-ID and X-Auth-Token headers
    Forbidden:
      description: >-
        The `{auth_id}` in the path is not the account your credentials belong
        to.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GatewayError'
          example:
            error:
              code: 403
              message: 'Access denied: account ID mismatch'
    ServerError:
      description: >-
        The request couldn't be completed. Retry it, and contact Vobiz support
        if the error persists.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    AuthID:
      type: apiKey
      in: header
      name: X-Auth-ID
      description: Your Vobiz account Auth ID (`MA_XXXXXXXX`).
    AuthToken:
      type: apiKey
      in: header
      name: X-Auth-Token
      description: Your Vobiz account Auth Token.

````

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