> For the complete documentation index, see [llms.txt](https://docs.amitysolutions.com/ekoai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.amitysolutions.com/ekoai/api-reference/botv2/botv2-schema/message.md).

# Message

### Common properties

| Field      | Required | Type   | Description                         | Restriction |
| ---------- | -------- | ------ | ----------------------------------- | ----------- |
| quickReply | false    | Object | Contains quickReply **items** array |             |

#### Quick Reply - Items

| Field    | Required | Type   | Description                                                      | Restriction                                   |
| -------- | -------- | ------ | ---------------------------------------------------------------- | --------------------------------------------- |
| type     | true     | String | **action**                                                       |                                               |
| imageUrl | false    | String | URL of the icon that is displayed at the beginning of the button | <p></p><ul><li>Max characters: 1000</li></ul> |
| action   | false    | Object | Action performed when the button is tapped (see Action Schema)   |                                               |

```
"quickReply": {
  "items": [
    {
      "type": "action",
      "action": {
         "type":"message",
         "label":"Yes",
         "text":"Yes"
      }
    }
  ]
}
```

### Text Message

| Field | Required | Type   | Description  | Restriction |
| ----- | -------- | ------ | ------------ | ----------- |
| type  | true     | String | **message**  |             |
| text  | true     | String | Message text |             |

```
// Example - Text Message

{
    "type": "text",
    "text": "Hello, world"
},
{
    "type": "text",
    "text": "https://megabot-livechat-prod.s3.ap-southeast-1.amazonaws.com/%file.xlsx"
}
```

### Image Message

| Field              | Required | Type   | Description       | Restriction                             |
| ------------------ | -------- | ------ | ----------------- | --------------------------------------- |
| type               | true     | String | **image**         |                                         |
| originalContentUrl | true     | String | Image URL         | <ul><li>Max characters: 1000</li></ul>  |
| previewImageUrl    | true     | String | Preview image URL | <ul><li>Max characters: 1000 </li></ul> |

```
// Example - Text Message

{
    "type": "image",
    "originalContentUrl": "https://example.com/original.jpg",
    "previewImageUrl": "https://example.com/preview.jpg"
}
```

### **Video Message**

| Field              | Required | Type   | Description          | Restriction                             |
| ------------------ | -------- | ------ | -------------------- | --------------------------------------- |
| type               | true     | String | **video**            |                                         |
| originalContentUrl | true     | String | URL of video file    | <ul><li>Max characters: 1000</li></ul>  |
| previewImageUrl    | true     | String | URL of preview image | <ul><li>Max characters: 1000 </li></ul> |

```
{
    "type": "video",
    "originalContentUrl": "https://example.com/original.mp4",
    "previewImageUrl": "https://example.com/preview.jpg",
    "trackingId": "track_id"
}
```

### Audio Message

| Field              | Required | Type   | Description                         | Restriction                            |
| ------------------ | -------- | ------ | ----------------------------------- | -------------------------------------- |
| type               | true     | String | **audio**                           |                                        |
| originalContentUrl | true     | String | URL of audio file                   | <ul><li>Max characters: 1000</li></ul> |
| duration           | true     | Number | Length of audio file (milliseconds) |                                        |

```
{
    "type": "audio",
    "originalContentUrl": "https://example.com/original.m4a",
    "duration": 60000
}
```

### Imagemap Message

| Field           | Required | Type   | Description                            | Restriction                                   |
| --------------- | -------- | ------ | -------------------------------------- | --------------------------------------------- |
| type            | true     | String | **imagemap**                           |                                               |
| baseUrl         | true     | String | Base URL of the image                  | <p></p><ul><li>Max characters: 1000</li></ul> |
| baseSize.width  | true     | Number | Width of base image in pixels.         |                                               |
| baseSize.height | true     | Number | Height of base image in pixels.        |                                               |
| actions         | true     | Array  | Action when tapped (see Action Schema) | <ul><li>Max: 50</li></ul>                     |

```
{
  "type": "imagemap",
  "baseUrl": "https://example.com/bot/images/rm001",
  "baseSize": {
      "width": 1040,
      "height": 1040
  },
  "actions": [
      {
          "type": "uri",
          "linkUri": "https://example.com/",
          "area": {
              "x": 0,
              "y": 586,
              "width": 520,
              "height": 454
          }
      }
  ]
}
```

### Template Message

| Field    | Required | Type   | Description           | Restriction |
| -------- | -------- | ------ | --------------------- | ----------- |
| type     | true     | String | **template**          |             |
| template | true     | Object | See "Template" schema |             |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.amitysolutions.com/ekoai/api-reference/botv2/botv2-schema/message.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
