# Rename an audio asset

`PATCH https://api.morevoice.ai/v1/audio_assets/{id}`

Changes the name or the text (what it says). To replace the audio, upload a new asset.

Authenticate with a secret API key: `Authorization: Bearer $MOREVOICE_API_KEY`.

Operation ID: `audio_assets_update`.

## Parameters

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | A audio asset ID (`aud_…`). |

### Headers

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `MoreVoice-Version` | `string` | no | The API version to use for this request. Defaults to the version the API key is pinned to. |

## Request body

Optional, `application/json`.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | `string` | no | — |
| `text` | `string` | no | — |

Example:

```json
{
  "name": "Welcome (Hebrew, v2)"
}
```

## Responses

### 200 OK

OK Returns `AudioAsset`.

| Field | Type | Description |
| --- | --- | --- |
| `object` | `"audio_asset"` | — |
| `id` | `string` | A audio asset ID (prefix `aud_`). |
| `livemode` | `boolean` | `true` in live mode, `false` in test mode. |
| `name` | `string` | — |
| `kind` | `"prompt" \| "music"` | `prompt` (an IVR / flow prompt) or `music` (queue hold music). |
| `sample_rate` | `integer` | The stored rate (mono PCM16, up to 16 kHz). |
| `duration_ms` | `integer` | — |
| `text` | `string` | What the recording says (shown in the flow editor and the transcript). |
| `created` | `string` | An ISO-8601 timestamp in UTC. |

Example:

```json
{
  "created": "2026-11-03T09:14:22.000Z",
  "duration_ms": 4210,
  "id": "aud_8b2KxQ4mLp9",
  "kind": "prompt",
  "livemode": true,
  "name": "Welcome (Hebrew)",
  "object": "audio_asset",
  "sample_rate": 16000,
  "text": "שלום, הגעתם ל…"
}
```

### 400 Bad Request

The request is invalid: a parameter is missing, malformed or unknown, or the version header is unknown. Returns `ErrorEnvelope`.

### 401 Unauthorized

No valid API key was sent. Returns `ErrorEnvelope`.

### 403 Forbidden

The key may not do this (a missing scope, a plan limit, or a compliance block). Returns `ErrorEnvelope`.

### 404 Not Found

No object with this ID exists in this organisation and mode. Returns `ErrorEnvelope`.

### 429 Too Many Requests

Too many requests, or no call capacity right now. Retry after the Retry-After delay. Returns `ErrorEnvelope`.

### 500 Internal Server Error

Something went wrong on MoreVoice's side. Retry with the same Idempotency-Key. Returns `ErrorEnvelope`.

## Code samples

**TypeScript**

```ts
import MoreVoice from "@morevoice/sdk";

const mv = new MoreVoice(); // MOREVOICE_API_KEY from the environment

const audioAsset = await mv.audioAssets.update("aud_7Hk2Lm9Qp", {
	name: "Welcome (Hebrew, v2)",
});
console.log(audioAsset);
```

**Python**

```python
from morevoice import MoreVoice

client = MoreVoice()  # MOREVOICE_API_KEY from the environment

audio_asset = client.audio_assets.update("aud_7Hk2Lm9Qp", {
    "name": "Welcome (Hebrew, v2)",
})
print(audio_asset)
```

**cURL**

```sh
curl -X PATCH https://api.morevoice.ai/v1/audio_assets/aud_7Hk2Lm9Qp \
  -H "Authorization: Bearer $MOREVOICE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Welcome (Hebrew, v2)"
}'
```
