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"
}
Field | Type | Description | Required |
fileName | string | File name with optional path. For example: - myAudio.wav - files/video/myVideo.mp4 | Required |
contentType | string | Must 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 aPUT
request to it with the file in the body to upload your media.
Maximum file size: 5 GB.
Returned HTTP Codes
Http Code | Description |
200 | Upload URL generated |
400 | Invalid file name or content type |
500 | Internal 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 Code | Description |
200 | Success |
500 | Internal 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/"]
}
Field | Type | Description | Required |
paths | array<string> | A list of file paths or directory paths in the media gallery to be deleted. | Required |
Returned HTTP Codes
Http Code | Description |
204 | Deleted successfully |
400 | Invalid input |
500 | Internal server error |