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

# Send a WhatsApp Template Message

> This endpoint allows you to send a WhatsApp Templated Message along with an SMS Fallback. The SMS Fallback is used if the WhatsApp message fails to deliver.



## OpenAPI

````yaml POST /transactional_messages/send_whatsapp
openapi: 3.1.0
info:
  title: Tatango API
  description: Tatango API for messaging services including WhatsApp, SMS, and MMS
  version: 1.0.0
servers:
  - url: https://api.v3.tatango.com
security:
  - apiKeyAuth: []
paths:
  /transactional_messages/send_whatsapp:
    post:
      tags:
        - Messaging
      summary: Send a WhatsApp Templated Message
      description: >-
        This endpoint allows you to send a WhatsApp Templated Message along with
        an SMS Fallback. The SMS Fallback is used if the WhatsApp message fails
        to deliver.
      requestBody:
        description: The WhatsApp Template message request with SMS fallback.
        content:
          application/json:
            schema:
              required:
                - phoneNumber
                - webhookUrl
                - whatsAppTemplateName
                - smsFailover
              type: object
              properties:
                phoneNumber:
                  $ref: '#/components/schemas/PhoneNumber'
                webhookUrl:
                  $ref: '#/components/schemas/WebhookUrl'
                whatsAppTemplateName:
                  description: >-
                    Name of your registered WhatsApp template. This must match
                    exactly.
                  type: string
                smsFailover:
                  description: The SMS fallback message to use if WhatsApp delivery fails.
                  type: object
                  required:
                    - content
                  properties:
                    content:
                      $ref: '#/components/schemas/SMSContent'
            example:
              phoneNumber: '5551234567'
              webhookUrl: https://yourpostbackaddress.com
              whatsAppTemplateName: my_template
              smsFailover:
                content: Hello world, this is my SMS fallback.
        required: true
      responses:
        '202':
          description: WhatsApp template message accepted
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/TransactionResponse'
              example:
                message: Whatsapp template sent successfully
                transactionId: 019687e1-1b54-70f4-a68a-60af7fa776f4
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
              example:
                $ref: '#/components/examples/PhoneNumberValidationError/value'
components:
  schemas:
    PhoneNumber:
      description: >-
        The destination phone number. Can be provided in any format (e.g., +1
        555-123-4567, (555) 123-4567, 5551234567) but must be a valid U.S. or
        Canadian phone number.
      type: string
    WebhookUrl:
      description: URL where webhooks will be sent. Must be a valid HTTPS URL.
      type: string
      maxLength: 255
    SMSContent:
      description: SMS message content. Must contain only GSM 7-bit characters.
      type: string
      maxLength: 160
    TransactionResponse:
      required:
        - message
        - transactionId
      type: object
      properties:
        message:
          description: Success message indicating the request was accepted.
          type: string
        transactionId:
          description: Unique transaction identifier for tracking the message.
          type: string
    ValidationError:
      required:
        - error
        - errors
      type: object
      properties:
        error:
          type: string
          example: Invalid request payload
        errors:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                description: Zod error code
                example: invalid_string
              message:
                type: string
                description: Human-readable error message
                example: Not a valid U.S. or Canadian phone number
              path:
                type: array
                items:
                  oneOf:
                    - type: string
                    - type: number
                description: Path to the field that caused the error
                example:
                  - phoneNumber
              validation:
                type: string
                description: Validation type that failed
                example: regex
              minimum:
                type: number
                description: Minimum value for numeric validations
              maximum:
                type: number
                description: Maximum value for numeric validations
              type:
                type: string
                description: Expected data type
              inclusive:
                type: boolean
                description: Whether the boundary is inclusive
              exact:
                type: boolean
                description: Whether the validation requires exact match
            required:
              - code
              - message
              - path
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Your Tatango API key. This is required for all requests to the API. You
        can find your API key in the Tatango App under My Account -> API ->
        Create API Key.

````