Upload a custom contest prompt
const url = 'https://api.caller9.app/v1/studios/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/contest-prompt?kind=caller';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'audio/*'}, body: 'binary'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url 'https://api.caller9.app/v1/studios/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/contest-prompt?kind=caller' \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: audio/*' \ --data binaryUploads raw audio as the override for one prompt slot, replacing any existing override for that slot.
Send the audio bytes as the request body with an audio/* Content-Type (defaults to audio/mpeg
if omitted). Requires a full-access key.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Studio ID (UUID).
Query Parameters
Section titled “Query Parameters”Prompt slot — pre (pre-contest message), loser (non-winning callers), or caller (announcement for a specific caller number).
Caller number for kind=caller (required then); ignored otherwise.
Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “Responses”Prompt uploaded.
object
Storage key of the uploaded audio.
Example
{ "ok": true, "kind": "caller"}The request was invalid.
object
Human-readable error message.
Machine-readable code (authentication failures only, e.g. KEY_EXPIRED, RATE_LIMITED).
Example generated
{ "error": "example", "code": "example"}Missing, invalid, expired or revoked API key.
object
Human-readable error message.
Machine-readable code (authentication failures only, e.g. KEY_EXPIRED, RATE_LIMITED).
Example generated
{ "error": "example", "code": "example"}The key isn’t allowed to do this (e.g. a read-only key making a change).
object
Human-readable error message.
Machine-readable code (authentication failures only, e.g. KEY_EXPIRED, RATE_LIMITED).
Example generated
{ "error": "example", "code": "example"}Not found, or belongs to another organization.
object
Human-readable error message.
Machine-readable code (authentication failures only, e.g. KEY_EXPIRED, RATE_LIMITED).
Example generated
{ "error": "example", "code": "example"}Too many requests for this API key. Retry after Retry-After seconds.
object
Human-readable error message.
Machine-readable code (authentication failures only, e.g. KEY_EXPIRED, RATE_LIMITED).
Example generated
{ "error": "example", "code": "example"}Headers
Section titled “Headers”Seconds until the rate-limit window resets.