> ## 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 by Phone and Template ID

> Send a WhatsApp template to a single recipient using path params phone and templateId. Provide template variables in the body. Requires x-api-key. Optional from-phone-number query to select the sender phone.



## OpenAPI

````yaml post /api/public/whatsapp/message/send/{phone}/template/{templateId}
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/{phone}/template/{templateId}:
    post:
      tags:
        - WhatsApp Message
      summary: Send a template message
      description: Send a specific template message to a given phone number.
      operationId: PublicWhatsAppMessageController_sendTemplate
      parameters:
        - name: templateId
          required: true
          in: path
          description: The template ID of the message to be sent
          schema:
            type: string
        - name: phone
          required: true
          in: path
          description: The phone number to send the message to
          schema:
            type: string
        - name: from-phone-number
          required: false
          in: query
          schema:
            type: string
        - 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/SendTemplateDto'
      responses:
        '201':
          description: Message sent successfully.
        '400':
          description: Bad request.
        '401':
          description: Unauthorized.
components:
  schemas:
    SendTemplateDto:
      type: object
      properties:
        contactName:
          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
        stageId:
          type: string
        toPhoneNumber:
          type: string
        agent_id:
          description: Agent ID to assign to the contact
          type: string
          format: uuid
          pattern: >-
            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
        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

````