# Update a recording

`PATCH /v1/recordings/{recording_id}`

Required scope: `recordings:write`

Change the title, call type or outcome. `null` clears the outcome.

## Path parameters

- `recording_id` (string, required)

## Request body (application/json)

- `category` (string or null, optional)
- `outcome` (string or null, optional)
- `title` (string or null, optional)

## Responses

- `200`: Successful Response
- `400`: The request is not valid.
- `401`: Not signed in, or the credentials are not valid.
- `402`: The balance is too low.
- `403`: Not allowed to do this.
- `404`: Not found.
- `409`: Conflicts with the current state.
- `413`: The request body is too large.
- `415`: The content type is not supported.
- `422`: A value in the request is not valid.
- `429`: Too many requests. Wait for `Retry-After` seconds.
- `500`: Something went wrong on our side.
- `502`: A service Valeron depends on refused the request.
- `503`: A service Valeron depends on is unavailable.

## Examples

### Request

```bash title="cURL"
curl -X PATCH "https://api.valeron.io/v1/recordings/rec_01JR70S5VT" \
  -H "Authorization: Bearer $VALERON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "category": "example",
  "outcome": "example",
  "title": "Discovery call"
}'
```

```js title="JavaScript"
const response = await fetch("https://api.valeron.io/v1/recordings/rec_01JR70S5VT", {
  method: "PATCH",
  headers: {
    Authorization: `Bearer ${process.env.VALERON_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "category": "example",
    "outcome": "example",
    "title": "Discovery call"
  }),
});
if (!response.ok) throw new Error(`Valeron returned ${response.status}`);
const data = await response.json();
```

```python title="Python"
import os
import requests

response = requests.patch(
    "https://api.valeron.io/v1/recordings/rec_01JR70S5VT",
    headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"},
    json={
        "category": "example",
        "outcome": "example",
        "title": "Discovery call",
    },
)
response.raise_for_status()
data = response.json()
```

### Response 200

```json
{
  "analysis_status": {
    "label": "Example",
    "value": "example"
  },
  "analysis_version": 1,
  "archived_at": null,
  "call_score": 82,
  "category": "example",
  "channel_count": 3,
  "company": {
    "id": "rec_01JCRZFXEH",
    "name": "Jordan Rivera"
  },
  "contact": {
    "id": "rec_01JCRZFXEH",
    "name": "Jordan Rivera"
  },
  "direction": {
    "label": "Example",
    "value": "example"
  },
  "duration_seconds": 1260,
  "event_id": "evt_01JRTRTZRH",
  "from_number": "+14155550132",
  "has_share_link": false,
  "id": "rec_01JCRZFXEH",
  "is_member_speaker_known": true,
  "language": "example"
}
```

### Response 401

```json
{
  "error": null
}
```

### Response 402

```json
{
  "error": null
}
```

### Response 403

```json
{
  "error": null
}
```

### Response 404

```json
{
  "error": null
}
```
