List and get decisions
GET /v1/decisions and GET /v1/decisions/{slug} — the decisions of an API key's workspace and the contract of each one's active version, with an example state.
GET https://api.dcision.io/v1/decisions
GET https://api.dcision.io/v1/decisions/{slug}Two read endpoints tell an integration — or an agent through the MCP server — which decisions exist and what each one accepts and answers, without opening the app. They only show what the active version exposes: a draft that was never deployed is listed, but its schema stays private until you deploy it.
Both use the same API keys as decisions, share the read rate-limit window with GET /v1/me and GET /v1/executions, and are not billed.
List decisions
curl https://api.dcision.io/v1/decisions \
-H "Authorization: Bearer $DCISION_API_KEY"{
"data": [
{
"slug": "lead-qualification",
"name": "Lead Qualification",
"description": "Qualify inbound leads and route them to the right team.",
"status": "deployed",
"version": 3,
"updated_at": "2026-10-05T13:41:09.204Z"
},
{
"slug": "chat-triage",
"name": "Chat triage",
"description": null,
"status": "draft",
"version": null,
"updated_at": "2026-10-04T18:02:55.731Z"
}
]
}| Field | Type | Description |
|---|---|---|
data | array | The workspace's decisions, most recently updated first. |
data[].slug | string | The decision's slug — its endpoint, POST /v1/decisions/{slug}. |
data[].name | string | The decision's name. |
data[].description | string or null | The decision's description. |
data[].status | string | draft (never deployed), deployed or disabled (endpoint turned off). |
data[].version | integer or null | The active version; null for a draft. |
data[].updated_at | string | When the decision last changed, ISO 8601. |
Only deployed decisions can run: the others answer 409 DECISION_NOT_DEPLOYED or 409 DECISION_DISABLED.
Get a decision
curl https://api.dcision.io/v1/decisions/lead-qualification \
-H "Authorization: Bearer $DCISION_API_KEY"{
"slug": "lead-qualification",
"name": "Lead Qualification",
"description": "Qualify inbound leads and route them to the right team.",
"status": "deployed",
"version": 3,
"state_schema": {
"type": "object",
"required": ["message"],
"properties": {
"message": { "type": "string", "description": "Inbound lead message" },
"company_size": { "type": "number", "description": "Employee count" },
"source": { "type": "string", "description": "website, referral, ads" }
}
},
"questions": [
{
"id": "purchase_intent",
"type": "probability",
"prompt": "Does this lead have real intent to buy in the next 30 days?",
"options": ["yes", "no"]
},
{
"id": "priority",
"type": "score",
"prompt": "How urgent is it to answer this lead?",
"options": ["low", "medium", "high", "critical"]
},
{
"id": "route",
"type": "choice",
"prompt": "Which team should receive this lead?",
"options": ["sales", "sdr", "nurture", "spam", "other"]
}
],
"composites": [
{ "id": "lead_score", "description": "0–1 ranking: intent counts double, priority adds, spam-like routes don't count" }
],
"actions": ["continue", "block", "escalate", "fallback"],
"fallback_action": "escalate",
"example_state": { "message": "<message>", "company_size": 1.5, "source": "<source>" }
}| Field | Type | Description |
|---|---|---|
slug | string | The decision's slug. |
name | string | The decision's name. |
description | string or null | The decision's description. |
status | string | draft, deployed or disabled. |
version | integer or null | The active version; null for a draft. |
state_schema | object or null | The state the active version accepts, as JSON Schema — the API contract of the editor: { "type": "object", "required", "properties" }, { "type": "string" } for a text state or { "type": "array", "items" } for a list state. null for a draft. |
questions | array | The questions, in order. Empty for a draft. |
questions[].id | string | The question key — the key of its answer in result and confidence. |
questions[].type | string | choice, score or probability. |
questions[].prompt | string, object or array | The question's instructions, as written in the schema. |
questions[].options | array | What the answer can be: the options of a choice question, other included; the level labels of a score question, lowest first; ["yes", "no"] for a probability question, whose result is the probability of yes. |
questions[].min_confidence | number | Only when the question has a minConfidence: below it, the fallback action applies. |
composites | array | Only for decisions with composites: each one's id and description. |
actions | array | The actions a response can carry: continue, block, escalate and fallback. Empty for a draft. |
fallback_action | string | The action for an other answer or low confidence — see Policies and actions. Absent for a draft. |
example_state | any | A placeholder state with the right shape — strings as <field>, numbers as 1.5, integers as 1 — to start from. Replace the values before running. null for a draft. |
A draft answers 200 with version, state_schema and example_state set to null and empty questions and actions. Policies, destinations, settings and the decision's context are never returned.
Errors
| Status | Code | When |
|---|---|---|
| 401 | INVALID_API_KEY | The key is missing, malformed, unknown or revoked. |
| 404 | DECISION_NOT_FOUND | No decision with this slug in the key's workspace, or a malformed slug. |
| 429 | RATE_LIMITED | Too many read requests in the current minute. |
A key only sees its own workspace's decisions.
Run a decision
POST /v1/decisions/{slug} — path, query, headers, request body, every response field and the errors, with examples in cURL, JavaScript and Python.
Get account and usage
GET /v1/me — the workspace, API key and plan behind a key, plus this billing period's usage. Verify a key in CI and watch your quota from code.