---
# @generated by sylphx-gen. Do not edit.
title: "Read voicemail on a phone number"
description: "`notify.phone_numbers.read_voicemail` (POST /v1/{name}:readVoicemail): ReadPhoneNumberVoicemail: existing provider-managed lines; execution credentials are transient."
type: reference
product: notifications
summary: "ReadPhoneNumberVoicemail: existing provider-managed lines; execution credentials are transient."
updated: 2026-09-28
nav: false
---

ReadPhoneNumberVoicemail: existing provider-managed lines; execution credentials are transient.

- **Path** `POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/phone_numbers/phone-number:readVoicemail`
- **Scope** `notify:read`
- **Effect** `read` — nothing is written.
- **Collection** [phone_numbers](/docs/api/phone_numbers)

## Request

| Field | Type | What it is |
| --- | --- | --- |
| `name` | `string` | Connected line. Required. |
| `provider_call_id` | `string` | Stable provider receipt id already held by this line. Required. |
| `start_day` | `string` | Day window to re-establish receipt ownership. Required. |
| `end_day` | `string` | Last day inclusive, at most one day after start_day. Required. |
| `provider_session_token` | `string` | Transient provider session. Required. Never returned again. |

## Response

| Field | Type | What it is |
| --- | --- | --- |
| `audio` | `bytes` | Exact provider recording bytes, maximum 2 MiB. Never returned again. |
| `audio_sha256` | `string` | SHA-256 of those bytes. |

## Errors

- [`UNAUTHENTICATED`](/docs/api/errors/UNAUTHENTICATED) — No valid key or token was presented.
- [`PERMISSION_DENIED`](/docs/api/errors/PERMISSION_DENIED) — The key lacks the method's permission.
- [`INVALID_FIELD`](/docs/api/errors/INVALID_FIELD) — A field failed validation.
- [`RESOURCE_NOT_FOUND`](/docs/api/errors/RESOURCE_NOT_FOUND) — The named Resource does not exist or is not visible.
- [`RESOURCE_ALREADY_EXISTS`](/docs/api/errors/RESOURCE_ALREADY_EXISTS) — A Resource with this name exists.
- [`INVALID_STATE`](/docs/api/errors/INVALID_STATE) — The Resource is in a state that forbids the call.
- [`IDEMPOTENCY_KEY_REUSED`](/docs/api/errors/IDEMPOTENCY_KEY_REUSED) — An Idempotency-Key was reused with another body.
- [`IDEMPOTENCY_IN_PROGRESS`](/docs/api/errors/IDEMPOTENCY_IN_PROGRESS) — The first call with this Idempotency-Key is still running.
- [`UNAVAILABLE`](/docs/api/errors/UNAVAILABLE) — The Resource store, the owning service's backend, or the key verifier's snapshot is unavailable; retry after Retry-After.

Every error arrives in the body [Errors](/docs/platform/errors) describes.

## Examples

**cURL**

```curl
curl -X POST "https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/phone_numbers/phone-number:readVoicemail" \
  -H "Authorization: Bearer $SYLPHX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"end_day":"…","provider_call_id":"…","provider_session_token":"…","start_day":"…"}'
```

**TypeScript**

```ts
const response = await sylphx.notify.phoneNumbers.readVoicemail({ endDay: '…', name: 'orgs/acme/projects/shop/envs/production/phone_numbers/phone-number', providerCallId: '…', providerSessionToken: '…', startDay: '…' })
```

**Rust**

```rust
let mut req = sylphx::notify::ReadPhoneNumberVoicemailRequest::default();
req.end_day = "…".to_string();
req.name = "orgs/acme/projects/shop/envs/production/phone_numbers/phone-number".to_string();
req.provider_call_id = "…".to_string();
req.provider_session_token = "…".to_string();
req.start_day = "…".to_string();
let response = sx.notify().phone_numbers().read_voicemail(req).await?;
```

**CLI**

```bash
sylphx notify phone-numbers read-voicemail orgs/acme/projects/shop/envs/production/phone_numbers/phone-number
```

**MCP**

```json
{ "method_id": "notify.phone_numbers.read_voicemail", "args": {"end_day":"…","name":"orgs/acme/projects/shop/envs/production/phone_numbers/phone-number","provider_call_id":"…","provider_session_token":"…","start_day":"…"} }
```
