# PATCH /api/v1/inboxes/:id/phone-number

Auth: Bearer

HTML: https://cooperemail.com/docs/reference/update-voice-settings

## Summary

Set the greeting and the recording length on the inbox phone number. voice_greeting is at most 300 characters. Null or empty uses the default greeting. voice_max_seconds is an integer from 15 to 300 (HTTP 400 invalid_max_seconds). Null uses 120 seconds. Once the monthly minute allowance is used, inbound recordings are capped at 60 seconds. A caller hears the greeting, then the recording is stored as a message with channel voicemail and type voicemail, including the caller number, duration_seconds, transcript, and recording_url. message.received and GET /api/v1/inboxes/{id}/wait include that message. HTTP 404 phone_number_not_found when the inbox has no active number. Requires inbox_update.

## Request

```json
{
  "voice_greeting": "Leave a message for the research bot.",
  "voice_max_seconds": 90
}
```

## Response

HTTP 200. Sample values illustrate the schema.

```json
{
  "object": "phone_number",
  "id": "phn_example",
  "inbox_id": "inb_example",
  "e164": "+14155550123",
  "status": "active",
  "voice_greeting": "Leave a message for the research bot.",
  "voice_max_seconds": 90
}
```

## Errors

- HTTP 400 invalid_max_seconds
- HTTP 404 phone_number_not_found
- HTTP 404 not_found
- HTTP 404 inbox_not_found

The live `message` is the sentence for that code. Branch on `code`.

```json
{
  "error": {
    "type": "invalid_request",
    "code": "invalid_max_seconds",
    "docs_url": "https://cooperemail.com/docs#invalid_max_seconds"
  }
}
```

## Idempotency

This route does not document Idempotency-Key or client_id.
