Skip to content

Upload a custom Music on Hold file

PUT
/v1/studios/{studio}/moh
curl --request PUT \
--url https://api.caller9.app/v1/studios/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/moh \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: audio/*' \
--data binary

Uploads raw audio as the studio’s custom Music on Hold file, replacing any previous file. Send the audio bytes as the request body with an audio/* Content-Type (defaults to audio/mpeg if omitted). This does not change moh_mode — set moh_mode: file via PATCH /v1/studios/{studio} to use it. Requires a full-access key.

studio
required
string format: uuid

Studio ID (UUID).

Media typeaudio/*
string format: binary

File uploaded.

Media typeapplication/json
object
ok
required
boolean
r2_key
required

Storage key of the uploaded audio.

string

Example

{
"ok": true
}

The request was invalid.

Media typeapplication/json
object
error
required

Human-readable error message.

string
code

Machine-readable code (authentication failures only, e.g. KEY_EXPIRED, RATE_LIMITED).

string

Example generated

{
"error": "example",
"code": "example"
}

Missing, invalid, expired or revoked API key.

Media typeapplication/json
object
error
required

Human-readable error message.

string
code

Machine-readable code (authentication failures only, e.g. KEY_EXPIRED, RATE_LIMITED).

string

Example generated

{
"error": "example",
"code": "example"
}

The key isn’t allowed to do this (e.g. a read-only key making a change).

Media typeapplication/json
object
error
required

Human-readable error message.

string
code

Machine-readable code (authentication failures only, e.g. KEY_EXPIRED, RATE_LIMITED).

string

Example generated

{
"error": "example",
"code": "example"
}

Not found, or belongs to another organization.

Media typeapplication/json
object
error
required

Human-readable error message.

string
code

Machine-readable code (authentication failures only, e.g. KEY_EXPIRED, RATE_LIMITED).

string

Example generated

{
"error": "example",
"code": "example"
}

Too many requests for this API key. Retry after Retry-After seconds.

Media typeapplication/json
object
error
required

Human-readable error message.

string
code

Machine-readable code (authentication failures only, e.g. KEY_EXPIRED, RATE_LIMITED).

string

Example generated

{
"error": "example",
"code": "example"
}
Retry-After
integer

Seconds until the rate-limit window resets.