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

# Send session message

> Send text, media, location, quick reply, and list messages to users with an active MOJA session.

The **Send session message** endpoint delivers messages to users with an open conversation on WhatsApp, Facebook, Instagram, or SMS.

<Warning>
  Session messages only work inside the [24-hour active session window](/guides/moja/active-sessions). To reach users outside that window, use [Send template message](/api-reference/moja/send-template-message).
</Warning>

***

## Message types

Set `message_type` in the request body, then include the payload for that type. In most cases the payload field uses the **same name** as `message_type` (for example `"message_type": "text"` with a `"text"` string).

**Text**

| `message_type` | Payload         | Description             |
| -------------- | --------------- | ----------------------- |
| `text`         | `text` (string) | Plain text message body |

**Media** — each type uses an object with `mime_type` and a public `url`

| `message_type` | Formats                               |
| -------------- | ------------------------------------- |
| `image`        | JPEG, PNG, and other image types      |
| `document`     | PDF, DOC, CSV, and other documents    |
| `video`        | MP4 and other supported video formats |

**Location**

| `message_type` | Payload           | Description                           |
| -------------- | ----------------- | ------------------------------------- |
| `location`     | `location` object | `latitude` and `longitude` as strings |

**Interactive (WhatsApp only)**

| `message_type` | Payload              | Description          |
| -------------- | -------------------- | -------------------- |
| `quick_reply`  | `quick_reply` object | Button-style replies |
| `list`         | `list` object        | List picker menu     |

Supported `channel` values: `whatsapp`, `facebook`, `sms`, `instagram`.

***

## Sample requests

<Tabs>
  <Tab title="Text">
    ```json theme={null}
    {
      "from": "255701000000",
      "to": "255701000001",
      "channel": "whatsapp",
      "transaction_id": "4f6eec48-4140-4ce8-80c5-cef0e189578c",
      "message_type": "text",
      "text": "Hello there"
    }
    ```
  </Tab>

  <Tab title="Image">
    ```json theme={null}
    {
      "from": "255701000000",
      "to": "255701000001",
      "channel": "whatsapp",
      "transaction_id": "4f6eec48-4140-4ce8-80c5-cef0e189578c",
      "message_type": "image",
      "image": {
        "mime_type": "image/jpeg",
        "url": "https://www.example.com/photo.jpeg"
      }
    }
    ```
  </Tab>

  <Tab title="Document">
    ```json theme={null}
    {
      "from": "255701000000",
      "to": "255701000001",
      "channel": "whatsapp",
      "transaction_id": "4f6eec48-4140-4ce8-80c5-cef0e189578c",
      "message_type": "document",
      "document": {
        "mime_type": "application/pdf",
        "url": "https://www.example.com/invoice.pdf"
      }
    }
    ```
  </Tab>

  <Tab title="Video">
    ```json theme={null}
    {
      "from": "255701000000",
      "to": "255701000001",
      "channel": "whatsapp",
      "transaction_id": "4f6eec48-4140-4ce8-80c5-cef0e189578c",
      "message_type": "video",
      "video": {
        "mime_type": "video/mp4",
        "url": "https://www.example.com/clip.mp4"
      }
    }
    ```
  </Tab>

  <Tab title="Location">
    ```json theme={null}
    {
      "from": "255701000000",
      "to": "255701000001",
      "channel": "whatsapp",
      "transaction_id": "4f6eec48-4140-4ce8-80c5-cef0e189578c",
      "message_type": "location",
      "location": {
        "latitude": "-6.8178877",
        "longitude": "39.2858009"
      }
    }
    ```
  </Tab>
</Tabs>

***

## Optional fields

| Field            | Description                                                                  |
| ---------------- | ---------------------------------------------------------------------------- |
| `transaction_id` | Client reference (UUID v4) for tracking                                      |
| `callback_url`   | HTTPS URL where [inbound replies](/guides/moja/inbound-callbacks) are POSTed |

***

## Response

On success the API returns:

```json theme={null}
{
  "message": "SUCCESS"
}
```

See the [Send session message API reference](/api-reference/moja/send-session-message) for the interactive playground and full schema.
