---
title: "Create a workspace"
description: "Create a workspace in the organization. `POST /api/v1/organizations/{id}/workspaces`"
url: https://www.unitpost.com/docs/platform/post-organizations-id-workspaces
section: "Platform API reference"
updated: 2026-11-02
---
# Create a workspace

`POST /api/v1/organizations/{id}/workspaces`

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`.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | The organization's id (`org_…`), from `GET /whoami` or Organization → API. |
| `Idempotency-Key` | header | string | yes | 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 body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | yes | — |
| `external_id` | string | no | — |
| `plan` | string | no | Default: the Owner's default plan, else `free`. |
| `tier_index` | integer | no | The paid plan's tier (default 0). |

## Response fields (201)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | enum | yes | One of: `workspace`. |
| `id` | string | yes | `ws_…` |
| `name` | string | yes | — |
| `slug` | string | yes | — |
| `external_id` | string | yes | Your own id for it, unique in the organization. |
| `plan` | string | yes | `free`, or the paid plan's key. |
| `paid_by` | enum | yes | One of: `workspace`, `organization`. |
| `requires_paid_plan` | boolean | yes | No free allowance: the Owner already has a free workspace, so it sends once a plan is bought. |
| `closed_at` | string | yes | — |
| `restorable_until` | string | yes | — |
| `created_at` | string | yes | — |
| `hosted_invoice_url` | string | no | On create only: the card asked for authentication; paying here starts the plan. |

## Responses

| Status | Description |
| --- | --- |
| 201 | The workspace. |
| 400 | No Idempotency-Key, or an invalid one. |
| 401 | Missing or invalid organization key (a workspace key is refused). |
| 403 | API access not approved for the organization, the key lacks the capability, or no User-Agent; or `workspace_suspended`: the organization has a suspended workspace, or the key's creator owns one. |
| 404 | Not this key's organization, or not one of its workspaces. |
| 409 | The key was used with another body or is still running, the external_id is taken, the person already has a free workspace, the organization's card is at its workspace limit, or the creator's email is held (`account_recently_deleted`, `account_blocked`). |
| 422 | Invalid body, or a plan the API rules don't allow. |
| 429 | The organization's rate limit. |

## Example request

```bash
# API: no generated example for POST https://www.unitpost.com/api/v1/organizations/:id/workspaces
```

## Example response (201)

```json
{
  "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"
}
```

## Links

- HTML reference (with Node.js, Python, Ruby, PHP, Laravel, Go, Java, Rust, .NET and CLI examples): https://www.unitpost.com/docs/platform/post-organizations-id-workspaces
- OpenAPI 3.1 (full schemas): https://www.unitpost.com/api/v1/openapi.json
