Adds a voicemail greeting for the user, from an uploaded file, a base64 file, or text to speech. It takes the next free index unless you send index; an index that is already used is overwritten, and index0 replaces the user's recorded name.Basic User, Advanced User, Simple User, and Call Center Agent can change their own greetings. Site Manager can change the greetings of users at its own site. Office Manager, Call Center Supervisor, Route Manager, Reseller, and Super User can change any user's. The read-only scopes get 403.The file is written on the server that handles the request, before the response, and copied to the other servers over the service bus (SBUS) file journal. The call answers 202 by default. Send synchronous=yes to get 200 with the stored file instead. With synchronous=yes the call waits up to 2 seconds for the file to appear. Every upload is converted to 8 kHz, 8-bit, mono mu-law WAV. Audio that cannot be converted returns 400 and nothing is stored.Upload a file. Send multipart/form-data with the audio in the file part (File also works). The part's Content-Type picks the decoder: audio/mpeg or audio/mp3 is decoded as MP3, audio/ogg, audio/webm, video/ogg, video/webm and application/ogg as Ogg or WebM, and anything else is read as WAV. The request can be up to 64 MB.Base64 file. Send JSON with the audio as base64 in file-base64, with no line breaks, and its format in file-encoding: audio/wav (the default), audio/mpeg, audio/ogg, or audio/webm. Base64 that does not decode, or another encoding, returns 400.Text to speech. Send JSON with the words to speak in file-script-text and no file. The voice defaults to the domain's text-to-speech voice (en-US-Wavenet-C in en-US when none is set); name another with text-to-speech-voice-id and text-to-speech-language. A voice id that the language does not offer falls back to the language's first voice. Text to speech must be enabled for the user (PORTAL_VOICE_TEXT_TO_SPEECH), or the call returns 400; text-to-speech-language must be a BCP 47 tag, or 400; a voice-service failure returns 503. Usage is billed to the owner in the path: that user, or the domain itself for a domain-owned path. List voices with GET /domains/{domain}/users/{user}/voices/{language}.With a file, file-script-text is stored as a description of the audio.A user that does not exist returns 404, and a user at its storage limit returns 507. Change a greeting with PUT on /domains/{domain}/users/{user}/greetings/{index}.
Request
Authorization
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
Path Params
Body Params
multipart/form-data
Required
Responses
🟢202Accepted
application/json
The greeting is stored on this server and is being copied to the others. Read it with GET on the collection.
Bodyapplication/json
🟢200OK
🟠400Bad Request
🟠401Authentication Required
🟠403Forbidden
🟠404Record not found
🔴507Insufficient Storage
🔴500Internal Server Error
🔴503Service Unavailable
Request Request Example
Shell
JavaScript
Java
Swift
curl--location'https://awqacore01.crexendocloud.com/ns-api/v2/domains/example.com/users/1001/greetings' \
--header'Authorization: Bearer <token>' \
--form'file=@""' \
--form'index="3"' \
--form'file-script-text="Hi, you have reached extension 1001. Please leave a message after the tone."' \
--form'synchronous="yes"'