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

# Send WhatsApp Template (Body-based v2)

> Send a WhatsApp template using a JSON payload. Include recipient, template, and variables in the body. Requires x-api-key.



## OpenAPI

````yaml post /api/public/whatsapp/message/send
openapi: 3.0.0
info:
  title: Vambe AI API
  description: Vambe AI documentation
  version: '1.0'
  contact: {}
servers:
  - url: https://api.vambe.me
    description: Production Server
security: []
tags:
  - name: Vambe AI
    description: ''
paths:
  /api/public/whatsapp/message/send:
    post:
      tags:
        - WhatsApp Message
      summary: Send a template message
      description: Send a specific template message to a given phone number.
      operationId: PublicWhatsAppMessageController_sendWhatsAppTemplate
      parameters:
        - name: x-api-key
          in: header
          description: API key needed to authorize the request
          required: true
          schema:
            type: string
      requestBody:
        required: true
        description: The payload to send with the template message
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendTemplateDtoV2'
      responses:
        '201':
          description: Message sent successfully.
        '400':
          description: Bad request.
        '401':
          description: Unauthorized.
components:
  schemas:
    SendTemplateDtoV2:
      type: object
      properties:
        contact_name:
          type: string
        email:
          description: Email of the contact
          type: string
          format: email
          pattern: >-
            ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
        variables:
          type: array
          items:
            type: string
        meta_data:
          type: object
          additionalProperties: true
        stage_id:
          type: string
        phone:
          description: Phone number to send the template to
          type: string
        template_name:
          description: Name of the template to send
          type: string
        agent_id:
          type: string
        from_phone_number:
          description: Phone number to send the template from
          type: string
        carouselVariables:
          description: Variables for carousel cards
          type: array
          items:
            type: object
            properties:
              cardIndex:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              headerVariable:
                type: string
              bodyVariables:
                type: array
                items:
                  type: string
              buttonVariables:
                type: array
                items:
                  type: string
            required:
              - cardIndex
              - headerVariable
      required:
        - variables
        - meta_data
        - phone
        - template_name

````