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

string
A unique identifier for the media file.
string
The name of the uploaded file.
string
The MIME type of the media. Valid types: JPG, PNG, MP4, GIF, PDF, text.
string
The URL of the media file on Plivo’s system.
integer
Size of the media in bytes. Maximum: 2MB per file.
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
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

string
required
The unique identifier of the media to retrieve.

List All Media

Retrieve a paginated list of all uploaded media files.

Arguments

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

Response