# Create Workspace Beta

> Create a workspace owned by the key's creator.

> Documentation index: https://www.foxreach.io/docs/llms.txt lists every page of these docs. Each page is also served as Markdown: add `.md` to its URL.

`POST` https://api.foxreach.io/api/v1/workspaces

> **Note:** **Beta.** This endpoint is new and may change.

Requires an API key with the `Requires an API key with the `write` and `admin` scopes. The `admin` scope is opt-in: no default key carries it. The call runs in the key's own workspace and `X-Workspace-Id` is ignored. It is recorded as an `audit.workspace.created` event in the key's workspace, visible in [List Events](/api-reference/webhooks/list-events).` scope.

Returns the new workspace with a `201` status code. It starts on the free plan, with the key's creator as its owner, and counts toward the workspace limit of the creator's plan.

## Request Body

- `name` string body required

  Workspace name, 1 to 100 characters.

**Request example**

```bash cURL
curl -X POST "https://api.foxreach.io/api/v1/workspaces" \
  -H "X-API-Key: otr_your_key" \
  -H "Content-Type: application/json" \
  -d '{"name": "Acme Co"}'
```

```python Python
import requests

response = requests.post(
    "https://api.foxreach.io/api/v1/workspaces",
    headers={"X-API-Key": "otr_your_key"},
    json={"name": "Acme Co"}
)
data = response.json()
```

```typescript TypeScript
const response = await fetch("https://api.foxreach.io/api/v1/workspaces", { method: "POST", headers: { "X-API-Key": "otr_your_key", "Content-Type": "application/json" }, body: JSON.stringify({"name": "Acme Co"}) });
const data = await response.json();
```

**Response example**

```json
{
  "data": {
    "id": "ws_abc123",
    "name": "Acme Co",
    "slug": "acme-co",
    "ownerId": "usr_abc123",
    "isPersonal": false
  }
}
```

## Errors

| Status | Description |
|--------|-------------|
| `401` | Missing, invalid, revoked or expired API key |
| `403` | API key does not have the required scope: `Requires an API key with the `write` and `admin` scopes. The `admin` scope is opt-in: no default key carries it. The call runs in the key's own workspace and `X-Workspace-Id` is ignored. It is recorded as an `audit.workspace.created` event in the key's workspace, visible in [List Events](/api-reference/webhooks/list-events).` |
| `403` | Key lacks `write` or `admin`, or the plan's workspace limit is reached (`upgrade_required`) |
| `422` | `name` is empty or longer than 100 characters |

## Rate Limit

- **120 requests per minute, shared by every `write` call in your workspace.** Fixed 60-second window.
- Every response includes `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset` (unix epoch seconds) and `X-RateLimit-Bucket` (`write`).
- A `429` response includes a `Retry-After` header (seconds until the bucket resets).

For client-side patterns, see [Rate Limiting](https://www.foxreach.io/docs/rate-limiting).
