Create a greeting

Adds a greeting to the box, spoken from text by a voice or recorded, at its first free digit, and answers 201 with it. Anyone who may open the box may add one; a box holds up to 9.

Spoken: send text and tts_voice_id (a voice of GET /tts_voices), and optionally style. Try the words first with POST /tts_voices/{tts_voice_id}/preview: a greeting made right after its preview reuses that audio.

Recorded: upload the audio to /files first, then send its file_id. Here, a 16 kHz mono 16-bit PCM WAV, as phones record:

POST /files?filename=greeting.wav
Content-Type: audio/wav
Content-Length: 288044

<the WAV file's bytes>
{ "data": { "id": "2f9c4b1e-7a3d-4e5f-8b6c-0d2e4f6a8b1c", "filename": "greeting.wav", "content_type": "audio/wav", "size_bytes": 288044, "expires_at": "2026-11-25T15:30:00.000Z" } }

then

POST /voicemail_boxes/b3f1c2a9-7d4e-4a8b-9c6f-2e5d8a1b4c70/greetings
Idempotency-Key: 8e2b4d6f-1a3c-4e5a-9b7d-3f5a7c9e1b24
Content-Type: application/json

{ "file_id": "2f9c4b1e-7a3d-4e5f-8b6c-0d2e4f6a8b1c", "name": "After hours" }

The file is used once: the greeting has its own copy, and the upload is gone.

What can go wrong with the file: expired (24 hours after its upload), already used, uploaded with other credentials or in another account: 404 reference_not_found (param: file_id), upload it again. Not audio/wav or audio/mpeg: 415 media_type_unsupported. Over 10 MB: 413 request_too_large. Bytes that aren't a WAV or an MP3: 400 media_invalid, check how the file was written. POST /files itself refuses a body whose bytes don't match its Content-Type (400 media_invalid) and one over 25 MB.

make_default: true makes it the box's default greeting at once, false only adds it. Left out, it becomes the default only while callers hear the standard greeting, so a box's first greeting goes live and a later one can be prepared ahead. Send the box's etag as If-Match to add it only if the box is unchanged.

Notes:

  • Send Idempotency-Key: a retry after a lost answer then never adds a second greeting.
  • If the voice can't speak just now, the answer is 503 try_again and nothing was added.
  • Every answer carries X-Request-Id and Cache-Control: private, no-store.
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
uuid
required

The box's id, from GET /voicemail_boxes (or GET /me's extensions[].voicemail.id).

Body Params

A JSON object.

string
required
length between 1 and 1000

What the voice says, 1 to 1,000 characters. <short pause> and <breath> add a pause or a breath.

string
required

A voice of GET /tts_voices.

string | null

How the voice speaks, up to 500 characters. Left out or empty: the first of GET /tts_voices' meta.style_presets for the voice's language.

string
length between 1 and 60

1 to 60 characters, unique in the box, ignoring case. Left out: the next free "Greeting n".

boolean

true: callers hear it from now on (it becomes default_greeting_id). false: it is only added. Left out: it becomes the default only while the box is on the standard greeting, so a box's first greeting goes live and a later one can be prepared ahead.

Headers
string

The box's etag: the greeting is added only if the box is unchanged since you read it (else 412 precondition_failed).

string
length between 1 and 255

A value of yours, unique per request (a UUID is usual), 1 to 255 printable ASCII characters. Send the same key again when you retry after a lost answer: you get the first answer back, with Idempotent-Replayed: true, and the work is never done twice. Keys last 24 hours.

uuid

Send Account-Id when your credentials reach more than one account (GET /me lists them in accounts). An API key acts in its own account, and a person in one organization in theirs: neither needs it. A person in several organizations must name it on every write (400 account_required); their reads without it use their home account. Credentials with no home account in GET /me need it on every request but GET /me. An account your credentials can't act in: 403 forbidden. Empty, not an account id, or sent twice: 400 parameter_invalid. Each names Account-Id in param.

Responses

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json