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

# WhatsApp Send Message API — Text, Media & Template Messages

> Send WhatsApp messages via the Vobiz REST API - text, images, video, audio, documents, stickers, and Meta-approved templates over a single endpoint.

**Authentication:** every request needs the `X-Auth-ID: MA_XXXXXXXX` and `X-Auth-Token: YOUR_AUTH_TOKEN` headers, and the `{auth_id}` in the path must be the account those credentials belong to. Send `Content-Type: application/json`.

> [!NOTE]
>
> This endpoint sends these WhatsApp message types: `text`, `template`, `image`, `video`, `audio`, `document`, and `sticker`. Set the `type` field to one of these and include the matching object (`text`, `template`, or `media`).

> [!WARNING]
>
> This endpoint sends a real message to a real person and can be charged to your account. Use your own credentials and confirm the recipient before you send.

## Endpoint

```http theme={null}
POST https://api.vobiz.ai/api/v1/Account/{auth_id}/WhatsApp/Message/
```

## Request body

| Property | Type | Required | Description |
| - | - | - | - |
| `channel_id` | string (UUID) | One of `channel_id` or `waba_id` | The WhatsApp channel to send from. If you send both, `channel_id` wins. |
| `waba_id` | string | One of `channel_id` or `waba_id` | The WhatsApp Business Account ID of the channel to send from. Used only when you don't send `channel_id`. |
| `to` | string | Required | Recipient phone number in E.164 format (e.g. `+919876543210`). A missing leading `+` is added. |
| `type` | string | Required | One of `text`, `template`, `image`, `video`, `audio`, `document`, `sticker` |
| `text` | object | When `type=text` | Text message body |
| `media` | object | For media types | Shared media object for `image`, `video`, `audio`, `document`, `sticker` |
| `template` | object | When `type=template` | Template message payload |

## Sending text messages

