Skip to main content

Create voicemail

POST 
/phone_numbers/:phone_number_id/voicemail

Create voicemail settings for a phone number

Request

Path Parameters

    phone_number_id stringrequired

    The ID of the phone number.

    Example: 123455678900

Body

required

Details to create

    pin string

    The pin used for voicemail

    enabled boolean

    Whether voicemail is enabled.

Responses

200: Successful response

401: Unauthorized

404: Resource not found

422: Bad request

Request samples


curl -L 'https://api.telnyx.com/v2/phone_numbers/:phone_number_id/voicemail' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"pin": 1234,
"enabled": true
}'

Response samples


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