The Media API can be used to query, download and delete media items such as audio files for use with other Nexmo APIs.
Retrieve information about multiple media items with the ability to search and paginate.
GET
https://api.nexmo.com/v3/media
Host
https://api.nexmo.com
GET
/v3/media
The order of search results.
Must be one of:ascending
or descending
Which page to retrieve in pagination
How many items at most per page
Retrieve results created on or after this timestap.
Retrieve results created on or before this timestamp.
The amount of records returned in this response.
The page_index
used in your request.
The total number of records returned by your request.
A collection of media items. See retrieve a media item for a description of the returned fields
A UUID representing the object.
The filename of the object as it was originally uploaded.
The IETF MIME type of the file.
The ID of your Nexmo account. This is the same as your API key.
An internal identifier of how the file is stored.
The maximum number of times the file may be downloaded.
The number of times the file has been downloaded.
An identifier for the content. This will change if the content of the file has been changed (i.e. if you upload a new version of the file). For more information see Wikipedia: HTTP ETag
The size of the file in bytes
A timestamp for the time that the file was created
A timestamp for the time that the file was last modified
Whether the item is available for download without authentication.
A user set string containing metadata about the media file.
A user set string containing further metadata about the media file.
{
"page_size": 20,
"page_index": 0,
"_links": {
"self": {
"href": "/v3/media?page_size=20&account_id=abcd1234&order=descending"
},
"first": {
"href": "/v3/media?page_size=20&account_id=abcd1234&order=descending"
},
"last": {
"href": "/v3/media?page_size=20&account_id=abcd1234&order=descending"
}
},
"count": 1,
"_embedded": {
"media": [
{
"id": "aaaaaaaa-bbbb-cccc-dddd-0123456789ab",
"original_file_name": "test.wav",
"mime_type": "audio/vnd.wave",
"account_id": "abcd1234",
"store_id": "s3",
"max_downloads_allowed": 0,
"times_downloaded": 1,
"etag": "aaaaaaaabbbbccccdddd0123456789ab",
"media_size": 1234567,
"time_created": "2020-01-01T14:00:00.000Z",
"time_last_updated": "2020-01-01T14:00:00.000Z",
"public": false,
"metadata_primary": "abc123",
"metadata_secondary": "abc123"
}
]
}
}
Retrieve information about a single media item
GET
https://api.nexmo.com/v3/media/:id/info
Host
https://api.nexmo.com
GET
/v3/media/:id/info
A UUID representing the object.
The filename of the object as it was originally uploaded.
The IETF MIME type of the file.
The ID of your Nexmo account. This is the same as your API key.
An internal identifier of how the file is stored.
The maximum number of times the file may be downloaded.
The number of times the file has been downloaded.
An identifier for the content. This will change if the content of the file has been changed (i.e. if you upload a new version of the file). For more information see Wikipedia: HTTP ETag
The size of the file in bytes
A timestamp for the time that the file was created
A timestamp for the time that the file was last modified
Whether the item is available for download without authentication.
A user set string containing metadata about the media file.
A user set string containing further metadata about the media file.
{
"id": "aaaaaaaa-bbbb-cccc-dddd-0123456789ab",
"original_file_name": "test.wav",
"mime_type": "audio/vnd.wave",
"account_id": "abcd1234",
"store_id": "s3",
"max_downloads_allowed": 0,
"times_downloaded": 1,
"etag": "aaaaaaaabbbbccccdddd0123456789ab",
"media_size": 1234567,
"time_created": "2020-01-01T14:00:00.000Z",
"time_last_updated": "2020-01-01T14:00:00.000Z",
"public": false,
"metadata_primary": "abc123",
"metadata_secondary": "abc123"
}
Update a previously created media item by ID.
PUT
https://api.nexmo.com/v3/media/:id/info
Host
https://api.nexmo.com
PUT
/v3/media/:id/info
Whether the item is publicly available without authentication.
A string containing metadata about the media file.
A string containing further metadata about the media file.
A string containing a title for the media file.
A description of the media file.
The MIME type of the media file.
The maximum number of times the file may be downloaded. Unlimited when not provided.
{
"public": true,
"metadata_primary": "foo,bar",
"metadata_secondary": "123",
"title": "Very important recording",
"description": "This is a very important recording. Do not delete.",
"mime_type": "audio/vnd.wave",
"max_downloads_allowed": 100
}
Successfully updated
Delete a previously created media item by ID.
DELETE
https://api.nexmo.com/v3/media/:id
Host
https://api.nexmo.com
DELETE
/v3/media/:id
Successfully deleted