Skip to main content

Update voicemail

PATCH 
/phone_numbers/:phone_number_id/voicemail

Update 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 update

    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 -X PATCH '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"
}
}