Sub-workspaces API

POST, GET, PATCH and DELETE /v1/workspaces — partner mode sub-workspaces, one per customer of your app, addressed by your external_id.

Partner mode only (guide). Authenticate with your API key. {ref} is the sub-workspace's id or ext:<external_id>.

Create or update

POST https://api.dcision.io/v1/workspaces
FieldType
external_idstringRequired. Your id for the customer: 1–128 characters [A-Za-z0-9._:-]
namestringRequired. 1–80 characters
metadataobjectUp to 20 string pairs you keep on it
limitsobjectmax_decisions, monthly_decisions (null = your default)
seedobjectOn creation only: { "decisions": ["slug"], "deploy": true } copies your deployed decisions

201 when created, 200 when it already existed (the name, metadata and limits sent are updated):

201 Created
{
  "id": "0b0c1d2e-6a1f-4c55-9b0e-3f6d7a8c9e01",
  "external_id": "acme",
  "name": "Acme Inc",
  "metadata": {},
  "limits": { "max_decisions": 10, "monthly_decisions": null },
  "usage": { "decisions": 1, "period_used": 0, "period_start": "2026-10-01T00:00:00.000Z", "period_end": "2026-11-01T00:00:00.000Z" },
  "created_at": "2026-10-09T12:00:00.000Z",
  "seed": { "created": [{ "slug": "lead-qualification", "id": "dec_…", "deployed": true }], "skipped": [] }
}

Errors: 403 FORBIDDEN (partner_disabled — turn on partner mode; key_without_author), 402 PLAN_LIMIT_REACHED (scope: "workspaces").

List, get, update, delete

Request
GET /v1/workspaces?limit=&cursor=&external_id={ "data": [ … ], "next_cursor" }
GET /v1/workspaces/{ref}One sub-workspace
PATCH /v1/workspaces/{ref}name, metadata, limits
DELETE /v1/workspaces/{ref}204: deletes it with its decisions and executions

An unknown {ref} — or another workspace's — answers 404 WORKSPACE_NOT_FOUND.

On this page