Audio Files
Upload audio file
Upload a new audio file. To upload an audio file, the body should be a multipart/form-data. If you're sending an application/json body, you can only specify the name of the new audio file. The content will be empty (the status property will be set to pending-content). In this scenario, you should use the POST /audio-files/{sid}/file method to upload the file content.
When sending a multipart/form-data body, the content will be processed asynchronously. The status property of the resulting audio file will transition through the following stages:
- pending-conversion
- processing
- Finally, it will be either ready or error
The supported formats are audio/flac, audio/mpeg, audio/mp4, audio/ogg, audio/wav.
You can use webhooks to receive updates on the status.
post/audio-files
Request body
Example request
{
"name": "My Audio File"
}Response
Audio file created, empty content
Example response
{
"sid": "callrsid",
"name": "My Audio File",
"duration": 42,
"source": "system",
"url": "https://media.callr.com/library/1214981-F54777F6.mp3",
"readonly": true,
"status": "ready",
"created": "2024-04-24T17:42:28Z",
"updated": "2024-04-24T17:42:28Z"
}