Skip to main content

Media

The media endpoints allow you to upload, retrieve, and delete files within the media gallery associated with your workspace.

Get Upload URL

Generates a pre-signed URL that can be used to upload audio or video files to the media gallery.

Method: POST

Endpoint: https://api.revoiceit.com/media/upload-url

Request Body:

{
"fileName": "string",
"contentType": "string"
}
FieldTypeDescriptionRequired
fileNamestringFile name with optional path. For example:
- myAudio.wav
- files/video/myVideo.mp4
Required
contentTypestringMust start with audio/ or video/
Supported audio formats: wav, mp3, ogg, mpeg, m4a
Supported video formats: mp4, mov, avi, mkv, webm, flv
Required

Response:

{
/* a URL string
e.g.
"https://upload-url.com/path/to/file"
*/
}

After obtaining the uploadUrl, send a PUT request to it with the file in the body to upload your media.
Maximum file size: 5 GB.

Returned HTTP Codes

Http CodeDescription
200Upload URL generated
400Invalid file name or content type
500Internal server error

Get Media Files

Returns a list of all media files uploaded to the media gallery of your workspace.

Method: GET

Endpoint: https://api.revoiceit.com/media/files

Response:

[
"audioFile.mp3",
"files/audio/myAudio.wav",
"files/video/myVideo.mp4",
...
]

Returned HTTP Codes

Http CodeDescription
200Success
500Internal server error

Delete Media Files

Deletes one or more files, or an entire directory, from the media gallery.

Method: POST

Endpoint: https://api.revoiceit.com/media/files/delete

Request Body:

{
"paths": ["files/audio/myAudio.wav", "files/video/"]
}
FieldTypeDescriptionRequired
pathsarray<string>A list of file paths or directory paths in the media gallery to be deleted.Required

Returned HTTP Codes

Http CodeDescription
204Deleted successfully
400Invalid input
500Internal server error