> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ariacompute.cn/llms.txt
> Use this file to discover all available pages before exploring further.

# 创建工作空间 - POST /v1/workspaces

> 通过 POST /v1/workspaces 创建隔离租户，创建者自动成为 owner。可选 name。

创建一个工作空间（隔离租户）。调用者自动成为该空间的 `owner`，并写入一条成员记录。后续知识库、记忆、Wiki 等都挂在某个工作空间之下。

## 接口

```http theme={null}
POST /v1/workspaces
```

## 认证

`Authorization: Bearer <jwt>` 或 `X-API-Key <sk_...>`（仅需登录，无工作空间角色要求）。

## 请求体

<ParamField body="name" type="string">
  工作空间名称，省略时默认「新工作空间」。
</ParamField>

## 响应

<ResponseField name="id" type="string">
  工作空间 id（`ws_...`）。
</ResponseField>

<ResponseField name="name" type="string">
  名称。
</ResponseField>

<ResponseField name="role" type="string">
  创建者在该空间的角色，恒为 `owner`。
</ResponseField>

## 示例

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://memo.ariacompute.cn/v1/workspaces \
    -H "Authorization: Bearer <jwt>" \
    -H "Content-Type: application/json" \
    -d '{"name":"我的研究团队"}'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": "ws_01a2b3c4d5e6",
    "name": "我的研究团队",
    "role": "owner"
  }
  ```
</ResponseExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.