> ## Documentation Index
> Fetch the complete documentation index at: https://docs.useorgx.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Raise a decision

> 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.



## OpenAPI

````yaml /openapi/v1.yaml post /decisions
openapi: 3.1.0
info:
  title: OrgX REST API v1
  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
security: []
tags:
  - name: Work
    description: Create accountable work and complete it with evidence
  - name: Initiatives
    description: Organize related work around an outcome
  - name: Operating processes
    description: Evidence-backed company workflow/process lifecycle
  - name: Operating map
    description: Derived, rebuildable Operating Map projection over the process ledger
  - name: Discovery runs
    description: Wizard and deep-search workflow discovery over connected company sources
  - name: Handoffs
    description: Ledger-backed stage handoffs between operating-process stages
  - name: Events
    description: Replayable, workspace-scoped accepted ledger events
  - name: Projections
    description: Workspace-scoped, rebuildable read projections over OrgX sources
  - name: Episodes
    description: Mission-compatible Episode read adapters
  - name: Receipt validation
    description: Account-free Agent Work Receipt schema discovery and conformance
  - name: Receipt import
    description: Authenticated, workspace-scoped import into the hosted receipt ledger
  - name: Workload diagnosis
    description: >-
      Account-free evaluation of time, agents, systems, authority, and
      accountability boundaries
  - name: Content Studio
    description: >-
      Estimate, showcase, checkout, and payment event operations for Content
      Studio
  - name: Decisions
    description: Raise decisions for human ruling and read their state
  - name: Artifacts
    description: Register produced work against the entity it belongs to
  - name: Launches
    description: Preview and run an initiative launch through its spend gates
  - name: Runs
    description: Control agent runs with pause, resume, cancel, and rollback
  - name: Lifecycle
    description: Pause, resume, retry, or cancel work hierarchy nodes and runs
  - name: Deduplication
    description: Claim durable event fingerprints so duplicate triggers fire once
  - name: Credential
    description: >-
      Resolve the calling credential, the workspaces it reaches, and what it may
      do
  - name: API discovery
    description: Account-free error codes, request schemas, and closed vocabularies for v1
externalDocs:
  description: Human-readable OrgX REST API v1 reference
  url: https://docs.useorgx.com/docs/api/public-api
paths:
  /decisions:
    post:
      tags:
        - Decisions
      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.
      operationId: createDecision
      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-19T15:04:00.000Z'
                  updated_at: '2026-08-19T15:04:00.000Z'
        '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-19T15:04:00.000Z'
                  updated_at: '2026-08-19T15:04:00.000Z'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
        - cookieAuth: []
components:
  parameters:
    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.
  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
    DecisionCreateResponse:
      type: object
      required:
        - decision
      properties:
        decision:
          $ref: '#/components/schemas/Decision'
    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
    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
  responses:
    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'
    NotFound:
      description: Resource is unavailable to the caller
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    ServiceUnavailable:
      description: Ledger or workspace authorization is unavailable
      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

````