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

# Queue an approved WhatsApp template

> Requires `whatsapp_templates:send`. The response acknowledges queued work, not delivery.



## OpenAPI

````yaml /openapi.json post /whatsapp-templates/{channelId}/send
openapi: 3.0.3
info:
  title: Visito M2M API
  version: 1.0.0
  description: >-
    Tenant-scoped server-to-server API for channels, conversations, commerce,
    custom AI tools, and WhatsApp templates. Send operations are asynchronous
    and return queued acknowledgements. Expansion adds conversation controls,
    knowledge, sales opportunities, delivery status, reporting, and signed
    webhooks.
servers:
  - url: https://platform-api.visitoai.com/m2m/v1
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Channels
  - name: Conversations
  - name: Commerce
  - name: Custom tools
  - name: WhatsApp templates
  - name: Properties
  - name: Knowledge
  - name: Sales CRM
  - name: Delivery
  - name: Reporting
  - name: Webhooks
paths:
  /whatsapp-templates/{channelId}/send:
    post:
      tags:
        - WhatsApp templates
      summary: Queue an approved WhatsApp template
      description: >-
        Requires `whatsapp_templates:send`. The response acknowledges queued
        work, not delivery.
      operationId: sendWhatsappTemplate
      parameters:
        - $ref: '#/components/parameters/ChannelId'
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WhatsappTemplateSendRequest'
      responses:
        '202':
          description: Template send accepted and queued
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueuedTemplateSend'
        '429':
          description: >-
            Rolling 24-hour channel limit reached. Inspect
            `error.details.retryAfterSeconds`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        default:
          $ref: '#/components/responses/Error'
components:
  parameters:
    ChannelId:
      name: channelId
      in: path
      required: true
      schema:
        type: string
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: true
      description: >-
        Stable key for one intended outbound operation. Reuse it only with an
        identical request.
      schema:
        type: string
        minLength: 1
  schemas:
    WhatsappTemplateSendRequest:
      type: object
      required:
        - to
        - template
      properties:
        to:
          type: string
          maxLength: 32
        template:
          type: object
          required:
            - name
            - language
          properties:
            name:
              type: string
            language:
              type: object
              required:
                - code
              properties:
                code:
                  type: string
            components:
              type: array
              items:
                type: object
                additionalProperties: true
      additionalProperties: false
    QueuedTemplateSend:
      allOf:
        - $ref: '#/components/schemas/QueuedReply'
        - type: object
          required:
            - conversationKey
          properties:
            conversationKey:
              type: string
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              example: M2M_AUTH_INSUFFICIENT_SCOPE
            message:
              type: string
            details:
              type: object
              additionalProperties: true
      example:
        error:
          code: M2M_AUTH_INSUFFICIENT_SCOPE
          message: M2M credential does not have required scope.
          details:
            requiredScopes:
              - conversations:write
            missingScopes:
              - conversations:write
    QueuedReply:
      type: object
      required:
        - accepted
        - replyId
        - conversationId
        - requestEventId
        - correlationId
        - status
        - acceptedAt
      properties:
        accepted:
          type: boolean
          enum:
            - true
        replyId:
          type: string
        conversationId:
          type: string
        requestEventId:
          type: string
        correlationId:
          type: string
        status:
          type: string
          enum:
            - queued
        acceptedAt:
          type: string
          format: date-time
  responses:
    Error:
      description: Structured error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Visito M2M API key
      description: Server-side tenant-scoped credential created from Build > API Keys.

````