List and get decisions
GET /v1/decisions and GET /v1/decisions/{slug} — the decisions of an API key's workspace and each active version's contract — plus the GPT-Live delegation of a decision and its answers endpoint.
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.
Two more endpoints connect a deployed decision to an OpenAI realtime voice session — see GPT-Live delegation.
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.
GPT-Live delegation
GET https://api.dcision.io/v1/decisions/{slug}/openai-live
POST https://api.dcision.io/v1/decisions/{slug}/openai-live/answersA GPT-Live session (OpenAI realtime voice) can ask OpenAI Decisions typed questions while the user speaks. These two endpoints make it ask your deployed decision's questions, and run the decision's policies, destinations and execution log on the answers. The GPT-Live guide shows the whole flow.
Export the delegation
GET /v1/decisions/{slug}/openai-live returns the active version's questions in the OpenAI Decisions format, ready to put in the session request as delegation. It uses the read rate-limit window and isn't billed.
curl https://api.dcision.io/v1/decisions/lead-qualification/openai-live \
-H "Authorization: Bearer $DCISION_API_KEY"{
"decision": "lead-qualification",
"version": 3,
"delegation": {
"type": "decisions",
"model": "gpt-6-luna",
"questions": [
{
"type": "predicate",
"name": "purchase_intent",
"instructions": "Does this lead have real intent to buy in the next 30 days?\n\nTrue when: asks for pricing, a demo, a quote or a start date\nFalse when: just browsing, student, vendor or spam"
},
{
"type": "score",
"name": "priority",
"instructions": "How urgent is it to answer this lead?",
"levels": [{ "label": "low" }, { "label": "medium" }, { "label": "high" }, { "label": "critical" }]
},
{
"type": "choice",
"name": "route",
"instructions": "Which team should receive this lead?",
"choices": [
{ "value": "sales", "description": "high intent, ready to talk to sales" },
{ "value": "sdr", "description": "some intent, needs qualification" },
{ "value": "nurture", "description": "early stage, send content" },
{ "value": "spam", "description": "spam, vendor pitch or irrelevant" },
{ "value": "other", "description": "none of the options above" }
]
}
]
},
"answers_url": "/v1/decisions/lead-qualification/openai-live/answers"
}| Field | Type | Description |
|---|---|---|
decision | string | The decision's slug. |
version | integer | The active version the questions come from. |
delegation.type | string | Always decisions. |
delegation.model | string | The OpenAI Decisions model, gpt-6-luna. |
delegation.questions | array | The questions, in order, translated as for the OpenAI Decisions engine: predicate (probability), choice with choices (value, description) and score with levels (label, description). Each has a name — the question key — and instructions. |
answers_url | string | Where to send the answers: the path of POST /v1/decisions/{slug}/openai-live/answers. |
Only the questions are exported: the decision's context, policies and destinations stay in Dcision. Export the delegation again after each deploy so the session asks the new version's questions.
Send the answers
POST /v1/decisions/{slug}/openai-live/answers takes the answers of a decision.completed event of the session and returns the same response as POST /v1/decisions/{slug}. No engine is called.
curl -X POST https://api.dcision.io/v1/decisions/lead-qualification/openai-live/answers \
-H "Authorization: Bearer $DCISION_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "model": "gpt-6-luna", "answers": [
{ "type": "predicate", "name": "purchase_intent", "probability": 0.92 },
{ "type": "score", "name": "priority", "score": 2.03, "probabilities": [
{ "value": 0, "label": "low", "probability": 0.02 }, { "value": 1, "label": "medium", "probability": 0.1 },
{ "value": 2, "label": "high", "probability": 0.71 }, { "value": 3, "label": "critical", "probability": 0.17 } ] },
{ "type": "choice", "name": "route", "choice": "sales", "probabilities": [
{ "value": "sales", "probability": 0.9 }, { "value": "sdr", "probability": 0.07 }, { "value": "other", "probability": 0.03 } ] }
] }'| Field | Type | Description |
|---|---|---|
answers | array | Required, 1 to 200 items: the answers of the decision.completed event, as OpenAI sent them — predicate, choice, score or refusal, each with the question's name. |
model | string | Optional. The model that answered; gpt-6-luna when absent. Recorded as metrics.model. |
usage | object | Optional. input_tokens and output_tokens of the session's decision, recorded with the execution. |
state | any | Optional. Context for destinations and the execution log — for example the app's state during the call. Validated against the decision's state schema when sent. |
?include=probabilities adds the full distributions, as on Run a decision.
{
"decision_id": "dec_3fKq9ZtW1mXcV7bN2pLa",
"execution_id": "exec_Lv7Qm2Xc9Tn4Rb8Wk1Pz",
"schema": "lead-qualification",
"version": 3,
"result": { "purchase_intent": 0.92, "priority": "high", "route": "sales" },
"confidence": { "purchase_intent": 0.84, "priority": 0.69, "route": 0.875 },
"scores": { "priority": 3.03 },
"composites": { "lead_score": 0.8542 },
"action": "continue",
"action_reason": { "type": "default" },
"metrics": {
"latency_ms": 38,
"engine": "openai",
"model": "gpt-6-luna",
"estimated_cost_usd": 0,
"input_tokens": 0,
"output_tokens": 0
}
}- Same rules as a run. Policies, the refusal,
otherandminConfidencechecks, composites and destinations run on the answers;actionandaction_reasonmean what they mean everywhere. - Billed like a run. Each call counts toward the plan's included decisions and then uses credits.
metrics.estimated_cost_usdis0: OpenAI already billed the Live session. - Logged as an execution with source API, engine
openaiand credential live — it shows in Executions, the decision's Overview andGET /v1/executions. - It uses the decisions rate-limit window.
Idempotency-Keyisn't supported: a retried call runs — and is billed — again.
Errors of the GPT-Live endpoints
| Status | Code | When |
|---|---|---|
| 400 | INVALID_REQUEST | No answers, more than 200, or answers that don't match the deployed questions — a missing question, a choice that isn't an option, a wrong answer type. |
| 401 | INVALID_API_KEY | The key is missing, malformed, unknown or revoked. |
| 402 | CREDITS_EXHAUSTED, SPEND_CAP_REACHED, QUOTA_EXCEEDED | Answers only, as on Run a decision. |
| 404 | DECISION_NOT_FOUND | No decision with this slug in the key's workspace. |
| 409 | DECISION_NOT_DEPLOYED | The decision has never been deployed. Answers also return DECISION_DISABLED for a disabled endpoint. |
| 422 | INVALID_STATE | Answers only: the optional state doesn't match the state schema. |
| 429 | RATE_LIMITED | Too many requests in the current minute. |