Send plain text messages to your customers. Provide the `text` object with a `body` field. You can send text only while a conversation with the recipient is open (see [The 24-hour conversation window](#the-24-hour-conversation-window)).

| Property | Type | Description |
| - | - | - |
| `text.body` | string | Message content. Required and can't be empty. |

```bash cURL theme={null}
curl -X POST \
  "https://api.vobiz.ai/api/v1/Account/MA_XXXXXXXX/WhatsApp/Message/" \
  -H "X-Auth-ID: MA_XXXXXXXX" \
  -H "X-Auth-Token: YOUR_AUTH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "channel_id": "0a8f3feb-9598-47f2-8a6c-df1aeb306ae1",
    "to": "+919876543210",
    "type": "text",
    "text": { "body": "Hello from Vobiz!" }
  }'
```

## Sending media messages

Send images, video, audio, documents, or stickers. All media types share a single `media` object. Supply either a public `link` (HTTPS URL) or a media `id`. Like text, media needs an open conversation with the recipient.

### Media object properties

| Property | Type | Description |
| - | - | - |
| `link` | string | Public HTTPS URL of the media file |
| `id` | string | A media ID from `POST /api/v1/Account/{auth_id}/WhatsApp/Media/` (alternative to `link`) |
| `caption` | string | Optional caption (for `image`, `video`, `document`) |
| `filename` | string | Optional file name shown to the recipient (for `document`) |

Send `id` or `link`. To get a media `id`, upload the file as `multipart/form-data` with a `channel_id` field and a `file` field (up to 16 MB):

```bash cURL - upload media theme={null}
curl -X POST \
  "https://api.vobiz.ai/api/v1/Account/MA_XXXXXXXX/WhatsApp/Media/" \
  -H "X-Auth-ID: MA_XXXXXXXX" \
  -H "X-Auth-Token: YOUR_AUTH_TOKEN" \
  -F "channel_id=0a8f3feb-9598-47f2-8a6c-df1aeb306ae1" \
  -F "file=@/path/to/invoice.pdf;type=application/pdf"
```

The response carries the ID as `media_id`, for example `{ "media_id": "1234567890123456", "type": "application/pdf" }`.

```bash cURL - image example theme={null}
curl -X POST \
  "https://api.vobiz.ai/api/v1/Account/MA_XXXXXXXX/WhatsApp/Message/" \
  -H "X-Auth-ID: MA_XXXXXXXX" \
  -H "X-Auth-Token: YOUR_AUTH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "channel_id": "0a8f3feb-9598-47f2-8a6c-df1aeb306ae1",
    "to": "+919876543210",
    "type": "image",
    "media": {
      "link": "https://example.com/photo.jpg",
      "caption": "Check this out!"
    }
  }'
```

```bash cURL - document example theme={null}
curl -X POST \
  "https://api.vobiz.ai/api/v1/Account/MA_XXXXXXXX/WhatsApp/Message/" \
  -H "X-Auth-ID: MA_XXXXXXXX" \
  -H "X-Auth-Token: YOUR_AUTH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "channel_id": "0a8f3feb-9598-47f2-8a6c-df1aeb306ae1",
    "to": "+919876543210",
    "type": "document",
    "media": {
      "link": "https://example.com/invoice.pdf",
      "filename": "invoice.pdf",
      "caption": "Your invoice"
    }
  }'
```

## Sending template messages

Send pre-approved template messages for marketing, authentication, or utility purposes. A template can always be sent, and it opens a new conversation with the recipient.

### Template object properties

| Property | Type | Description |
| - | - | - |
| `name` | string | Required. Name of an approved template on the channel's WABA |
| `language` | object | Required. Language object with a `code` field (e.g. `{ "code": "en_US" }`) |
| `category` | string | Optional. The template's category: `marketing`, `utility`, `authentication`, or `service`. Case-insensitive; defaults to `service`. |
| `components` | array | Optional. Template parameters in Meta's send format, for example a `body` component with `parameters` |

> [!NOTE]
>
> Templates must be approved by Meta before you can send them. See our [Templates Guide](https://www.vobiz.ai/docs/whatsapp/messaging/templates.md) and the [Templates API](https://www.vobiz.ai/docs/whatsapp/api/templates.md) for details.

```bash cURL - template example theme={null}
curl -X POST \
  "https://api.vobiz.ai/api/v1/Account/MA_XXXXXXXX/WhatsApp/Message/" \
  -H "X-Auth-ID: MA_XXXXXXXX" \
  -H "X-Auth-Token: YOUR_AUTH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "channel_id": "0a8f3feb-9598-47f2-8a6c-df1aeb306ae1",
    "to": "+919876543210",
    "type": "template",
    "template": {
      "name": "order_confirmation",
      "language": { "code": "en_US" },
      "category": "utility",
      "components": [{
        "type": "body",
        "parameters": [
          { "type": "text", "text": "ORD-12345" },
          { "type": "text", "text": "March 15" }
        ]
      }]
    }
  }'
```

## Response

### Success response (201 Created)

A `201` means Meta accepted the message. The body is the stored `Message` object, with `status` `pending` until delivery updates arrive.

```json theme={null}
{
  "id": "9b2e1c40-8a3d-4f5e-9c1a-7d6b2e8f4a01",
  "account_id": "MA_XXXXXXXX",
  "channel_id": "0a8f3feb-9598-47f2-8a6c-df1aeb306ae1",
  "contact_id": "4f9c2a18-3e6b-4d2f-8b1a-9e7c5d3f1a02",
  "conversation_id": "c7d1e9a3-2b4f-4a6c-8d5e-1f3a9b7c2e04",
  "direction": "outbound",
  "type": "text",
  "status": "pending",
  "content": "{\"channel_id\":\"0a8f3feb-9598-47f2-8a6c-df1aeb306ae1\",\"waba_id\":\"\",\"to\":\"+919876543210\",\"type\":\"text\",\"text\":{\"body\":\"Hello from Vobiz!\"}}",
  "meta_message_id": "wamid.HBgMOTE5ODc2NTQzMjEwFQIAERgSQzVGNkE3QjhDOUQwRTFGMkEzAA==",
  "meta_error_code": null,
  "meta_error_description": null,
  "created_at": "2026-10-16T21:23:51Z"
}
```

### Message object fields

| Field | Type | Description |
| - | - | - |
| `id` | string (UUID) | Vobiz message ID |
| `account_id` | string | Your account ID (`MA_…`) |
| `channel_id` | string (UUID) | Channel the message was sent from |
| `contact_id` | string (UUID) | Contact the message was sent to. Vobiz creates the contact if it doesn't exist. |
| `conversation_id` | string (UUID) or `null` | Conversation the message belongs to |
| `direction` | string | `outbound` for sent messages |
| `type` | string | The message type you sent (`text`, `template`, `image`, and so on) |
| `status` | string | One of `pending`, `sent`, `delivered`, `read`, `failed`. Starts as `pending`. |
| `content` | string | Your whole send request, as a JSON-encoded string. Parse it to read the body and media fields. |
| `meta_message_id` | string | The WhatsApp message ID (`wamid`) Meta assigned to the message |
| `meta_error_code` | string or `null` | Meta's error code when the message failed, otherwise `null` |
| `meta_error_description` | string or `null` | Meta's error detail when the message failed, otherwise `null` |
| `created_at` | string (RFC3339 UTC) | When the message was created |

### Common errors

* **`400 Bad Request`** - A required field is missing (for example `to`, `type`, `text.body`, the template `name` or `language.code`, or `media.id` / `media.link`), neither `channel_id` nor `waba_id` was sent, the channel was not found, no conversation is open for a text or media message, or Meta rejected the message (`error` then starts with `meta send failed`).
* **`401 Unauthorized`** - Missing or invalid authentication credentials.
* **`403 Forbidden`** - The `{auth_id}` in the path is not the account your credentials belong to.

```json 400 - no open conversation theme={null}
{ "error": "open conversation required for text messages" }
```

A `201` from Vobiz means the message was **accepted**, not delivered. A message can still end as `failed` later - watch the [`message.status`](https://www.vobiz.ai/docs/whatsapp/webhooks/events#message-status) webhook for the final state and any error reason from Meta.

When Meta reports a problem, `meta_error_code` and `meta_error_description` say what to fix. Common codes:

| Code | Meaning | What to do |
| - | - | - |
| `131042` | The WhatsApp Business account has a payment issue with Meta | Settle the account's billing in Meta Business Suite, then send again |
| `133010` | The phone number isn't registered with the WhatsApp Cloud API | Finish registering the number in Meta, then send again |
| `131026` | The message couldn't be delivered to the recipient | Check the number uses WhatsApp, and that the recipient can receive messages from businesses |
| `131047` | More than 24 hours have passed since the customer's last reply | Send an approved template to start a new conversation |
| `132001` | The template doesn't exist in that language | Check the template `name` and `language.code` against your approved templates |

For the full list, see Meta's [Cloud API error codes](https://developers.facebook.com/docs/whatsapp/cloud-api/support/error-codes/).

## The 24-hour conversation window

WhatsApp lets you send **free-form** messages (`text` and media) only while a conversation with the contact is open. A conversation opens when the contact messages you, or when you send them a template, and it stays open for **24 hours from when it started**.

* **Conversation open**: any `type` works.
* **No open conversation**: send `type: "template"`. Vobiz rejects a text or media send right away with `400` and `open conversation required for <type> messages`, so no message goes out.
* **Open a new conversation**: send an approved template. It opens a new 24-hour conversation, and you can follow up with text and media inside it.

> [!WARNING]
>
> If you are unsure whether a conversation is open, send an approved **template**. Templates are always allowed.

## Correlating delivery updates

* The response `id` is the **Vobiz** message UUID. The **Meta** ID (`wamid`) is in `meta_message_id` in the same `201` response.
* Correlate later [`message.status`](https://www.vobiz.ai/docs/whatsapp/webhooks/events#message-status) webhooks back to the send using the `wamid` (the `statuses[].id` in the webhook equals `meta_message_id`).

## Related topics

* [API Authentication →](https://www.vobiz.ai/docs/whatsapp/api/authentication.md)
* [Message Templates →](https://www.vobiz.ai/docs/whatsapp/messaging/templates.md)
* [Webhook Events →](https://www.vobiz.ai/docs/whatsapp/webhooks/events.md)
* [Channels API →](https://www.vobiz.ai/docs/whatsapp/api/channels.md)


## OpenAPI

````yaml openapi-whatsapp.yaml POST /api/v1/Account/{auth_id}/WhatsApp/Message/
openapi: 3.1.0
info:
  title: Vobiz WhatsApp API
  description: >
    Connect WhatsApp Business channels, submit message templates, send text,
    media and template

    messages, place and answer WhatsApp voice calls, run template campaigns, and
    manage contacts,

    canned responses, webhooks (callbacks) and media on the WhatsApp Business
    Platform through Vobiz.


    **Base URL:** `https://api.vobiz.ai/api/v1/Account/{auth_id}/WhatsApp`,
    where `{auth_id}` is your

    account Auth ID. Paths in descriptions, such as `POST /Message/`, are
    relative to it. The trailing

    slash is optional on every path.


    **Authentication:** every request needs the `X-Auth-ID` and `X-Auth-Token`
    headers. The

    `{auth_id}` in the path must be the account those credentials belong to,
    otherwise the request

    returns `403`. Send `Content-Type: application/json` on requests with a JSON
    body.


    **Conventions:** field names are snake_case. IDs that Vobiz issues
    (channels, templates,

    contacts, conversations, messages, campaigns, webhooks) are UUIDs; send them
    exactly as

    returned. Timestamps are RFC 3339 in UTC.

    Errors return a flat object with one `error` string. Authentication and
    authorization errors

    (`401` and `403`) nest a `code` and `message` under `error`.
  version: '1.0'
  contact:
    email: support@vobiz.ai
    url: https://www.vobiz.ai
servers:
  - url: https://api.vobiz.ai
    description: Production
security:
  - AuthID: []
    AuthToken: []
tags:
  - name: Channels
    description: >-
      WhatsApp Business phone numbers connected to your Vobiz account. Every
      send, template, call and campaign runs on a channel.
  - name: SIP integration
    description: >-
      Route a channel's WhatsApp voice calls over SIP to your own PBX or contact
      center instead of the browser (WebRTC) calling flow.
  - name: Templates
    description: >-
      Meta-approved message templates, the only messages you can send outside
      the 24-hour customer service window.
  - name: Numbers
    description: >-
      Search and buy WhatsApp-capable numbers from Vobiz inventory, or verify
      ownership of a number you already have (BYON).
  - name: Conversations
    description: >-
      Threads between one of your channels and one contact, with their message
      history.
  - name: Messages
    description: Send text, media and template messages.
  - name: Calls
    description: >-
      Place, answer and end WhatsApp Business voice calls with WebRTC signaling,
      and list call history.
  - name: Webhooks
    description: >-
      Subscriptions that deliver inbound messages, delivery status and call
      events to your server.
  - name: Media
    description: >-
      Upload media for outbound messages and download inbound attachments
      without handling Meta access tokens.
  - name: Contacts
    description: >-
      The people you message, with tags and custom attributes used for campaign
      targeting.
  - name: Canned responses
    description: Reusable reply snippets that inbox agents insert with a shortcut.
  - name: Campaigns
    description: >-
      Bulk sends of one approved template to a tagged, selected or full contact
      audience.
paths:
  /api/v1/Account/{auth_id}/WhatsApp/Message/:
    parameters:
      - $ref: '#/components/parameters/AuthId'
    post:
      tags:
        - Messages
      summary: Send a message
      description: >
        Sends a WhatsApp message from one of your channels. This sends a real
        message to a real person and can be charged. Use your own credentials
        and confirm the recipient first.


        Set `type` and include the matching object:


        - `text` with a `text` object.

        - `template` with a `template` object.

        - `image`, `video`, `audio`, `document` or `sticker` with a `media`
        object.


        Text and media are session messages: they need an open conversation with
        the recipient, which is one started by the customer's message or by your
        template within the last 24 hours. Without one, the request returns
        `400` with `open conversation required for text messages`. A template
        can always be sent and opens a new conversation.


        When the send opens a new billable conversation, Vobiz charges the
        conversation price for its category. A `201` means Meta accepted the
        message, not that it was delivered. Watch the `message.status` webhook,
        matching its `statuses[].id` to `meta_message_id`, for delivery, read
        and failure updates.
      operationId: whatsapp-send-message
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendMessageRequest'
            examples:
              text:
                summary: Text
                value:
                  channel_id: 0a8f3feb-9598-47f2-8a6c-df1aeb306ae1
                  to: '+919876543210'
                  type: text
                  text:
                    body: Hello from Vobiz!
              template:
                summary: Template
                value:
                  channel_id: 0a8f3feb-9598-47f2-8a6c-df1aeb306ae1
                  to: '+919876543210'
                  type: template
                  template:
                    name: order_confirmation
                    language:
                      code: en_US
                    category: utility
                    components:
                      - type: body
                        parameters:
                          - type: text
                            text: ORD-12345
                          - type: text
                            text: March 15
              image:
                summary: Image
                value:
                  channel_id: 0a8f3feb-9598-47f2-8a6c-df1aeb306ae1
                  to: '+919876543210'
                  type: image
                  media:
                    link: https://example.com/photo.jpg
                    caption: Check this out!
              document:
                summary: Document
                value:
                  channel_id: 0a8f3feb-9598-47f2-8a6c-df1aeb306ae1
                  to: '+919876543210'
                  type: document
                  media:
                    link: https://example.com/invoice.pdf
                    filename: invoice.pdf
                    caption: Your invoice
      responses:
        '201':
          description: >-
            Meta accepted the message. The body is the stored message, `pending`
            until status updates arrive.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Message'
              example:
                id: 9b2e1c40-8a3d-4f5e-9c1a-7d6b2e8f4a01
                account_id: MA_XXXXXXXX
                channel_id: 0a8f3feb-9598-47f2-8a6c-df1aeb306ae1
                contact_id: 4f9c2a18-3e6b-4d2f-8b1a-9e7c5d3f1a02
                conversation_id: c7d1e9a3-2b4f-4a6c-8d5e-1f3a9b7c2e04
                direction: outbound
                type: text
                status: pending
                content: >-
                  {"channel_id":"0a8f3feb-9598-47f2-8a6c-df1aeb306ae1","waba_id":"","to":"+919876543210","type":"text","text":{"body":"Hello
                  from Vobiz!"}}
                meta_message_id: wamid.HBgMOTE5ODc2NTQzMjEwFQIAERgSQzVGNkE3QjhDOUQwRTFGMkEzAA==
                meta_error_code: null
                meta_error_description: null
                created_at: '2026-10-16T21:23:51Z'
        '400':
          description: >-
            A required field is missing, the channel wasn't found, no
            conversation is open for a text or media message, your balance is
            too low to open a new conversation, or WhatsApp rejected the
            message. When WhatsApp rejects it, `error` includes WhatsApp's error
            code and message.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                missing:
                  summary: Missing field
                  value:
                    error: text.body is required for text messages
                channel:
                  summary: No channel
                  value:
                    error: channel_id or waba_id is required
                not_found:
                  summary: Channel not found
                  value:
                    error: channel not found
                window:
                  summary: No open conversation
                  value:
                    error: open conversation required for text messages
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  parameters:
    AuthId:
      name: auth_id
      in: path
      required: true
      description: Your account Auth ID. It must match the `X-Auth-ID` header.
      schema:
        type: string
        example: MA_XXXXXXXX
  schemas:
    SendMessageRequest:
      oneOf:
        - $ref: '#/components/schemas/TextMessageRequest'
        - $ref: '#/components/schemas/TemplateMessageRequest'
        - $ref: '#/components/schemas/MediaMessageRequest'
      discriminator:
        propertyName: type
        mapping:
          text: '#/components/schemas/TextMessageRequest'
          template: '#/components/schemas/TemplateMessageRequest'
          image: '#/components/schemas/MediaMessageRequest'
          video: '#/components/schemas/MediaMessageRequest'
          audio: '#/components/schemas/MediaMessageRequest'
          document: '#/components/schemas/MediaMessageRequest'
          sticker: '#/components/schemas/MediaMessageRequest'
    Message:
      type: object
      required:
        - id
        - account_id
        - channel_id
        - contact_id
        - conversation_id
        - direction
        - type
        - status
        - content
        - meta_error_code
        - meta_error_description
        - created_at
      properties:
        id:
          type: string
          format: uuid
          description: Vobiz message ID.
          example: 9b2e1c40-8a3d-4f5e-9c1a-7d6b2e8f4a01
        account_id:
          type: string
          example: MA_XXXXXXXX
        channel_id:
          type: string
          format: uuid
          example: 0a8f3feb-9598-47f2-8a6c-df1aeb306ae1
        contact_id:
          type: string
          format: uuid
          example: 4f9c2a18-3e6b-4d2f-8b1a-9e7c5d3f1a02
        conversation_id:
          type:
            - string
            - 'null'
          format: uuid
          description: The conversation the message belongs to.
          example: c7d1e9a3-2b4f-4a6c-8d5e-1f3a9b7c2e04
        direction:
          type: string
          enum:
            - inbound
            - outbound
          example: outbound
        type:
          type: string
          description: >-
            Message type, for example `text`, `template`, `image` or `document`.
            Inbound messages can also be `interactive`, `location`, `contacts`
            and other WhatsApp types.
          example: text
        status:
          type: string
          enum:
            - pending
            - sent
            - delivered
            - read
            - failed
          description: >-
            Delivery state. Outbound messages start as `pending`; inbound
            messages are `delivered`.
          example: pending
        content:
          type: string
          description: >-
            The message as a JSON-encoded string. For outbound messages it is
            the send request you made; for inbound messages it is the WhatsApp
            message object. Parse it to read the body and media fields.
          example: >-
            {"channel_id":"0a8f3feb-9598-47f2-8a6c-df1aeb306ae1","waba_id":"","to":"+919876543210","type":"text","text":{"body":"Hello
            from Vobiz!"}}
        meta_message_id:
          type: string
          description: >-
            The WhatsApp message ID (`wamid`). Status webhooks for this message
            carry it as `statuses[].id`.
          example: wamid.HBgMOTE5ODc2NTQzMjEwFQIAERgSQzVGNkE3QjhDOUQwRTFGMkEzAA==
        meta_error_code:
          type:
            - string
            - 'null'
          description: Meta's error code when the message failed, otherwise `null`.
          example: null
        meta_error_description:
          type:
            - string
            - 'null'
          description: Meta's error detail when the message failed, otherwise `null`.
          example: null
        created_at:
          type: string
          format: date-time
          example: '2026-10-16T21:23:51Z'
    Error:
      type: object
      description: >-
        An error response: a flat object with one `error` string. Use the HTTP
        status code to decide how to handle the error, and log `error` for
        diagnosis.
      required:
        - error
      properties:
        error:
          type: string
          description: >-
            Human-readable explanation of the error. Branch on the HTTP status
            code rather than on this text.
          example: channel not found
    TextMessageRequest:
      title: Text
      description: >-
        A free-form text message. You can send it only while a conversation with
        the recipient is open, that is one started by their message or by your
        template within the last 24 hours.
      allOf:
        - $ref: '#/components/schemas/SendMessageBase'
        - type: object
          required:
            - type
            - text
          properties:
            type:
              type: string
              enum:
                - text
            text:
              type: object
              required:
                - body
              properties:
                body:
                  type: string
                  minLength: 1
                  description: The message text.
                  example: Hello from Vobiz!
    TemplateMessageRequest:
      title: Template
      description: >-
        An approved template. Templates can start a new conversation, so they
        are the only type you can send to a contact outside the 24-hour window.
      allOf:
        - $ref: '#/components/schemas/SendMessageBase'
        - type: object
          required:
            - type
            - template
          properties:
            type:
              type: string
              enum:
                - template
            template:
              type: object
              required:
                - name
                - language
              properties:
                name:
                  type: string
                  description: Name of an approved template on the channel's WABA.
                  example: order_confirmation
                language:
                  type: object
                  required:
                    - code
                  properties:
                    code:
                      type: string
                      description: The template's language code.
                      example: en_US
                category:
                  type: string
                  enum:
                    - marketing
                    - utility
                    - authentication
                    - service
                  description: >-
                    The template's category, used to choose and price the
                    conversation. Case-insensitive; defaults to `service`, as
                    does any other value.
                  example: utility
                components:
                  type: array
                  description: >-
                    Template parameters in Meta's send format, for example a
                    `body` component with `parameters`. Any `example` key is
                    removed before sending.
                  items:
                    type: object
                    additionalProperties: true
                  example:
                    - type: body
                      parameters:
                        - type: text
                          text: ORD-12345
                        - type: text
                          text: March 15
    MediaMessageRequest:
      title: Media
      description: >-
        An image, video, audio file, document or sticker. Like text, you can
        send it only while a conversation with the recipient is open.
      allOf:
        - $ref: '#/components/schemas/SendMessageBase'
        - type: object
          required:
            - type
            - media
          properties:
            type:
              type: string
              enum:
                - image
                - video
                - audio
                - document
                - sticker
            media:
              type: object
              description: Send `id` or `link`.
              properties:
                id:
                  type: string
                  description: A media ID from `POST /Media/`.
                  example: '1234567890123456'
                link:
                  type: string
                  format: uri
                  description: A public HTTPS URL of the file.
                  example: https://example.com/invoice.pdf
                caption:
                  type: string
                  description: Caption, for `image`, `video` and `document`.
                  example: Your invoice
                filename:
                  type: string
                  description: File name shown to the recipient, for `document`.
                  example: invoice.pdf
    GatewayError:
      type: object
      description: The body of an authentication (`401`) or authorization (`403`) error.
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: integer
              description: The HTTP status code, repeated.
              example: 401
            message:
              type: string
              description: What went wrong.
              example: Invalid authentication credentials
    SendMessageBase:
      type: object
      description: >-
        Fields every message type shares. Identify the sending channel with
        `channel_id` or `waba_id`; when you send both, `channel_id` wins.
      required:
        - to
        - type
      properties:
        channel_id:
          type: string
          format: uuid
          description: The channel to send from. Required unless you send `waba_id`.
          example: 0a8f3feb-9598-47f2-8a6c-df1aeb306ae1
        waba_id:
          type: string
          description: >-
            The WhatsApp Business Account ID of the channel to send from. Used
            only when `channel_id` is not sent.
          example: '123456789012345'
        to:
          type: string
          description: >-
            Recipient phone number in E.164 format. A missing leading `+` is
            added.
          example: '+919876543210'
        type:
          type: string
          description: >-
            The message type. It selects which of `text`, `template` or `media`
            you send.
  responses:
    Unauthorized:
      description: Missing or invalid `X-Auth-ID` / `X-Auth-Token`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GatewayError'
          examples:
            invalid:
              summary: Invalid credentials
              value:
                error:
                  code: 401
                  message: Invalid authentication credentials
            missing:
              summary: Missing credentials
              value:
                error:
                  code: 401
                  message: >-
                    Authentication required: provide either Authorization header
                    or X-Auth-ID and X-Auth-Token headers
    Forbidden:
      description: >-
        The `{auth_id}` in the path is not the account your credentials belong
        to.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GatewayError'
          example:
            error:
              code: 403
              message: 'Access denied: account ID mismatch'
  securitySchemes:
    AuthID:
      type: apiKey
      in: header
      name: X-Auth-ID
      description: Your Vobiz account Auth ID (`MA_XXXXXXXX`).
    AuthToken:
      type: apiKey
      in: header
      name: X-Auth-Token
      description: Your Vobiz account Auth Token.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.