# Files

All examples below must be sent within the **body** field of a message as shown below

{% code lineNumbers="true" %}

```json
{
 "receiver": {
   "contacts": [
     {
       "identifierValue": "+31612345678"
     }
   ]
 },
 "body": {...}
}
```

{% endcode %}

## Single file message

#### Body

{% code lineNumbers="true" %}

```json
{
  "type": "file",
  "file": {
    "files": [
      {
        "contentType": "video/mp4",
        "mediaUrl": "https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2FtXMQ4lIinia9ehf4EpC4%2Fvideo.mp4?alt=media"
      }
    ]
  }
} 
```

{% endcode %}

#### MMS

Only SMS channels that are MMS capable support file messages. See [here](/api/channels-api/supported-channels/programmable-sms.md#checking-if-a-channel-is-mms-capable)

![](/files/kfZAy6AUL3Op43soRwxl)

#### WhatsApp

![](/files/akzze3DaKYQSfdmoSS05)

#### Google RCS

<div align="left"><figure><img src="/files/hgrrvaa66coQsCILOi37" alt="" width="375"><figcaption></figcaption></figure></div>

#### Facebook

![](/files/CPOspBK88tTv9MFlBP4r)

#### Instagram

![](/files/r7J3irjlO25P7NnYdufg)

#### Line

<div align="left"><figure><img src="/files/nHi5WyXrjs9DZqXFHDtn" alt=""><figcaption></figcaption></figure></div>

## Single file message with text

#### Body

{% code lineNumbers="true" %}

```json
{
  "type": "file",
  "file": {
    "text": "Single file message",
    "files": [
      {
        "contentType": "video/mp4",
        "mediaUrl": "https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2FtXMQ4lIinia9ehf4EpC4%2Fvideo.mp4?alt=media"
      }
    ]
  }
} 
```

{% endcode %}

#### MMS&#x20;

Only SMS channels that are MMS capable support file messages. See [here](/api/channels-api/supported-channels/programmable-sms.md#checking-if-a-channel-is-mms-capable)

![](/files/FxHNGh69CrfL0cRMGWvb)

#### WhatsApp

![](/files/9L9WYoPHgmtEr39xTE2Y)

#### Google RCS

<div align="left"><figure><img src="/files/ieG14adicTpmnHaWkb88" alt="" width="375"><figcaption></figcaption></figure></div>

#### Facebook

![](/files/CzZCaHRAJvU6avINbCRT)

#### **Line**

<div align="left"><figure><img src="/files/PHHnUeFtqiGfElfJFAVz" alt=""><figcaption></figcaption></figure></div>

## Multiple file message

### Multiple files message

#### Body

{% code lineNumbers="true" %}

```json
{
  "type": "file",
  "file": {
    "text": "Multiple files message",
    "files": [
      {
        "contentType": "video/mp4",
        "mediaUrl": "https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2FtXMQ4lIinia9ehf4EpC4%2Fvideo.mp4?alt=media"
      },
      {
        "contentType": "audio/m4a",
        "mediaUrl": "https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2FbgnxOoaF4aHSHUzMFCna%2Faudio.mp3?alt=media"
      }
    ]
  }
}
```

{% endcode %}

#### MMS&#x20;

Only SMS channels that are MMS capable support file messages. See [here](/api/channels-api/supported-channels/programmable-sms.md#checking-if-a-channel-is-mms-capable)

![](/files/WjMDCUCcRNzsLpdwBUkC)

#### WhatsApp

![](/files/J4RdFQ4SKzvCdGq6iXwT)

#### Google RCS

Audio/mpeg not supported on Google RCS. Application/PDF used in this example

<div align="left"><figure><img src="/files/5UYLMQW50NV1iXtCGGLK" alt="" width="375"><figcaption></figcaption></figure></div>

#### Facebook

![](/files/O14NORZNcHfjCAI8EmmS)

#### Instagram

Audio/mpeg not supported on Instagram. Audio/wav used in this example

![](/files/mXK9QC9cAOrmbwD5ArRV)

#### Line

<div align="left"><figure><img src="/files/I1J8gz9ZMs6tCUllNA8F" alt=""><figcaption></figcaption></figure></div>

### Multiple files message with filename

#### Body

{% code lineNumbers="true" %}

```json
{
  "type": "file",
  "file": {
    "text": "Multiple files message",
    "files": [
      {
        "contentType": "video/mp4",
        "mediaUrl": "https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2FtXMQ4lIinia9ehf4EpC4%2Fvideo.mp4?alt=media"
      },
      {
        "contentType": "application/pdf",
        "mediaUrl": "https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2FPnRToYX2feW96HAOrh4x%2Fdocument.pdf?alt=media",
        "filename": "passport.pdf"
      }
    ]
  }
}
```

{% endcode %}

#### WhatsApp

![](/files/ppdzakUTTRDefg4DASS6)

#### Google RCS

<div align="left"><figure><img src="/files/p9t8tqtaAmTsNtyRI4Yn" alt="" width="375"><figcaption></figcaption></figure></div>

#### Facebook

![](/files/HfGKMBgpYMPb8WRL5sJ5)

#### Line

![](/files/cEiesHt8mNSTOs2r1ZJu)

## Single file message with actions

#### Body

{% code lineNumbers="true" %}

```json
{
  "type": "file",
  "file": {
    "text": "Single file message",
    "files": [
      {
        "contentType": "video/mp4",
        "mediaUrl": "https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2FtXMQ4lIinia9ehf4EpC4%2Fvideo.mp4?alt=media"
      }
    ],
    "actions": [
      {
        "type": "postback",
        "postback": {
          "text": "Postback action"
        }
      },
      {
        "type": "reply",
        "reply": {
          "text": "Reply action"
        }
      }
    ]
  }
}
```

{% endcode %}

#### WhatsApp

![](/files/eLI4qzRyZYkpCICmCUkh)

#### Google RCS

<div align="left"><figure><img src="/files/HW5JJTHqfAULEgdLGKo0" alt="" width="375"><figcaption></figcaption></figure></div>

#### Facebook

![](/files/RTo52ARBkN80631fqQka)

#### Instagram

![](/files/Ek9Ta2WkLlo9j0OnDoZA)

## Multiple file message with actions

### Miltiple files mesage with 2 postback actions and 1 reply action

#### Body

{% code lineNumbers="true" %}

```json
{
  "type": "file",
  "file": {
    "text": "Multiple files message",
    "files": [
      {
        "contentType": "video/mp4",
        "mediaUrl": "https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2FtXMQ4lIinia9ehf4EpC4%2Fvideo.mp4?alt=media"
      },
      {
        "contentType": "application/pdf",
        "mediaUrl": "https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2FPnRToYX2feW96HAOrh4x%2Fdocument.pdf?alt=media",
        "filename": "passport.pdf"
      }
    ],
    "actions": [
      {
        "type": "postback",
        "postback": {
          "text": "Postback action 1",
          "payload": "postback-payload-1"
        }
      },
      {
        "type": "postback",
        "postback": {
          "text": "Postback action 2",
          "payload": "postback-payload-2"
        }
      },
      {
        "type": "reply",
        "reply": {
          "text": "Reply action"
        }
      }
    ]
  }
}
```

{% endcode %}

#### WhatsApp

![](/files/7Cddf3Zm0A4HgVLlnkpZ)

#### Google RCS

<div align="left"><figure><img src="/files/wwecZ88xPDoZgm2XfB36" alt="" width="375"><figcaption></figcaption></figure></div>

#### Facebook

![](/files/7nPmQuyIALyctNBEIYyL)

#### Instagram

\*PDF not supported. Example using audio/wav file

![](/files/6RAaVsXw139tx4Y2dsuS)

### Multiple files message with 4 postback actions

#### Body

{% code lineNumbers="true" %}

```json
{
  "type": "file",
  "file": {
    "files": [
      {
        "contentType": "video/mp4",
        "altText": "First file label",
        "mediaUrl": "https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2FtXMQ4lIinia9ehf4EpC4%2Fvideo.mp4?alt=media",
        "filename": "recording.mp4"
      },
      {
        "contentType": "application/pdf",
        "altText": "Second file label",
        "mediaUrl": "https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdnJZeZvhOMhDQA8SpjQM%2Fuploads%2FPnRToYX2feW96HAOrh4x%2Fdocument.pdf?alt=media",
        "filename": "passport.pdf"
      }
    ],
    "text": "Multiple files message with postback actions",
    "actions": [
      {
        "type": "postback",
        "postback": {
          "payload": "postback-payload-1",
          "text": "Postback action 1"
        }
      },
      {
        "postback": {
          "payload": "postback-payload-2",
          "text": "Postback action 2"
        },
        "type": "postback"
      },
      {
        "postback": {
          "payload": "postback-payload-3",
          "text": "Postback action 3"
        },
        "type": "postback"
      },
      {
        "postback": {
          "payload": "postback-payload-4",
          "text": "Postback action 4"
        },
        "type": "postback"
      }      
    ]
  }
}
```

{% endcode %}

#### Google RCS

<div align="left"><figure><img src="/files/MsjDRK03D3AoStixwNgr" alt="" width="375"><figcaption></figcaption></figure></div>

#### Facebook

![](/files/21itML5zHJOEQLrhI437)

#### Instagram

\*PDF not supported. Example using audio/wav file

![](/files/S59e920f3jE88qZab1KQ)


---

# 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.bird.com/api/channels-api/message-types/files.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.
