- An audio file uploaded to your account through the Media Storage API.
- A voicemail setting on the phone number that points at that file by its
media_name.
Custom voicemail greetings are configured per phone number. Voicemail must be enabled on the number for the greeting to play.
Prerequisites
- A Telnyx account with a phone number that has voicemail enabled.
- An API key.
- An audio file for your greeting (for example, a
.mp3or.wavrecording).
Configure a greeting in the Mission Control Portal
1
Open the phone number's voicemail settings
In the Mission Control Portal, go to Numbers > My Numbers, select the number you want to configure, and open its Voicemail settings. Make sure voicemail is enabled.
2
Upload your greeting audio
Choose the option to upload a custom greeting and select your audio file. The portal stores the file in your account’s media storage and links it to the number as the greeting.
3
Save
Save the settings. New calls that reach voicemail on this number now play your custom greeting instead of the default one.
Configure a greeting with the API
Configuring a greeting through the API is a two-step process: upload the audio to Media Storage, then point the number’s voicemail settings at it.Step 1 — Upload the greeting to Media Storage
Upload your audio file with the Media Storage API. Themedia_name you choose (or the one returned to you) is the handle you’ll reference from the voicemail settings.
Step 2 — Point the voicemail settings at your greeting
Update the number’s voicemail settings so the greetingmode is custom_greeting and media_name matches the file you uploaded.
The greeting object
Thegreeting object is accepted on both POST (create) and PATCH (update) of the voicemail settings, and it is returned on GET.
Revert to the default greeting
To go back to the standard system greeting, setmode to default. The media_name is ignored in this mode, so you can leave it out.
cURL
Troubleshooting
media_name is required when mode is custom_greeting— you setmodetocustom_greetingwithout amedia_name. Include the name of an uploaded file.- The default greeting still plays — confirm voicemail is enabled on the number, that the
media_nameexactly matches an existing file in Media Storage, and that the change was saved. Greeting changes apply to new calls that reach voicemail. mode must be one of: default, custom_greeting—modeonly accepts those two values.