Skip to main content
POST
/
phone_numbers
/
{phone_number_id}
/
voicemail
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: 'My API Key',
});

const voicemail = await client.phoneNumbers.voicemail.create('123455678900');

console.log(voicemail.data);
{
  "data": {
    "enabled": "true",
    "pin": "1234"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

phone_number_id
string
required

The ID of the phone number.

Body

application/json

Details to create

pin
string

The pin used for voicemail

Example:

1234

enabled
boolean

Whether voicemail is enabled.

Example:

true

Response

Successful response

data
object
Example:
{ "enabled": "true", "pin": "1234" }