# Create datarooms

URL: https://docs.hanzo.ai/docs/openapi/dataroom/post-dataroom-datarooms

> Opens a new data room for the caller org and answers with it, including the short public id it is addressed by.

`POST /v1/dataroom/datarooms`

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

|               |                                              |
| ------------- | -------------------------------------------- |
| **Address**   | `https://api.hanzo.ai/v1/dataroom/datarooms` |
| **Method**    | `POST`                                       |
| **Operation** | `post_dataroom_datarooms`                    |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY`       |

Opens a new data room for the caller org and answers with it,
including the short public id it is addressed by.

`name` is required; without it the call is refused and the tenant store is
untouched, because a dispatch answering 4xx rolls its transaction back. A new
room holds no documents and is reachable by NOBODY until a share link is
created over it — opening a room and granting access are two separate acts, so
a room cannot leak by existing.

## Request

2 fields, body `application/json` (required).

| Field         | In   | Type | Required | Description                            |
| ------------- | ---- | ---- | -------- | -------------------------------------- |
| `description` | body | any  | —        | Description is the room's description. |
| `name`        | body | any  | —        | Name is the room's display name.       |

## Response

| Status    | Body                     | Meaning |
| --------- | ------------------------ | ------- |
| `200`     | dataroom.dataroomRoomOne | ok      |
| `default` | problem-details          | refused |

`200` body — 7 fields.

| Field                  | In   | Type                  | Always | Description                                                          |
| ---------------------- | ---- | --------------------- | ------ | -------------------------------------------------------------------- |
| `dataroom`             | body | dataroom.dataroomRoom | —      |                                                                      |
| `dataroom.createdAt`   | body | integer (int64)       | —      | CreatedAt is when the room was created, in unix milliseconds.        |
| `dataroom.description` | body | string                | —      | Description is the room's description, null when none was given.     |
| `dataroom.id`          | body | string                | —      | ID is the room id, which is what other dataroom calls address it by. |
| `dataroom.name`        | body | string                | —      | Name is the room's display name.                                     |
| `dataroom.pId`         | body | string                | —      | PId is the room's short public identifier, unique within the tenant. |
| `dataroom.updatedAt`   | body | integer (int64)       | —      | UpdatedAt is when the room last changed, in unix milliseconds.       |

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

## Examples

**CLI**

```bash
hanzo dataroom datarooms create
```

**SDK**

**.ts**

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

const api = new DataroomApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.postDataroomDatarooms({ description: "<description>", name: "<name>" });
```

**.py**

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

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = DataroomApi(client).post_dataroom_datarooms(description="<description>", name="<name>")
```

**.go**

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

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

**.rs**

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

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

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

**.java**

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

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

var result = new DataroomApi(client).postDataroomDatarooms();
```

**HTTP**

```bash
curl -X POST https://api.hanzo.ai/v1/dataroom/datarooms \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "description": "<description>",
       "name": "<name>"
     }'
```

**MCP**

MCP reaches **dataroom** through the `dataroom` tool, which names its 19 operations with its own verbs — this one among them, under a name only MCP declares. `describe` explains any of them:

```bash
curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "describe",
         "arguments": {
           "op": "get_dataroom_analytic_dataroom"
         }
       }
     }'
```

---

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