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

# Get voicemail

`GET /phone_numbers/{phone_number_id}/voicemail`

Returns the voicemail settings for a phone number

## 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

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

---

[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/ec31f78cf002/schema)
