Get voicemail
Returns the voicemail settings for a phone number
GET
JavaScript
JavaScript
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Check out our upcoming events and meetups! View events →
Returns the voicemail settings for a phone number
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const voicemail = await client.phoneNumbers.voicemail.retrieve('123455678900');
console.log(voicemail.data);{
"data": {
"enabled": true,
"pin": "1234"
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The ID of the phone number.
Successful response
Show child attributes
{ "enabled": true, "pin": "1234" }Was this page helpful?
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const voicemail = await client.phoneNumbers.voicemail.retrieve('123455678900');
console.log(voicemail.data);{
"data": {
"enabled": true,
"pin": "1234"
}
}