# Create record

URL: https://docs.hanzo.ai/docs/openapi/meet/meetrecordstart

> Begins recording a room, or hands back the recording already running.

`POST /v1/meet/record`

> [Meet →](https://docs.hanzo.ai/docs/openapi/meet) · [All API references →](https://docs.hanzo.ai/docs/openapi) · [Get started →](https://docs.hanzo.ai/docs/guides)

|               |                                        |
| ------------- | -------------------------------------- |
| **Address**   | `https://api.hanzo.ai/v1/meet/record`  |
| **Method**    | `POST`                                 |
| **Operation** | `meetRecordStart`                      |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY` |

Begins recording a room, or hands back the recording already running.

A recording is a durable artifact of a conversation, so only someone this room
would admit may make one: the caller is authorized by the SAME decision
/v1/meet/getToken makes about the same room, and refused with the same 401.

A SECOND START RETURNS THE FIRST rather than refusing it. There is at most one
recording per room and this operation's job is to establish that there is one —
which is already true when a colleague, or the caller's own double-click,
started it a moment ago. The answer is the same shape either way, naming the
recording that is actually running, so a client never has to tell the two cases
apart to find the id.

A deployment with no media server address or no object store answers 503 naming
which, because a recording that silently does not happen is worse than one that
is refused. The reason reaches only a caller this room already admits.

## Request

1 field, body `application/json` (required).

| Field  | In   | Type   | Required | Description                                                                                                    |
| ------ | ---- | ------ | -------- | -------------------------------------------------------------------------------------------------------------- |
| `room` | body | string | yes      | Room is the LiveKit room, named the way the office client names one (`&lt;space&gt;_&lt;name&gt;_&lt;id&gt;`). |

## Response

| Status    | Body            | Meaning |
| --------- | --------------- | ------- |
| `200`     | meet.recording  | ok      |
| `default` | problem-details | refused |

`200` body — 7 fields.

| Field     | In   | Type            | Always | Description                                                                                                                                                                 |
| --------- | ---- | --------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `bucket`  | body | string          | —      | Bucket is the object store bucket the recording is written to.                                                                                                              |
| `error`   | body | string          | —      | Error is the media server's reason when a recording failed, and empty otherwise.                                                                                            |
| `id`      | body | string          | —      | ID is the media server's egress id — the handle a later read names.                                                                                                         |
| `object`  | body | string          | —      | Object is the key inside that bucket.                                                                                                                                       |
| `room`    | body | string          | —      | Room is the room this recording is of.                                                                                                                                      |
| `started` | body | integer (int64) | —      | Started is when the recording began, as the media server reports it: its own `started_at`, verbatim and unconverted.                                                        |
| `status`  | body | string          | —      | Status is the media server's own state name: EGRESS\_STARTING, EGRESS\_ACTIVE, EGRESS\_ENDING, EGRESS\_COMPLETE, EGRESS\_FAILED, EGRESS\_ABORTED or EGRESS\_LIMIT\_REACHED. |

Failure carries the platform error shape — see [Errors](https://docs.hanzo.ai/docs/errors).

## Examples

**CLI**

```bash
hanzo meet record create --room <room>
```

**SDK**

**.ts**

```ts
import { Configuration, MeetApi } from 'hanzoai';

const api = new MeetApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.meetRecordStart({ room: "<room>" });
```

**.py**

```python
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import MeetApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = MeetApi(client).meet_record_start(room="<room>")
```

**.go**

```go
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.MeetAPI.MeetRecordStart(context.Background()).Execute()
if err != nil {
	return err
}
```

**.rs**

```rust
use hanzo_client::apis::{configuration::Configuration, meet_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = meet_api::meet_record_start(&cfg, Default::default()).await?;
```

**.java**

```java
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.MeetApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new MeetApi(client).meetRecordStart();
```

**HTTP**

```bash
curl -X POST https://api.hanzo.ai/v1/meet/record \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "room": "<room>"
     }'
```

**MCP**

Tool `meet`, op `meetRecordStart` — POST the JSON-RPC envelope to `https://api.hanzo.ai/v1/mcp`.

```bash
curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "meet",
         "arguments": {
           "op": "meetRecordStart",
           "input": {
             "room": "<room>"
           }
         }
       }
     }'
```

---

[Meet API](https://docs.hanzo.ai/docs/openapi/meet) · [All Hanzo APIs](https://docs.hanzo.ai/docs/openapi) · [Interactive reference](https://docs.hanzo.ai/docs/openapi/reference)
