Skip to main content
Use the Media API to upload and manage media files for MMS messages. Plivo supports images, videos, and other media types.

The Media Object

Attributes

media_id
string
A unique identifier for the media file.
file_name
string
The name of the uploaded file.
content_type
string
The MIME type of the media. Valid types: JPG, PNG, MP4, GIF, PDF, text.
media_url
string
The URL of the media file on Plivo’s system.
media_size
integer
Size of the media in bytes. Maximum: 2MB per file.
upload_time
string
Timestamp when the media was uploaded.
Unused media (not sent in an MMS) is automatically deleted after 6 hours. Media sent in MMS messages is retained for 1 year.

Example Media Object


Upload Media

Upload media files to be used in MMS messages. Supports up to 10 attachments per request, with a maximum of 2MB per file.

Headers

Set Content-Type to multipart/form-data.

Arguments

file
file
required
One or more files to upload (max 10 files per request).

Response


Retrieve Media

Get details of a specific media file by its ID.

Arguments

media_id
string
required
The unique identifier of the media to retrieve.

List All Media

Retrieve a paginated list of all uploaded media files.

Arguments

limit
integer
Number of results per page. Default: 20, Max: 20.
offset
integer
Number of records to skip. Default: 0.

Response