---
title: "Organizations API"
description: "For platforms that give each customer a workspace: an organization key creates, lists, closes and restores the organization's workspaces and mints their keys."
url: https://www.unitpost.com/docs/platform/organizations
section: "Platform API reference"
updated: 2026-11-02
---
# Organizations API

> For platforms that give each customer a workspace: an organization key creates, lists, closes and restores the organization's workspaces and mints their keys. Staff approve each organization first.

Full schemas: [OpenAPI 3.1](https://www.unitpost.com/api/v1/openapi.json). HTML reference: https://www.unitpost.com/docs/platform/organizations.

## Operations

### `GET /api/v1/organizations/{id}/workspaces`

List the organization's workspaces

The organization's workspaces, newest first and cursor-paginated (`limit`, `after`, `before`). `external_id` narrows to the workspace you gave that id. Takes an organization key (`ok_live_…`) with `organizations:read`.

Reference: https://www.unitpost.com/docs/platform/get-organizations-id-workspaces ([Markdown](https://www.unitpost.com/docs/platform/get-organizations-id-workspaces.md))

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

Create a workspace

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

Reference: https://www.unitpost.com/docs/platform/post-organizations-id-workspaces ([Markdown](https://www.unitpost.com/docs/platform/post-organizations-id-workspaces.md))

### `GET /api/v1/organizations/{id}/workspaces/{workspace_id}`

Get a workspace

One of the organization's workspaces. Takes an organization key (`ok_live_…`) with `organizations:read`.

Reference: https://www.unitpost.com/docs/platform/get-organizations-id-workspaces-workspace-id ([Markdown](https://www.unitpost.com/docs/platform/get-organizations-id-workspaces-workspace-id.md))

### `PATCH /api/v1/organizations/{id}/workspaces/{workspace_id}`

Update a workspace

Rename a workspace or change its `external_id` (null clears it). Takes an organization key (`ok_live_…`) with `organizations:write`.

Reference: https://www.unitpost.com/docs/platform/patch-organizations-id-workspaces-workspace-id ([Markdown](https://www.unitpost.com/docs/platform/patch-organizations-id-workspaces-workspace-id.md))

### `POST /api/v1/organizations/{id}/workspaces/{workspace_id}/close`

Close a workspace

The workspace stops working at once: its keys are revoked, every request to it is refused and its campaigns pause. It is deleted after 30 days unless restored. Closing twice changes nothing. Takes an organization key (`ok_live_…`) with `organizations:write`.

Reference: https://www.unitpost.com/docs/platform/post-organizations-id-workspaces-workspace-id-close ([Markdown](https://www.unitpost.com/docs/platform/post-organizations-id-workspaces-workspace-id-close.md))

### `POST /api/v1/organizations/{id}/workspaces/{workspace_id}/restore`

Restore a workspace

Reopen a closed workspace within 30 days. Its old keys stay revoked: mint new ones. Takes an organization key (`ok_live_…`) with `organizations:write`.

Reference: https://www.unitpost.com/docs/platform/post-organizations-id-workspaces-workspace-id-restore ([Markdown](https://www.unitpost.com/docs/platform/post-organizations-id-workspaces-workspace-id-restore.md))

### `POST /api/v1/organizations/{id}/workspaces/{workspace_id}/api-keys`

Mint a workspace key

A workspace key for one of the organization's workspaces: it reaches only that workspace, can't manage keys, and is revoked with the organization key that minted it. The secret is returned once. Takes an organization key (`ok_live_…`) with `organizations:write`.

Reference: https://www.unitpost.com/docs/platform/post-organizations-id-workspaces-workspace-id-api-keys ([Markdown](https://www.unitpost.com/docs/platform/post-organizations-id-workspaces-workspace-id-api-keys.md))
