---
title: "Create a workspace"
method: POST
path: "/v1/workspaces"
tags: ["Workspaces"]
---

# Create a workspace

`POST /v1/workspaces`

## Request

- Base URL: `https://anjal.app`
- URL: `https://anjal.app/v1/workspaces`
- Auth: API key in header `X-API-Key`

Requires a tenant master key (`tk_...`). Workspaces are isolation containers — inboxes and domains created in one cannot be seen from another.

## Request body

- object
  - `name` string, required
  - `slug` string

## Response `201`

Created

- Workspace
  - `id` string, uuid, required
  - `name` string, required
  - `slug` string, required
  - `isDefault` boolean, required
  - `inboxCount` integer
  - `domainCount` integer
  - `createdAt` string, date-time

## Other responses

- `400`: Request body failed schema validation
- `401`: Missing or invalid API key

---

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