> ## 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.

# Overview

## 🔽 `POST /api/public/web-whatsapp-message/send/{phoneId}/message` – Send a Web WhatsApp Message

Sends a message from a connected WhatsApp Web session using the specified `phoneId`.

Click to expand full details

### 🔹 URL

```
POST /api/public/web-whatsapp-message/send/{phoneId}/message
```

***

### 🔹 Path Parameters

| Name      | Type   | Required | Description                                              |
| --------- | ------ | -------- | -------------------------------------------------------- |
| `phoneId` | string | ✅        | The ID of the phone sending the message via WhatsApp Web |

***

### 🔹 Query Parameters

| Name        | Type   | Required | Description                                         |
| ----------- | ------ | -------- | --------------------------------------------------- |
| `message`   | string | ✅        | The content of the message you want to send         |
| `stage`     | string | ❌        | Contextual tag for the message (e.g., `"checkout"`) |
| `x-api-key` | string | ✅        | Your API key for authenticating the request         |

***

### 🔹 Body

| Name    | Type   | Required | Description                                      |
| ------- | ------ | -------- | ------------------------------------------------ |
| `phone` | string | ✅        | The Phone Number you want to send the message to |

***

### 🔹 Example Request (cURL)

<CodeGroup>
  ````bash bash curl --request POST \ theme={null}
  'https://iris-backend-production.up.railway.app/api/public/web-whatsapp-message/send/abc123/message?message=Hello%20world&stage=welcome'
  \ --header 'x-api-key: YOUR_API_KEY' \ --header 'content-type:
  application/json' ```
  </CodeGroup>

  Replace:

  - `abc123` with your actual `phoneId`
  - `YOUR_API_KEY` with your real API key
  - `message` and `stage` as needed

  ---

  ### 🔹 Notes

  - The phone must be connected and authenticated via WhatsApp Web.
  - This endpoint is useful for real-time messages triggered by events on your own platform
  - Avoid excessive usage to prevent rate-limiting.

  ---

  ## 🔽 `POST /api/public/ticket/open/web-whatsapp/{phoneId}` – Open a New Ticket

  Creates a ticket linked to a specific WhatsApp phone sender. Includes support for metadata, contact info, and message content.

  Click to expand full details

  ### 🔹 URL

  ````

  POST /api/public/ticket/open/web-whatsapp/{phoneId}

  ````

  ---

  ### 🔹 Path Parameters

  | Name      | Type   | Required | Description                                    |
  | --------- | ------ | -------- | ---------------------------------------------- |
  | `phoneId` | string | ✅       | The phone ID used to send the WhatsApp message |

  ---

  ### 🔹 Body Parameters

  | Field              | Type   | Required | Description                                    |
  | ------------------ | ------ | -------- | ---------------------------------------------- |
  | `contact_name`     | string | ❌       | Name of the contact                            |
  | `to_phone_number`  | string | ✅       | WhatsApp number of the recipient               |
  | `contact_metadata` | object | ❌       | Optional extra info about the contact          |
  | `ticket_metadata`  | object | ❌       | Optional structured data about the ticket      |
  | `email`            | string | ❌       | Email address linked to the ticket             |
  | `message`          | object | ❌       | Initial message content                        |
  | `stage_id`         | string | ✅       | UUID of the pipeline stage where ticket starts |

  ---

  ### 🔹 Example Request

  <CodeGroup>
    ```bash bash
    curl --request POST \
      'https://iris-backend-production.up.railway.app/api/public/ticket/open/web-whatsapp/phone_123' \
      --header 'Content-Type: application/json' \
      --data-raw '{

        }
      '

  ````
</CodeGroup>

***

### 🔹 Success Response

🟢 200 Ticket created successfully

***

[🔐 API Key](/docs/integration-to-the-api)

[💻 WhatsApp API](/docs/whatsapp-api)

Ask AI

* [Table of Contents](#)

* * [🔽 POST /api/public/web-whatsapp-message/send/\{phoneId}/message – Send a Web WhatsApp Message](#-post-apipublicweb-whatsapp-messagesendphoneidmessage--send-a-web-whatsapp-message)
  * [🔽 POST /api/public/ticket/open/web-whatsapp/\{phoneId} – Open a New Ticket](#-post-apipublicticketopenweb-whatsappphoneid--open-a-new-ticket)

```
```
