---
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
  - `pin` string — The pin used for voicemail
  - `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.
    - `mode` 'default' | 'custom_greeting' — The greeting mode. `default` plays the standard system greeting. `custom_greeting` plays the audio referenced by `media_name`.
    - `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`).

## Response `200`

Successful response

- object
  - `data` VoicemailPrefResponse
    - `enabled` boolean — Whether voicemail is enabled.
    - `pin` string — The pin used for the voicemail.
    - `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.
      - `mode` 'default' | 'custom_greeting' — The greeting mode. `default` plays the standard system greeting. `custom_greeting` plays the audio referenced by `media_name`.
      - `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`).

## Other responses

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

## Changes

> 92 revisions in range; 1 not diffed.

- **2026-08-17** `1571b0380bd7` — 2 info
  - added the new optional request property `greeting`
  - added the optional property `data/greeting` to the response with the `200` status

[Change history](https://skmtc.dev/team-telnyx/apis/telnyx-api-2/changes/phone_numbers/:phone_number_id/voicemail/patch.md)

---

[API](https://skmtc.dev/team-telnyx/apis/telnyx-api-2.md) · [All operations](https://skmtc.dev/team-telnyx/apis/telnyx-api-2/llms.txt) · [OpenAPI document](https://skmtc.dev/team-telnyx/apis/telnyx-api-2/revisions/d8b8159753ee?raw)
