OrgX Decisions API
Raise decisions for human ruling and read their state
Raise decisions for human ruling and read their state
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/useorgx-com:useorgx-com-decisions-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: OrgX REST API v1 Decisions API
version: '1'
description: 'Build accountable work into your product with OrgX REST API v1.
Create work with one field, attach evidence when it is complete, and keep the receipt. Every authenticated request is scoped to the workspace resolved from your credential.
Start with `POST /work`. Human guide: https://docs.useorgx.com/docs/api/quickstart'
contact:
name: OrgX Support
url: https://useorgx.com/support
email: support@useorgx.com
license:
name: Proprietary
url: https://useorgx.com/terms
servers:
- url: https://useorgx.com/api/v1
description: Production
tags:
- name: Decisions
description: Raise decisions for human ruling and read their state
paths:
/decisions:
post:
operationId: createDecision
summary: Raise a decision
description: 'Create a decision request for a human ruling. Automated callers raise and read decisions;
approving or declining stays a signed-in human action, recorded with lifecycle history.
Reuse the same Idempotency-Key and request body to receive the original decision. Reusing
the key with a different body returns an idempotency conflict.'
tags:
- Decisions
security:
- bearerAuth: []
- cookieAuth: []
parameters:
- $ref: '#/components/parameters/IdempotencyKey'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/DecisionCreateRequest'
example:
workspace_id: 5be1076d-8fd0-4c0f-847f-fd67fdb935e8
title: Approve the pricing page rewrite
shape: option_select
shape_context:
options:
- id: ship
label: Ship it
- id: revise
label: One more pass
urgency: urgent
responses:
'200':
description: The original decision returned for an idempotent replay
content:
application/json:
schema:
$ref: '#/components/schemas/DecisionCreateResponse'
example:
decision:
id: 8cf6f6a4-9a3f-4a52-8d0e-6a4c2b1f9e37
workspace_id: 5be1076d-8fd0-4c0f-847f-fd67fdb935e8
title: Approve the pricing page rewrite
status: pending
shape: option_select
urgency: urgent
blocks_task: false
created_at: 2026-08-19 15:04:00+00:00
updated_at: 2026-08-19 15:04:00+00:00
'201':
description: Decision created in the pending state
content:
application/json:
schema:
$ref: '#/components/schemas/DecisionCreateResponse'
example:
decision:
id: 8cf6f6a4-9a3f-4a52-8d0e-6a4c2b1f9e37
workspace_id: 5be1076d-8fd0-4c0f-847f-fd67fdb935e8
title: Approve the pricing page rewrite
status: pending
shape: option_select
urgency: urgent
blocks_task: false
created_at: 2026-08-19 15:04:00+00:00
updated_at: 2026-08-19 15:04:00+00:00
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
'503':
$ref: '#/components/responses/ServiceUnavailable'
get:
operationId: listDecisions
summary: List decisions
description: List workspace decisions with their shape, urgency, and resolution state. Resolution itself happens in the OrgX app under a signed-in human.
tags:
- Decisions
security:
- bearerAuth: []
- cookieAuth: []
parameters:
- $ref: '#/components/parameters/WorkspaceIdQuery'
- name: shape
in: query
required: false
schema:
type: string
- name: urgency
in: query
required: false
schema:
type: string
enum:
- deferred
- standard
- urgent
- critical
- name: status
in: query
required: false
schema:
type: string
enum:
- pending
- approved
- declined
- superseded
- cancelled
- name: limit
in: query
required: false
schema:
type: integer
minimum: 1
maximum: 200
default: 50
responses:
'200':
description: Workspace decisions
content:
application/json:
schema:
$ref: '#/components/schemas/DecisionListResponse'
example:
decisions:
- id: 8cf6f6a4-9a3f-4a52-8d0e-6a4c2b1f9e37
workspace_id: 5be1076d-8fd0-4c0f-847f-fd67fdb935e8
title: Approve the pricing page rewrite
status: pending
shape: option_select
urgency: urgent
blocks_task: false
created_at: 2026-08-19 15:04:00+00:00
updated_at: 2026-08-19 15:04:00+00:00
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
'503':
$ref: '#/components/responses/ServiceUnavailable'
/decisions/{id}:
get:
operationId: getDecision
summary: Read one decision
description: 'Poll a single decision by id. This is the read an automated caller waits on after raising
a decision: it reports `status`, the resolution fields once a human has ruled, the
`blocking` ids the decision is holding up, and the current `attention` request.
The workspace comes from the decision row rather than from a parameter, so a caller that
knows only the decision id can still reach it. Ids outside the caller''s workspaces, ids
outside a workspace-bound key''s binding, and ids that were never issued share one
not-found response.'
tags:
- Decisions
security:
- bearerAuth: []
- cookieAuth: []
parameters:
- $ref: '#/components/parameters/DecisionId'
responses:
'200':
description: The decision, its blocking scope, and its attention state
content:
application/json:
schema:
$ref: '#/components/schemas/DecisionDetailResponse'
example:
data:
id: 8cf6f6a4-9a3f-4a52-8d0e-6a4c2b1f9e37
workspace_id: 5be1076d-8fd0-4c0f-847f-fd67fdb935e8
title: Approve the pricing page rewrite
summary: Two options, both reversible.
shape: option_select
urgency: urgent
status: pending
resolution: null
resolved_at: null
is_resolved: false
blocks_task: true
blocking:
run_id: 9c7b1d68-2c5c-4d6b-9a8e-5c4f2c0c5b4d
initiative_id: 4b014796-2f1e-4a1d-9c3b-7e5a2d6f8c10
workstream_id: 1f2e3d4c-5b6a-4798-8a9b-0c1d2e3f4a5b
attention:
protocol: orgx.attention.v1
kind: approval
impact_if_delayed: The rewrite blocks the launch checklist.
recommended_option_id: ship
request_count: 2
continuation:
strategy: resume_session
state: waiting
poll_url: /api/v1/decisions/8cf6f6a4-9a3f-4a52-8d0e-6a4c2b1f9e37
resolve_url: https://useorgx.com/decisions/8cf6f6a4-9a3f-4a52-8d0e-6a4c2b1f9e37
created_at: 2026-08-19 15:04:00+00:00
updated_at: 2026-08-19 15:06:00+00:00
meta:
apiVersion: '1'
workspaceId: 5be1076d-8fd0-4c0f-847f-fd67fdb935e8
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
'503':
$ref: '#/components/responses/ServiceUnavailable'
/decisions/{id}/attention:
post:
operationId: raiseDecisionAttention
summary: Ask a human to look at a decision
description: 'Raise or refresh attention on a pending decision and receive a poll handle. Use it when
work is blocked and a person needs to rule: carry the option you would pick, why, and
what it costs to wait.
This operation writes the attention request and leaves the ruling itself to a signed-in
human at `resolve_url`. The workspace, initiative, and run the decision belongs to are
read from the decision row, so the request body carries none of them; an unrecognised
field is rejected rather than ignored.
Repeating the call refreshes one attention record — the original `attention_id` and
`requested_at` are kept and `request_count` advances — so a retry after a timeout is
safe.'
tags:
- Decisions
security:
- bearerAuth: []
- cookieAuth: []
parameters:
- $ref: '#/components/parameters/DecisionId'
- $ref: '#/components/parameters/IdempotencyKeyOptional'
requestBody:
required: false
content:
application/json:
schema:
$ref: '#/components/schemas/DecisionAttentionRequest'
example:
recommended_option_id: ship
recommendation_note: Both are reversible; shipping is the cheaper mistake.
impact_if_delayed: The rewrite blocks the launch checklist.
continuation:
strategy: resume_session
responses:
'202':
description: Attention recorded; poll the decision for the ruling
content:
application/json:
schema:
$ref: '#/components/schemas/DecisionAttentionResponse'
example:
data:
decision_id: 8cf6f6a4-9a3f-4a52-8d0e-6a4c2b1f9e37
status: pending
attention_id: b2c3d4e5-f6a7-4b8c-9d0e-1f2a3b4c5d6e
blocking:
run_id: 9c7b1d68-2c5c-4d6b-9a8e-5c4f2c0c5b4d
initiative_id: 4b014796-2f1e-4a1d-9c3b-7e5a2d6f8c10
workstream_id: 1f2e3d4c-5b6a-4798-8a9b-0c1d2e3f4a5b
poll_url: /api/v1/decisions/8cf6f6a4-9a3f-4a52-8d0e-6a4c2b1f9e37
resolve_url: https://useorgx.com/decisions/8cf6f6a4-9a3f-4a52-8d0e-6a4c2b1f9e37
poll_after_ms: 5000
meta:
apiVersion: '1'
workspaceId: 5be1076d-8fd0-4c0f-847f-fd67fdb935e8
duplicate: false
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
'409':
description: The decision has already been resolved
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'503':
$ref: '#/components/responses/ServiceUnavailable'
/decisions/{id}/resolution:
post:
operationId: resolveDecision
summary: Rule on a decision
description: 'Record a human ruling: `approved`, `adjusted` (approved with modifications captured in
`resolution_context`), or `archived` (superseded or no longer relevant).
Authentication is a signed-in browser session with a CSRF token, and that is enforced by
which middleware this route composes rather than by a check inside the handler — an
`oxk_` API key or a service credential reaches a 401 at the session gate. A delegated
credential is weaker evidence than a person''s own action, so agents raise attention with
`POST /decisions/{id}/attention` and wait for the ruling here.'
tags:
- Decisions
security:
- cookieAuth: []
parameters:
- $ref: '#/components/parameters/DecisionId'
- $ref: '#/components/parameters/IdempotencyKeyOptional'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/DecisionResolutionRequest'
example:
resolution: approved
selected_option_id: ship
note: Cheaper and reversible; revisit after the launch.
responses:
'200':
description: The decision after the ruling
content:
application/json:
schema:
$ref: '#/components/schemas/DecisionDetailResponse'
example:
data:
id: 8cf6f6a4-9a3f-4a52-8d0e-6a4c2b1f9e37
workspace_id: 5be1076d-8fd0-4c0f-847f-fd67fdb935e8
title: Approve the pricing page rewrite
shape: option_select
urgency: urgent
status: approved
resolution: approved
resolution_context:
selected_option_id: ship
resolved_at: 2026-08-19 15:20:00+00:00
is_resolved: true
blocks_task: true
blocking:
run_id: 9c7b1d68-2c5c-4d6b-9a8e-5c4f2c0c5b4d
initiative_id: 4b014796-2f1e-4a1d-9c3b-7e5a2d6f8c10
workstream_id: 1f2e3d4c-5b6a-4798-8a9b-0c1d2e3f4a5b
poll_url: /api/v1/decisions/8cf6f6a4-9a3f-4a52-8d0e-6a4c2b1f9e37
resolve_url: https://useorgx.com/decisions/8cf6f6a4-9a3f-4a52-8d0e-6a4c2b1f9e37
created_at: 2026-08-19 15:04:00+00:00
updated_at: 2026-08-19 15:20:00+00:00
meta:
apiVersion: '1'
workspaceId: 5be1076d-8fd0-4c0f-847f-fd67fdb935e8
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
description: The session is missing a valid CSRF token
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'404':
$ref: '#/components/responses/NotFound'
'409':
$ref: '#/components/responses/Conflict'
'503':
$ref: '#/components/responses/ServiceUnavailable'
components:
schemas:
DecisionCreateRequest:
type: object
additionalProperties: false
required:
- workspace_id
- title
properties:
workspace_id:
type: string
format: uuid
title:
type: string
minLength: 1
maxLength: 500
description:
type: string
maxLength: 8000
shape:
type: string
default: generic
enum:
- generic
- artifact_review
- icp_confirm
- budget_approval
- handoff_route
- plan_adjust
- task_restart
- escalation
- option_select
- option_multiselect
shape_context:
type: object
additionalProperties: true
default: {}
urgency:
type: string
default: standard
enum:
- deferred
- standard
- urgent
- critical
blocks_task:
type: boolean
task_id:
type: string
format: uuid
initiative_id:
type: string
format: uuid
DecisionBlockingScope:
type: object
description: What the decision is holding up. Read from the decision row, never supplied by a caller.
properties:
run_id:
type: string
format: uuid
nullable: true
initiative_id:
type: string
format: uuid
nullable: true
workstream_id:
type: string
format: uuid
nullable: true
Decision:
type: object
description: A decision request awaiting or carrying a human ruling. Additional lifecycle fields (resolution, priority, due dates, occurrence tracking) appear as the decision progresses.
additionalProperties: true
required:
- id
- workspace_id
- title
- status
properties:
id:
type: string
format: uuid
workspace_id:
type: string
format: uuid
title:
type: string
summary:
type:
- string
- 'null'
status:
type: string
enum:
- pending
- approved
- declined
- superseded
- cancelled
shape:
type: string
enum:
- generic
- artifact_review
- icp_confirm
- budget_approval
- handoff_route
- plan_adjust
- task_restart
- escalation
- option_select
- option_multiselect
shape_context:
type: object
additionalProperties: true
urgency:
type: string
enum:
- deferred
- standard
- urgent
- critical
blocks_task:
type: boolean
task_id:
type:
- string
- 'null'
format: uuid
initiative_id:
type:
- string
- 'null'
format: uuid
created_at:
type: string
format: date-time
updated_at:
type: string
format: date-time
DecisionCreateResponse:
type: object
required:
- decision
properties:
decision:
$ref: '#/components/schemas/Decision'
DecisionDetail:
type: object
additionalProperties: false
required:
- id
- workspace_id
- status
- poll_url
- resolve_url
properties:
id:
type: string
format: uuid
workspace_id:
type: string
format: uuid
nullable: true
title:
type: string
nullable: true
summary:
type: string
nullable: true
decision_type:
type: string
nullable: true
shape:
type: string
enum:
- generic
- artifact_review
- icp_confirm
- budget_approval
- handoff_route
- plan_adjust
- task_restart
- escalation
- option_select
- option_multiselect
shape_context:
type: object
additionalProperties: true
urgency:
type: string
nullable: true
enum:
- deferred
- standard
- urgent
- critical
- null
priority:
type: string
nullable: true
enum:
- low
- medium
- high
- urgent
- null
status:
type: string
nullable: true
enum:
- pending
- approved
- declined
- rejected
- superseded
- cancelled
- null
resolution:
type: string
nullable: true
enum:
- approved
- adjusted
- archived
- null
resolution_context:
type: object
additionalProperties: true
resolution_summary:
type: string
nullable: true
resolved_at:
type: string
nullable: true
is_resolved:
type: boolean
description: Whether a human has ruled. The identity of the resolver stays server-side.
blocks_task:
type: boolean
blocking:
$ref: '#/components/schemas/DecisionBlockingScope'
attention:
$ref: '#/components/schemas/DecisionAttentionState'
poll_url:
type: string
description: Re-read this decision here.
resolve_url:
type: string
description: Where a signed-in human rules on it.
due_at:
type: string
nullable: true
created_at:
type: string
nullable: true
updated_at:
type: string
nullable: true
DecisionAttentionState:
type: object
nullable: true
description: 'The standing request for a human to look at this decision. Continuation routing material
held alongside it — peer and session handles — stays server-side; the fields here are the
ones a caller needs in order to judge whether to act.'
properties:
protocol:
type: string
nullable: true
enum:
- orgx.attention.v1
- null
kind:
type: string
nullable: true
enum:
- question
- permission
- approval
- recovery
- null
blocking:
type: boolean
response_mode:
type: string
nullable: true
impact_if_delayed:
type: string
nullable: true
recommendation_note:
type: string
nullable: true
recommended_option_id:
type: string
nullable: true
recommended_action:
type: string
nullable: true
attention_id:
type: string
nullable: true
requested_at:
type: string
nullable: true
description: When attention was first raised. Stable across refreshes.
refreshed_at:
type: string
nullable: true
request_count:
type: integer
description: How many times attention has been raised or refreshed.
continuation:
type: object
properties:
strategy:
type: string
nullable: true
enum:
- reply_in_place
- resume_session
- followup_from_checkpoint
- poll
- none
- null
state:
type: string
nullable: true
enum:
- waiting
- answer_received
- resuming
- resumed
- resume_failed
- cancelled
- null
DecisionResolutionRequest:
type: object
additionalProperties: false
required:
- resolution
properties:
resolution:
type: string
enum:
- approved
- adjusted
- archived
resolution_context:
type: object
additionalProperties: true
description: Structured record of what was decided, for `adjusted` rulings especially.
note:
type: string
maxLength: 4000
description: Human note kept with the decision's audit trail.
selected_option_id:
type: string
minLength: 1
maxLength: 120
description: For `option_select` decisions, the chosen `shape_context.options[].id`.
selected_option_ids:
type: array
items:
type: string
minLength: 1
maxLength: 120
description: For `option_multiselect` decisions, the chosen option ids.
DecisionAttentionRequest:
type: object
additionalProperties: false
description: 'Every field is optional; an empty body refreshes attention with no recommendation. The
schema is closed, so `workspace_id`, `initiative_id`, and `run_id` are rejected — those
are read from the decision row instead.'
properties:
recommended_option_id:
type: string
minLength: 1
maxLength: 120
nullable: true
description: An id from `shape_context.options[].id` on the decision.
recommendation_note:
type: string
maxLength: 2000
nullable: true
description: Why that option, in the words a human will read first.
impact_if_delayed:
type: string
maxLength: 500
nullable: true
description: What waiting costs, so a human can rank this against everything else.
continuation:
type: object
additionalProperties: false
properties:
strategy:
type: string
default: poll
enum:
- reply_in_place
- resume_session
- followup_from_checkpoint
- poll
- none
description: How the caller expects to be resumed once a human rules.
DecisionDetailResponse:
type: object
required:
- data
- meta
properties:
data:
$ref: '#/components/schemas/DecisionDetail'
meta:
type: object
properties:
apiVersion:
type: string
workspaceId:
type: string
format: uuid
ApiError:
type: object
properties:
error:
type: object
properties:
code:
type: string
message:
type: string
details:
type: object
requestId:
type: string
timestamp:
type: string
format: date-time
docsUrl:
type: string
format: uri
retryAfter:
type: integer
description: Seconds until rate limit resets
DecisionAttentionResponse:
type: object
required:
- data
- meta
properties:
data:
type: object
required:
- decision_id
- poll_url
- resolve_url
- poll_after_ms
properties:
decision_id:
type: string
format: uuid
status:
type: string
nullable: true
attention_id:
type: string
nullable: true
description: Stable across refreshes of the same attention request.
blocking:
$ref: '#/components/schemas/DecisionBlockingScope'
poll_url:
type: string
resolve_url:
type: string
poll_after_ms:
type: integer
description: Suggested wait before re-reading the decision.
meta:
type: object
properties:
apiVersion:
type: string
workspaceId:
type: string
format: uuid
duplicate:
type: boolean
description: True when this call refreshed an attention request that already existed.
DecisionListResponse:
type: object
required:
- decisions
properties:
decisions:
type: array
items:
$ref: '#/components/schemas/Decision'
parameters:
DecisionId:
name: id
in: path
required: true
schema:
type: string
format: uuid
description: Decision id, as returned by POST /decisions.
IdempotencyKey:
name: Idempotency-Key
in: header
required: true
schema:
type: string
minLength: 1
maxLength: 200
pattern: ^[A-Za-z0-9][A-Za-z0-9._:/-]{0,199}$
description: Workspace-scoped retry key for safe mutation replay.
IdempotencyKeyOptional:
name: Idempotency-Key
in: header
required: false
schema:
type: string
minLength: 1
maxLength: 200
pattern: ^[A-Za-z0-9][A-Za-z0-9._:/-]{0,199}$
description: Accepted for forward compatibility. Replay safety for this operation comes from its own state checks, described on the operation.
WorkspaceIdQuery:
name: workspace_id
in: query
required: true
schema:
type: string
format: uuid
responses:
ServiceUnavailable:
description: Ledger or workspace authorization is unavailable
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
BadRequest:
description: Request validation failed
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
Unauthorized:
description: Authentication required
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
Conflict:
description: Idempotency or expected-version conflict
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
NotFound:
description: Resource is unavailable to the caller
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: 'OrgX API key, sent as `Authorization: Bearer oxk_...`'
cookieAuth:
type: apiKey
in: cookie
name: __session
description: Session cookie from web authentication
stripeSignature:
type: apiKey
in: header
name: stripe-signature
description: Stripe webhook signature
externalDocs:
description: Human-readable OrgX REST API v1 reference
url: https://docs.useorgx.com/docs/api/public-api