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

# 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/yhowPCxYwc7igQnrmUMj)

#### WhatsApp

![](/files/fPHzcC4EqmDHgk8rQlnQ)

#### Google RCS

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

#### Facebook

![](/files/rXLIuInh9XlnHeYuc4m9)

#### Instagram

![](/files/2BZEz2Dy4ZUtTWIeXKbZ)

#### Line

<div align="left"><figure><img src="/files/UCsIhkrrjlyKh7CenyLF" 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

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/261LSKPIkpQOOqxOo3RK)

#### WhatsApp

![](/files/zGmGi28sLJW8fOPwcA8w)

#### Google RCS

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

#### Facebook

![](/files/QQX9tbPC7FENQTvOuIeZ)

#### **Line**

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

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/Wtoq0jrUEotffVS1dqcB)

#### WhatsApp

![](/files/umpo6M6qXLFsDVrlWdUv)

#### Google RCS

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

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

#### Facebook

![](/files/q1Eq8z2ii9yTBJsCWFRz)

#### Instagram

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

![](/files/qeiyOdGRi4kT1Jq16mv1)

#### Line

<div align="left"><figure><img src="/files/RykqJCNeGrtL8AQfj8ZY" 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/p5cL2UF4A2IGLf0T0XzS)

#### Google RCS

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

#### Facebook

![](/files/N0F99RRu1plUGoGPH8Ty)

#### Line

![](/files/QOvTfQYEP9lxleWMWEOS)

## 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/DPjHDPjlaWSmhtVoeenG)

#### Google RCS

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

#### Facebook

![](/files/9RcFfwbUB5Qt6yHr5sBv)

#### Instagram

![](/files/gYOb9EabyZ3EAwSFs1RH)

## 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/6g5Ya9M28UQXttepmSTk)

#### Google RCS

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

#### Facebook

![](/files/wjGmdjhpQ1oLtB2c8aH8)

#### Instagram

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

![](/files/8H2OJ5OSyLK6woGFEQLS)

### 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/LV1t9Br429WRmkG6BImN" alt="" width="375"><figcaption></figcaption></figure></div>

#### Facebook

![](/files/PIlaU257ZDmVSAJY3hxg)

#### Instagram

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

![](/files/5OwyZDufGrAm6GApxk89)
