Close a workspace

Close a workspace

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

POST /organizations/{id}/workspaces/{workspace_id}/close
# API: no generated example for POST https://www.unitpost.com/api/v1/organizations/:id/workspaces/:workspace_id/close
Response · 200
{
  "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"
}

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.

Parameters2 fields
FieldTypeDescription
idrequiredstring · pathThe organization's id (`org_…`), from `GET /whoami` or Organization → API.
workspace_idrequiredstring · pathThe workspace's id (`ws_…`).
Response · 200 fields12 fields
FieldTypeDescription
objectrequiredenumworkspace—
idrequiredstring`ws_…`
namerequiredstring—
slugrequiredstring—
external_idrequiredstringYour own id for it, unique in the organization.
planrequiredstring`free`, or the paid plan's key.
paid_byrequiredenumworkspace | organization—
requires_paid_planrequiredbooleanNo free allowance: the Owner already has a free workspace, so it sends once a plan is bought.
closed_atrequiredstring—
restorable_untilrequiredstring—
created_atrequiredstring—
hosted_invoice_urlstringOn create only: the card asked for authentication; paying here starts the plan.
200401403404429

Search docs and guides

Search the docs and product guides.