---
title: "Update voicemail"
method: PATCH
path: "/phone_numbers/{phone_number_id}/voicemail"
tags: ["Voicemail"]
---

# Update voicemail

`PATCH /phone_numbers/{phone_number_id}/voicemail`

Update voicemail settings for a phone number. You can also configure a custom greeting by setting the `greeting` object: use `mode` `custom_greeting` together with a `media_name` that points to an audio file uploaded through the Media Storage API, or `mode` `default` to use the standard system greeting.

## Request body

- VoicemailRequest
  - `enabled` boolean — Whether voicemail is enabled.
  - `greeting` object — Controls the greeting a caller hears before leaving a voicemail. Set `mode` to `default` to play the standard system greeting, or to `custom_greeting` to play your own audio. When `mode` is `custom_greeting`, `media_name` is required and must reference an audio file already uploaded to your account through the Media Storage API.
    - `media_name` string, nullable — The name of the media file to play as the greeting. Required when `mode` is `custom_greeting`; ignored when `mode` is `default`. The value must match the `media_name` of a file you previously uploaded with the Media Storage API (`POST /v2/media`).
    - `mode` 'default' | 'custom_greeting' — The greeting mode. `default` plays the standard system greeting. `custom_greeting` plays the audio referenced by `media_name`.
  - `pin` string — The pin used for voicemail

## Response `200`

Successful response

- object
  - `data` VoicemailPrefResponse
    - `enabled` boolean — Whether voicemail is enabled.
    - `greeting` object — Controls the greeting a caller hears before leaving a voicemail. Set `mode` to `default` to play the standard system greeting, or to `custom_greeting` to play your own audio. When `mode` is `custom_greeting`, `media_name` is required and must reference an audio file already uploaded to your account through the Media Storage API.
      - `media_name` string, nullable — The name of the media file to play as the greeting. Required when `mode` is `custom_greeting`; ignored when `mode` is `default`. The value must match the `media_name` of a file you previously uploaded with the Media Storage API (`POST /v2/media`).
      - `mode` 'default' | 'custom_greeting' — The greeting mode. `default` plays the standard system greeting. `custom_greeting` plays the audio referenced by `media_name`.
    - `pin` string — The pin used for the voicemail.

## Other responses

- `401` — Unauthorized
- `404` — Resource not found
- `422` — Bad request

---

[API](https://skmtc.net/team-telnyx/apis/telnyx-api-2.md) · [All operations](https://skmtc.net/team-telnyx/apis/telnyx-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/team-telnyx/telnyx-api-2/revisions/3fdc16374d70/schema)
