---
title: "Create or recover the caller's personal workspace"
method: POST
path: "/api/workspaces"
tags: ["Workspaces"]
---

# Create or recover the caller's personal workspace

`POST /api/workspaces`

## Request

- Base URL: `https://api.setluca.com`
- URL: `https://api.setluca.com/api/workspaces`
- Auth: API key in cookie `luca.session_token`

**Session-only.** This endpoint isn't on the API-key allowlist. An organization API key gets a 403 here, whatever scopes it holds.

## Headers

- `Luca-API-Version` '1'

## Response `200`

ok

- CreateWorkspaceResponse
  - `workspace` object, required
    - `coachId` string, required
    - `organizationId` string, required
    - `name` string, required
    - `slug` string, nullable, required
    - `role` 'owner' | 'admin' | 'manager' | 'operator' | 'analyst' | 'viewer', required
    - `permissionOverrides` object, required
      - `allow` string[]

## Other responses

- `401`: unauthorized
- `404`: not found
- `429`: rate limited
- `500`: workspace creation failed
- `503`: service unavailable

---

[API](https://skmtc.dev/setluca/apis/luca-api.md) · [All operations](https://skmtc.dev/setluca/apis/luca-api/llms.txt) · [OpenAPI document](https://skmtc.dev/setluca/apis/luca-api/revisions/90a200e4100b?raw)
