Upload a voicemail greeting
PUT/v1/profiles/{profile_id}/voicemail-greeting
- Scope
calls:write
The request body is the audio file itself: MP3 or WAV, up to 5 MB and 2 minutes, at least half a second. A new greeting replaces the old one.
Parameters
Path
profile_idstringrequiredThe line (
prf_…).
Query
source"recorded" | "uploaded"uploaded(default) orrecorded.file_namestringThe file's name, for people.
Request body
The MP3 or WAV file. Content types: audio/mpeg, audio/wav, application/octet-stream.
Response
200 OKThe greeting.
object"voicemail_greeting"requiredprofile_idstringrequiredprf_…audioobject or nullrequiredThe recorded or uploaded greeting callers hear; null = they hear
text(ordefault_text) read aloud.Fields of
audiourlstringrequiredcontent_typestringrequiredsize_bytesintegerrequiredduration_secondsnumberrequiredsource"recorded" | "uploaded"requiredfile_namestring or nullrequiredcreated_attimestamprequired
textstring or nullrequireddefault_textstringrequired
Errors
| Status | Code | Means |
|---|---|---|
| 400 | unsupported_audio | The greeting isn't an MP3 or WAV file. |
| 400 | greeting_too_long | The greeting is longer than 2 minutes. |
| 400 | greeting_too_short | The greeting is shorter than half a second. |
| 400 | unreadable_audio | The audio file couldn't be read. |
| 413 | greeting_too_large | The greeting file is over 5 MB. |
| 409 | calling_not_set_up | The line has no calling. |
| 503 | storage_disabled | File storage is off on this server. |
| 400 | validation_failed | A field is missing or invalid. |
| 401 | unauthorized | The API key is missing, unknown or revoked. |
| 403 | insufficient_scope | The API key lacks the scope this needs. |
| 404 | not_found | No such object, or the key can't see it. |
Every error is { "error": { "code", "message" } }. All error codes.