/v1/workspacesAuthCreate a new workspace. Cookie/JWT only — PAKs are workspace-scoped credentials and cannot create new workspaces.
Headers
Idempotency-KeystringOpaque client-generated string (1-256 chars, `[A-Za-z0-9._:-]`) that deduplicates retries for 24 h. A retry with the same key and body returns the first response with `Idempotent-Replay: true` instead of creating a second resource. The SDKs send one on every create.
Request body
slug*stringURL-friendly slug. Lowercase alphanumerics, separated by hyphens. Used in URLs and as a stable handle.
Example: "acme-corp"
display_name*stringDisplay name shown in console and on receipts.
Example: "Acme Corp"
Response · 201
id*string · uuidId of the workspace.
slug*stringUnique URL-friendly slug; platform routes take it positionally.
Example: "acme-corp"
display_name*stringDisplay name of the workspace.
Example: "Acme Corp"
created_by*string · uuidAccount id of the member who created the workspace.
status*stringWorkspace status (e.g. `active`).
Example: "active"
settings*objectFree-form workspace settings blob.
created_at*string · date-timeWhen the workspace was created.
updated_at*string · date-timeWhen the workspace was last changed.
Example
Request
POST https://api.platform-auth.productcraft.co/v1/workspaces
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json
{
"slug": "acme-corp",
"display_name": "Acme Corp"
}Response
{
"id": "00000000-0000-0000-0000-000000000000",
"slug": "acme-corp",
"display_name": "Acme Corp",
"created_by": "00000000-0000-0000-0000-000000000000",
"status": "active",
"settings": {},
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}