Create a workspace
POST/api/v1/organizations/{id}/workspaces
POST /organizations/{id}/workspaces
# API: no generated example for POST https://www.unitpost.com/api/v1/organizations/:id/workspacesResponse · 201
{
"object": "workspace",
"id": "id_123",
"name": "Example",
"slug": "string",
"external_id": "external_123",
"plan": "string",
"paid_by": "workspace",
"requires_paid_plan": false,
"closed_at": "2026-01-01T00:00:00.000Z",
"restorable_until": "2026-01-01T00:00:00.000Z",
"created_at": "2026-01-01T00:00:00.000Z",
"hosted_invoice_url": "https://example.com"
}Create a workspace in the organization. Its Owner is the person who made the key. The plan follows the Owner's API rules (Organization → API): free, or a paid plan they allowed, billed to the organization's card within its workspace limit. Idempotency-Key is required; a retry with it returns the first result. Takes an organization key (ok_live_…) with organizations:write.
Parameters2 fields
| Field | Type | Description |
|---|---|---|
idrequired | string · path | The organization's id (`org_…`), from `GET /whoami` or Organization → API. |
Idempotency-Keyrequired | string · header | Any unique string (1–256 characters, e.g. a UUID). Retrying with the same key and the same body within 24 hours returns the first result instead of sending again; the same key with a different body is `409 invalid_idempotent_request`, and one still in flight is `409 concurrent_idempotent_requests`. |
Request body4 fields
| Field | Type | Description |
|---|---|---|
namerequired | string | — |
external_id | string | — |
plan | string | Default: the Owner's default plan, else `free`. |
tier_index | integer | The paid plan's tier (default 0). |
Response · 201 fields12 fields
| Field | Type | Description |
|---|---|---|
objectrequired | enumworkspace | — |
idrequired | string | `ws_…` |
namerequired | string | — |
slugrequired | string | — |
external_idrequired | string | Your own id for it, unique in the organization. |
planrequired | string | `free`, or the paid plan's key. |
paid_byrequired | enumworkspace | organization | — |
requires_paid_planrequired | boolean | No free allowance: the Owner already has a free workspace, so it sends once a plan is bought. |
closed_atrequired | string | — |
restorable_untilrequired | string | — |
created_atrequired | string | — |
hosted_invoice_url | string | On create only: the card asked for authentication; paying here starts the plan. |
201400401403404409422429