# Messages format

### Sending text <a href="#sending-text" id="sending-text"></a>

Use this response for sending text messages. `url`, `node` and `call` buttons can be used with text message. The `"buttons"`, `"actions"`, `"quick_replies"` properties are optional.

```
{
  "version": "v1",
  "content": {
    "messages": [
      {
        "type": "text",
        "text": "simple text with button",
        "buttons": [
          {
            "type": "url",
            "caption": "External link",
            "url": "https://rapidbott.com"
          }
        ]
      }
    ],
    "actions": [],
    "quick_replies": []
  }
}

```

### Sending image <a href="#sending-image" id="sending-image"></a>

This response is used to send image files. Messenger supports JPG, PNG and GIF images. You can use `url`, `call` and `node` buttons. The `"buttons"`, `"actions"`, `"quick_replies"` properties are optional.

```
{
  "version": "v1",
  "content": {
    "messages": [
      {
        "type": "image",
        "url": "https://example.comxxxxxxzzzzzzzzz.png",
        "buttons": []
      }
    ],
    "actions": [],
    "quick_replies": []
  }
}

```

### Sending video file <a href="#sending-video-file" id="sending-video-file"></a>

This response is used to send video files. Messenger supports videos, which are up to `25MB` in size. You can use `url`, `call` and `node` buttons. The `"buttons"`, `"actions"`, `"quick_replies"` properties are optional.

```
{
  "version": "v1",
  "content": {
    "messages": [
      {
        "type": "video",
        "url": "https://example.com/xxxxxxzzzzzzzzz.mpg",
        "buttons": []
      }
    ],
    "actions": [],
    "quick_replies": []
  }
}

```

### Sending audio file <a href="#sending-audio-file" id="sending-audio-file"></a>

This response is used to send audio files. Messenger supports audio, which are up to `25MB` in size. You can use `url`, `call` and `node` buttons. The `"buttons"`, `"actions"`, `"quick_replies"` properties are optional.

```
{
  "version": "v1",
  "content": {
    "messages": [
      {
        "type": "audio",
        "url": "https://example.com/xxxxxxzzzzzzzzz.mp3",
        "buttons": []
      }
    ],
    "actions": [],
    "quick_replies": []
  }
}


```

### Sending files <a href="#sending-files" id="sending-files"></a>

This response is used to send any other files, which are no larger than 25 MB. The `"actions"`, `"quick_replies"` properties are optional.

```
{
  "version": "v1",
  "content": {
    "messages": [
      {
        "type": "file",
        "url": "https://example.com/xxxxxxzzzzzzzzz.pdf"
      }
    ],
    "actions": [],
    "quick_replies": []
  }
}


```

### Sending gallery cards <a href="#sending-gallery-cards" id="sending-gallery-cards"></a>

This response is used to send a horizontal scrollable gallery. You can use `url`, `call` and `node` buttons. The `"action_url"`, `"buttons"`, `"actions"`, `"quick_replies"` properties are optional.

```
{
  "version": "v1",
  "content": {
    "messages": [
      {
        "type": "cards",
        "elements": [
          {
            "title": "Card title",
            "subtitle": "card text",
            "image_url": "https://example.com/xxxxxxzzzzzzzzz.png",
            "action_url": "https://rapidbott.com",
            "buttons": []
          }
        ],
        "image_aspect_ratio": "horizontal"
      }
    ],
    "actions": [],
    "quick_replies": []
  }
}


```

`action_url` - URLs starting with HTTP may not open in some browsers. We strongly suggest to use HTTPS protocol for your URLs.\ `image_aspect_ratio` - The aspect ratio used to render cards. You can use `horizontal` or `square` (default `horizontal`).


---

# Agent Instructions: 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:

```
GET https://docs.rapidbott.com/help-center/developers/dynamic-content/messages-format.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
