Skip to main content
POST

Authorizations

Authorization
string
header
required

Pass the API key in the Authorization header, You need to put Token keyword before the API key. e.g. 'Authorization: Token '

Body

application/json
type
enum<string>
required

Kind of track. ON_HOLD_MUSIC: played to the caller while a call is on hold or being transferred. AMBIENT_SOUND: background sound played during the call. It can't be changed later.

Available options:
ON_HOLD_MUSIC,
AMBIENT_SOUND
Example:

"ON_HOLD_MUSIC"

name
string
required

Track name, 1-100 characters. "Default" is reserved.

Required string length: 1 - 100
Example:

"Calm piano"

track
string<uri>
required

URL of an audio file already uploaded to Hamsa storage: mp3, wav or ogg, at most 5 minutes long. Links to other hosts are refused.

Example:

"https://d15zjcysdf8w17.cloudfront.net/on-hold-music/2026/11/02/hold-music.mp3"

Response

Successful response

success
boolean
Example:

true

message
string
Example:

"Track created successfully"

data
object