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

# Submit Template for Approval

> Submit a WhatsApp template for approval. Note: it is not possible to update existing templates via API. You can manually update templates by visiting the 360dialog page via https://wabamanagement.360dialog.io



## OpenAPI

````yaml api-reference/openapi.json post /whatsapp/templates
openapi: 3.0.3
info:
  version: 0.1.0
  title: Client API
servers:
  - url: https://1-some-client.some-server.healvi-chat/third-party/v1
security:
  - bearerAuth: []
paths:
  /whatsapp/templates:
    post:
      tags:
        - whatsapp
      summary: >
        Submit a WhatsApp template for approval. Note: it is not possible to
        update existing templates via API.

        You can manually update templates by visiting the 360dialog page via
        https://wabamanagement.360dialog.io
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  description: >-
                    Name of template. Must be lowercase, allowed characters are
                    a-z, 0-9 and underscores.
                  type: string
                friendly_name:
                  description: >
                    Optional name for template without the technical naming
                    rules of the regular name. Used for display.
                  type: string
                  nullable: true
                group:
                  description: |
                    Optional group for filtering later.
                    Reserved group names are: system, restart
                  type: string
                  nullable: true
                category:
                  $ref: '#/components/schemas/WhatsappTemplateCategory'
                components:
                  $ref: '#/components/schemas/WhatsappTemplateComponents'
                agent_id:
                  description: >-
                    Optional ID of WhatsApp agent to use for creating the
                    template. Defaults to first available agent.
                  type: integer
                  nullable: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/WhatsappTemplate'
components:
  schemas:
    WhatsappTemplateCategory:
      description: >-
        Category of template. Determines cost of sending message with this
        template.
      type: string
      enum:
        - AUTHENTICATION
        - MARKETING
        - UTILITY
    WhatsappTemplateComponents:
      description: >
        Parts of the template (header, body, footer, buttons) with their
        content.

        Placeholders like {{1}} can be used per part to make template dynamic.

        Format is defined by WhatsApp. See examples on
        https://docs.360dialog.com/partner/messaging/template-messages
      type: array
      items:
        type: object
    WhatsappTemplate:
      description: >-
        Template submitted to WhatsApp for approval. Necessary to create
        business initiated conversations.
      type: object
      properties:
        id:
          type: integer
          description: Internal ID.
        agent_ids:
          description: |
            Array of agent IDs which are capable to send this template.
          type: array
          items:
            type: integer
        group:
          description: >-
            Custom group name. Can be null or any value. Useful for filtering
            when fetching all templates.
          type: string
          nullable: true
        template_id:
          description: WhatsApp internal ID.
          type: string
        namespace:
          description: WhatsApp internal namespace.
          type: string
        name:
          description: >-
            Name of template (technical, use friendly name if available for
            display).
          type: string
        friendly_name:
          description: Name of template in a friendly, readable way.
          type: string
          nullable: true
        language:
          description: Language of template.
          type: string
        category:
          $ref: '#/components/schemas/WhatsappTemplateCategory'
        status:
          description: >
            Status of template. WhatsApp decides if template is good or if it
            will be rejected.

            Only approved templates can be used to send messages.
          type: string
          enum:
            - created
            - submitted
            - approved
            - in_appeal
            - pending
            - rejected
            - pending_deletion
            - deleted
            - disabled
            - limit_exceeded
        components:
          $ref: '#/components/schemas/WhatsappTemplateComponents'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````