v1

latestOpenAPI 3.1.1Proprietary2026-07-245895107.9 KB
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

namestring required

Audio file name

Example request

{
  "name": "My Audio File"
}

Response

Audio file created, empty content

sidstring required

Short ID

namestring required

Audio file name

durationinteger required

Duration in seconds

source'phone-record' | 'system' | 'file-upload' required

Audio file source

urlstring uri

A URL to media hosted by Callr. Unlike user-submitted endpoints, this value is generated by the API and its host varies by environment (it may not resolve to a public domain, e.g. in local development).

readonlyboolean required

System provided files cannot be modified

status'ready' | 'processing' | 'pending-content' | 'pending-conversion' | 'error' required

Audio file status

createdstring date-time required

RFC 3339, section 5.6

updatedstring date-time required

RFC 3339, section 5.6

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"
}