Media

View as Markdown

The Media object represents a single attachment or media file that is associated with a Message.

To simplify sharing of the media files with external applications, the URLs to the files themselves are made publicly accessible. These URLs are random, long and hard to guess, so the contents of the media should stay private unless you choose to distribute the URL. This means that these URLS can be included in any web application to access the files without needing your credentials.

A media object is created when an incoming message is received, or an outgoing message is created, that contain one or more attachments.

Properties

account_sidstringRequiredformat: "uuid"
The unique identifier for the account.
content_typestringRequired
The content type of the media.
date_createdstringRequired
The date, in RFC 2822 GMT format, this media was created.
date_updatedstringRequired
The date, in RFC 2822 GMT format, this media was updated.
parent_sidstringRequiredformat: "uuid"
The unique identifier for the message.
sidstringRequiredformat: "uuid"
The unique identifier for the media.
uristringRequired
The URI for the media.

Example object

The Media Object
1{
2 "account_sid": "string",
3 "content_type": "string",
4 "date_created": "string",
5 "date_updated": "string",
6 "parent_sid": "string",
7 "sid": "string",
8 "uri": "string"
9}

Media size restrictions

All messages, both incoming and outgoing, are limited to 5 MB of associated media files.

Incoming messages with more than 5 MB of media are not accepted.

Outgoing messages are allowed a maximum of 10 Media files. If the total size of all Media is greater than 5 MB, the message will return an error code.