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

# Send WhatsApp Message

> You can use this endpoint to send text messages, media (images, audio), or pre-approved templates to initiate conversations.



## OpenAPI

````yaml /openapi.json post /v1/wa/message
openapi: 3.1.0
info:
  title: Connexease Gateway API
  version: 1.0.0
  description: >-
    Send text, media, or pre-approved template messages to your users via
    WhatsApp. The Connexease Gateway strictly follows the official Meta WhatsApp
    Cloud API payload structure while providing enhanced features like rate
    limiting, billing validation, and unified error handling.
servers:
  - url: https://api.gateway.connexease.com
    description: Live API Gateway
security:
  - bearerAuth: []
paths:
  /v1/wa/message:
    post:
      tags: []
      summary: Send WhatsApp Message
      description: >-
        You can use this endpoint to send text messages, media (images, audio),
        or pre-approved templates to initiate conversations.
      operationId: sendMessage
      parameters:
        - name: mmlite
          in: query
          description: >-
            When set to `true`, the message will be routed through the Meta
            Marketing Messages Lite (MMLite) endpoint instead of the standard
            messages endpoint. Useful for specific high-volume marketing
            campaigns.
          required: false
          schema:
            type: boolean
            default: false
      requestBody:
        required: true
        description: >-
          The payload containing the message details. The required fields vary
          depending on the `type` of message you choose to send.
        content:
          application/json:
            schema:
              type: object
              required:
                - messaging_product
                - to
                - type
              properties:
                messaging_product:
                  type: string
                  default: whatsapp
                  description: >-
                    The messaging service used for the request. Must always be
                    exactly `"whatsapp"`.
                recipient_type:
                  type: string
                  default: individual
                  description: >-
                    The type of recipient you are sending the message to.
                    Standard value is `"individual"`.
                to:
                  type: string
                  description: >-
                    The recipient's phone number, strictly including the country
                    code **without** any spaces, plus signs, or symbols (e.g.,
                    `905xxxxxxxxx`).
                  example: '905321234567'
                type:
                  type: string
                  description: >-
                    The specific type of message you want to send. Your choice
                    here determines which of the objects below (`text`, `image`,
                    or `template`) becomes mandatory.
                  enum:
                    - text
                    - image
                    - audio
                    - template
                text:
                  type: object
                  description: >-
                    The text message object. **Required** if `type` is set to
                    `"text"`.
                  required:
                    - body
                  properties:
                    body:
                      type: string
                      description: >-
                        The actual text content of your message. Supports basic
                        WhatsApp formatting (e.g., *bold*, _italic_). Maximum
                        4096 characters.
                      example: Hello! This is a test message from Connexease.
                    preview_url:
                      type: boolean
                      description: >-
                        Set to `true` to force the rendering of URL previews if
                        your `body` text contains a valid web link. Defaults to
                        `false`.
                      default: false
                image:
                  type: object
                  description: >-
                    The media object for sending images. **Required** if `type`
                    is set to `"image"`.
                  required:
                    - link
                  properties:
                    link:
                      type: string
                      format: uri
                      description: >-
                        The publicly accessible URL of the image you want to
                        send. Must be a direct link to the file (e.g., `.jpg`,
                        `.png`).
                      example: https://fastly.picsum.photos/id/667/400/400.jpg
                    caption:
                      type: string
                      description: Optional text to display underneath the image.
                template:
                  type: object
                  description: >-
                    The template object for initiating conversations.
                    **Required** if `type` is set to `"template"`.
                  required:
                    - name
                    - language
                  properties:
                    name:
                      type: string
                      description: >-
                        The exact, approved name of your WhatsApp template as it
                        appears in your Meta Business Manager.
                      example: welcome_message_v2
                    language:
                      type: object
                      description: The language configuration for the template.
                      required:
                        - code
                      properties:
                        code:
                          type: string
                          description: >-
                            The language code of the approved template (e.g.,
                            `en`, `en_US`, `tr`).
                          example: en
                    components:
                      type: array
                      description: >-
                        An array of component objects containing the dynamic
                        variables (parameters) for your template's header, body,
                        or buttons.
                      items:
                        type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - header
                              - body
                              - button
                            description: >-
                              Describes which part of the template this
                              component targets.
                          parameters:
                            type: array
                            description: >-
                              The list of dynamic values to inject into the
                              template.
                            items:
                              type: object
      responses:
        '200':
          description: >-
            A successful request returns an HTTP `200 OK` status. Note that the
            Connexease Gateway automatically wraps the official Meta response
            inside a unified `data` object and injects an `isSuccess` flag for
            easier parsing.
          content:
            application/json:
              schema:
                type: object
                properties:
                  isSuccess:
                    type: boolean
                    example: true
                    description: >-
                      Gateway-level boolean flag indicating the payload was
                      accepted and forwarded to Meta.
                  data:
                    type: object
                    description: The standard Meta WhatsApp Cloud API response object.
                    properties:
                      messaging_product:
                        type: string
                        example: whatsapp
                      contacts:
                        type: array
                        items:
                          type: object
                          properties:
                            input:
                              type: string
                              example: '905321234567'
                            wa_id:
                              type: string
                              example: '905321234567'
                      messages:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              description: >-
                                The unique Meta WhatsApp Message ID (wamid)
                                assigned to this outbound message.
                              example: >-
                                wamid.HBgMOTA1Mzk4ODM2MTgwFQIAEhgUM0E4OTNENzMzOTJBMzc1N0QyNDcA
        '400':
          description: >-
            Bad Request. The payload is missing required fields, contains
            invalid formatting (like a malformed phone number), or specifies an
            unsupported media type.
        '401':
          description: >-
            Unauthorized. The API Key provided in the Authorization header is
            missing, invalid, or expired.
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Enter your API key provided by the Connexease Dashboard.

````