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

# Create WhatsApp template

> Creates a new WhatsApp message template.



## OpenAPI

````yaml /api-reference/voxys_whatsapp_swagger.json post /api/v1/accounts/{account_id}/whatsapp_templates
openapi: 3.1.0
info:
  title: Voxys Connect – Extended Features
  description: >-
    API documentation for Voxys Connect extended features: Campaigns, WhatsApp
    Templates & Flows, Appointments, Scheduled Messages, Projects, Internal
    Channels, Customer Pulse, and Reports.
  version: 1.0.0
  contact:
    email: support@voxys.ai
  license:
    name: MIT License
    url: https://opensource.org/licenses/MIT
servers:
  - url: https://connect.voxys.ai
security:
  - userApiKey: []
tags:
  - name: WhatsApp Templates
    description: Create, manage, and submit WhatsApp message templates to Meta
  - name: WhatsApp Flows
    description: Build and publish interactive WhatsApp Flows
paths:
  /api/v1/accounts/{account_id}/whatsapp_templates:
    post:
      tags:
        - WhatsApp Templates
      summary: Create WhatsApp template
      description: Creates a new WhatsApp message template.
      operationId: createWhatsappTemplate
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/whatsapp_template_create'
      responses:
        '201':
          description: Template created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/whatsapp_template'
        '401':
          $ref: '#/components/responses/unauthorized'
        '422':
          $ref: '#/components/responses/unprocessable'
components:
  schemas:
    whatsapp_template_create:
      type: object
      required:
        - name
        - category
        - language
        - whatsapp_channel_id
      properties:
        name:
          type: string
        category:
          type: string
          enum:
            - MARKETING
            - UTILITY
            - AUTHENTICATION
        language:
          type: string
          example: en_US
        whatsapp_channel_id:
          type: integer
        parameter_format:
          type: string
          enum:
            - named
            - positional
          description: Variable format style for body placeholders
        components:
          type: array
          items:
            $ref: '#/components/schemas/whatsapp_template_component'
        variable_mappings:
          type: object
          additionalProperties:
            type: string
          description: Map of variable names to contact attribute paths
    whatsapp_template:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        category:
          type: string
          enum:
            - MARKETING
            - UTILITY
            - AUTHENTICATION
        language:
          type: string
          example: en_US
        status:
          type: string
          enum:
            - draft
            - pending
            - approved
            - rejected
            - paused
        whatsapp_channel_id:
          type: integer
        parameter_format:
          type: string
          enum:
            - named
            - positional
        components:
          type: array
          items:
            $ref: '#/components/schemas/whatsapp_template_component'
        variable_mappings:
          type: object
          additionalProperties:
            type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    whatsapp_template_component:
      type: object
      properties:
        type:
          type: string
          enum:
            - HEADER
            - BODY
            - FOOTER
            - BUTTONS
            - CAROUSEL
        format:
          type: string
          enum:
            - TEXT
            - IMAGE
            - VIDEO
            - DOCUMENT
            - AUDIO
          description: Applicable to HEADER type
        text:
          type: string
        buttons:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
                enum:
                  - QUICK_REPLY
                  - URL
                  - PHONE_NUMBER
                  - COPY_CODE
              text:
                type: string
              url:
                type: string
              phone_number:
                type: string
        cards:
          type: array
          description: Cards for CAROUSEL component type
          items:
            type: object
            properties:
              components:
                type: array
                items:
                  $ref: '#/components/schemas/whatsapp_template_component'
  responses:
    unauthorized:
      description: Authentication failed – invalid or missing api_access_token
    unprocessable:
      description: Unprocessable entity – validation errors
      content:
        application/json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  type: string
  securitySchemes:
    userApiKey:
      type: apiKey
      in: header
      name: api_access_token
      description: >-
        All API requests must include the `api_access_token` header with a valid
        agent or administrator token.

````