OrgX Operating processes API

Evidence-backed company workflow/process lifecycle

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 5

GET /operating-processes List operating processes #
POST /operating-processes Propose an operating process #
GET /operating-processes/{processId} Get an operating process #
POST /operating-processes/{processId}/confirm Confirm an operating process #
POST /operating-processes/{processId}/activate Activate an operating process #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • 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.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/useorgx-com:useorgx-com-operating-processes-api"
All apis
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.

Get an API 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 Specification

useorgx-com-operating-processes-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: OrgX REST API v1 Operating processes 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: Operating processes
  description: Evidence-backed company workflow/process lifecycle
paths:
  /operating-processes:
    get:
      operationId: listOperatingProcesses
      summary: List operating processes
      description: List the workspace processes your team has proposed, confirmed, or activated.
      tags:
      - Operating processes
      security:
      - bearerAuth: []
      - cookieAuth: []
      parameters:
      - name: workspace_id
        in: query
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Owner-scoped operating processes
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OperatingProcessListResponse'
              example:
                data:
                - schemaVersion: 1.0.0
                  id: a5614527-0ce6-43be-8d1d-d012b7394867
                  workspaceId: 09707fa5-aaae-4493-8a23-827111000f89
                  name: Review the launch plan
                  purpose: Coordinate a launch review from proposal through verified completion.
                  valueRecipientRefs:
                  - id: 2d4b7f66-3a2a-4e9d-9ad1-3b2d1b2e4101
                    workspaceId: 09707fa5-aaae-4493-8a23-827111000f89
                  domainRef:
                    id: 2d4b7f66-3a2a-4e9d-9ad1-3b2d1b2e4101
                    workspaceId: 09707fa5-aaae-4493-8a23-827111000f89
                  lifecycleState: discovered
                  currentRevisionRef:
                    id: 2d4b7f66-3a2a-4e9d-9ad1-3b2d1b2e4101
                    workspaceId: 09707fa5-aaae-4493-8a23-827111000f89
                  accountableResponsibilityLinkRef:
                    id: 2d4b7f66-3a2a-4e9d-9ad1-3b2d1b2e4101
                    workspaceId: 09707fa5-aaae-4493-8a23-827111000f89
                  provenanceMode: declared
                  confidence: 0
                  tags:
                  - launch-readiness
                  createdAt: 2026-08-18 18:30:00+00:00
                  updatedAt: 2026-08-18 18:30:00+00:00
                meta: {}
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
    post:
      operationId: proposeOperatingProcess
      summary: Propose an operating process
      description: Propose a process from observed work and return its first revision for review.
      tags:
      - Operating processes
      security:
      - bearerAuth: []
      - cookieAuth: []
      parameters:
      - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OperatingProcessProposalRequest'
            example:
              workspace_id: 98608ef9-3fc8-4e9a-8ae4-5f80e214cfab
              process:
                schemaVersion: 1.0.0
                id: a5614527-0ce6-43be-8d1d-d012b7394867
                workspaceId: 09707fa5-aaae-4493-8a23-827111000f89
                name: Review the launch plan
                purpose: Coordinate a launch review from proposal through verified completion.
                valueRecipientRefs:
                - id: 2d4b7f66-3a2a-4e9d-9ad1-3b2d1b2e4101
                  workspaceId: 09707fa5-aaae-4493-8a23-827111000f89
                domainRef:
                  id: 2d4b7f66-3a2a-4e9d-9ad1-3b2d1b2e4101
                  workspaceId: 09707fa5-aaae-4493-8a23-827111000f89
                lifecycleState: discovered
                currentRevisionRef:
                  id: 2d4b7f66-3a2a-4e9d-9ad1-3b2d1b2e4101
                  workspaceId: 09707fa5-aaae-4493-8a23-827111000f89
                accountableResponsibilityLinkRef:
                  id: 2d4b7f66-3a2a-4e9d-9ad1-3b2d1b2e4101
                  workspaceId: 09707fa5-aaae-4493-8a23-827111000f89
                provenanceMode: declared
                confidence: 0
                tags:
                - launch-readiness
                createdAt: 2026-08-18 18:30:00+00:00
                updatedAt: 2026-08-18 18:30:00+00:00
              revision:
                schemaVersion: 1.0.0
                id: a5614527-0ce6-43be-8d1d-d012b7394867
                processId: 75e02472-b242-4af9-845d-436c040749ed
                workspaceId: 09707fa5-aaae-4493-8a23-827111000f89
                revisionNumber: 1
                contentDigest: sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                authoredBy:
                  type: human
                  id: 2d4b7f66-3a2a-4e9d-9ad1-3b2d1b2e4101
                stages:
                - key: review
                  name: Review
      responses:
        '201':
          description: Proposal appended to the ledger
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OperatingProcessMutationResponse'
              example:
                data:
                  process:
                    schemaVersion: 1.0.0
                    id: a5614527-0ce6-43be-8d1d-d012b7394867
                    workspaceId: 09707fa5-aaae-4493-8a23-827111000f89
                    name: Review the launch plan
                    purpose: Coordinate a launch review from proposal through verified completion.
                    valueRecipientRefs:
                    - id: 2d4b7f66-3a2a-4e9d-9ad1-3b2d1b2e4101
                      workspaceId: 09707fa5-aaae-4493-8a23-827111000f89
                    domainRef:
                      id: 2d4b7f66-3a2a-4e9d-9ad1-3b2d1b2e4101
                      workspaceId: 09707fa5-aaae-4493-8a23-827111000f89
                    lifecycleState: discovered
                    currentRevisionRef:
                      id: 2d4b7f66-3a2a-4e9d-9ad1-3b2d1b2e4101
                      workspaceId: 09707fa5-aaae-4493-8a23-827111000f89
                    accountableResponsibilityLinkRef:
                      id: 2d4b7f66-3a2a-4e9d-9ad1-3b2d1b2e4101
                      workspaceId: 09707fa5-aaae-4493-8a23-827111000f89
                    provenanceMode: declared
                    confidence: 0
                    tags:
                    - launch-readiness
                    createdAt: 2026-08-18 18:30:00+00:00
                    updatedAt: 2026-08-18 18:30:00+00:00
                  revision:
                    schemaVersion: 1.0.0
                    id: a5614527-0ce6-43be-8d1d-d012b7394867
                    processId: 75e02472-b242-4af9-845d-436c040749ed
                    workspaceId: 09707fa5-aaae-4493-8a23-827111000f89
                    revisionNumber: 1
                    contentDigest: sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    authoredBy:
                      type: human
                      id: 2d4b7f66-3a2a-4e9d-9ad1-3b2d1b2e4101
                    stages:
                    - key: review
                      name: Review
                  ledger:
                    eventId: 5e0e63b4-ae40-4cad-8d31-ab19a5622e4c
                    aggregateVersion: 1
                    eventHash: sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    duplicate: false
                    payloadDigest: sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
                meta:
                  apiVersion: '1'
                  workspaceId: 09707fa5-aaae-4493-8a23-827111000f89
        '200':
          description: Idempotent replay of the same proposal
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OperatingProcessMutationResponse'
              example:
                data:
                  process:
                    schemaVersion: 1.0.0
                    id: a5614527-0ce6-43be-8d1d-d012b7394867
                    workspaceId: 09707fa5-aaae-4493-8a23-827111000f89
                    name: Review the launch plan
                    purpose: Coordinate a launch review from proposal through verified completion.
                    valueRecipientRefs:
                    - id: 2d4b7f66-3a2a-4e9d-9ad1-3b2d1b2e4101
                      workspaceId: 09707fa5-aaae-4493-8a23-827111000f89
                    domainRef:
                      id: 2d4b7f66-3a2a-4e9d-9ad1-3b2d1b2e4101
                      workspaceId: 09707fa5-aaae-4493-8a23-827111000f89
                    lifecycleState: discovered
                    currentRevisionRef:
                      id: 2d4b7f66-3a2a-4e9d-9ad1-3b2d1b2e4101
                      workspaceId: 09707fa5-aaae-4493-8a23-827111000f89
                    accountableResponsibilityLinkRef:
                      id: 2d4b7f66-3a2a-4e9d-9ad1-3b2d1b2e4101
                      workspaceId: 09707fa5-aaae-4493-8a23-827111000f89
                    provenanceMode: declared
                    confidence: 0
                    tags:
                    - launch-readiness
                    createdAt: 2026-08-18 18:30:00+00:00
                    updatedAt: 2026-08-18 18:30:00+00:00
                  revision:
                    schemaVersion: 1.0.0
                    id: a5614527-0ce6-43be-8d1d-d012b7394867
                    processId: 75e02472-b242-4af9-845d-436c040749ed
                    workspaceId: 09707fa5-aaae-4493-8a23-827111000f89
                    revisionNumber: 1
                    contentDigest: sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    authoredBy:
                      type: human
                      id: 2d4b7f66-3a2a-4e9d-9ad1-3b2d1b2e4101
                    stages:
                    - key: review
                      name: Review
                  ledger:
                    eventId: 5e0e63b4-ae40-4cad-8d31-ab19a5622e4c
                    aggregateVersion: 1
                    eventHash: sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    duplicate: false
                    payloadDigest: sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
                meta:
                  apiVersion: '1'
                  workspaceId: 09707fa5-aaae-4493-8a23-827111000f89
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /operating-processes/{processId}:
    get:
      operationId: getOperatingProcess
      summary: Get an operating process
      description: Get one process with its current revision, lifecycle state, and evidence references.
      tags:
      - Operating processes
      security:
      - bearerAuth: []
      - cookieAuth: []
      parameters:
      - $ref: '#/components/parameters/ProcessId'
      - $ref: '#/components/parameters/WorkspaceIdQuery'
      responses:
        '200':
          description: Operating process detail and revision history
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OperatingProcessDetailResponse'
              example:
                data:
                  process:
                    schemaVersion: 1.0.0
                    id: a5614527-0ce6-43be-8d1d-d012b7394867
                    workspaceId: 09707fa5-aaae-4493-8a23-827111000f89
                    name: Review the launch plan
                    purpose: Coordinate a launch review from proposal through verified completion.
                    valueRecipientRefs:
                    - id: 2d4b7f66-3a2a-4e9d-9ad1-3b2d1b2e4101
                      workspaceId: 09707fa5-aaae-4493-8a23-827111000f89
                    domainRef:
                      id: 2d4b7f66-3a2a-4e9d-9ad1-3b2d1b2e4101
                      workspaceId: 09707fa5-aaae-4493-8a23-827111000f89
                    lifecycleState: discovered
                    currentRevisionRef:
                      id: 2d4b7f66-3a2a-4e9d-9ad1-3b2d1b2e4101
                      workspaceId: 09707fa5-aaae-4493-8a23-827111000f89
                    accountableResponsibilityLinkRef:
                      id: 2d4b7f66-3a2a-4e9d-9ad1-3b2d1b2e4101
                      workspaceId: 09707fa5-aaae-4493-8a23-827111000f89
                    provenanceMode: declared
                    confidence: 0
                    tags:
                    - launch-readiness
                    createdAt: 2026-08-18 18:30:00+00:00
                    updatedAt: 2026-08-18 18:30:00+00:00
                  revisions:
                  - schemaVersion: 1.0.0
                    id: a5614527-0ce6-43be-8d1d-d012b7394867
                    processId: 75e02472-b242-4af9-845d-436c040749ed
                    workspaceId: 09707fa5-aaae-4493-8a23-827111000f89
                    revisionNumber: 1
                    contentDigest: sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    authoredBy:
                      type: human
                      id: 2d4b7f66-3a2a-4e9d-9ad1-3b2d1b2e4101
                    stages:
                    - key: review
                      name: Review
                  observedEpisodeIds:
                  - observed_episode_ids
                  variantIds:
                  - variant_ids
                  aggregateVersion: 1
                meta:
                  apiVersion: '1'
                  workspaceId: 09707fa5-aaae-4493-8a23-827111000f89
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /operating-processes/{processId}/confirm:
    post:
      operationId: confirmOperatingProcess
      summary: Confirm an operating process
      description: Confirm that a proposed process represents how the workspace intends to operate.
      tags:
      - Operating processes
      security:
      - bearerAuth: []
      - cookieAuth: []
      parameters:
      - $ref: '#/components/parameters/ProcessId'
      - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OperatingProcessTransitionRequest'
            example:
              workspace_id: 98608ef9-3fc8-4e9a-8ae4-5f80e214cfab
              expected_aggregate_version: 0
      responses:
        '201':
          description: Process confirmed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OperatingProcessTransitionResponse'
              example:
                data:
                  processId: 75e02472-b242-4af9-845d-436c040749ed
                  transition: confirm
                  ledger:
                    eventId: 5e0e63b4-ae40-4cad-8d31-ab19a5622e4c
                    aggregateVersion: 1
                    eventHash: sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    duplicate: false
                    payloadDigest: sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
                  aggregateVersion: 1
                meta:
                  apiVersion: '1'
                  workspaceId: 09707fa5-aaae-4493-8a23-827111000f89
        '200':
          description: Idempotent replay of confirmation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OperatingProcessTransitionResponse'
              example:
                data:
                  processId: 75e02472-b242-4af9-845d-436c040749ed
                  transition: confirm
                  ledger:
                    eventId: 5e0e63b4-ae40-4cad-8d31-ab19a5622e4c
                    aggregateVersion: 1
                    eventHash: sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    duplicate: false
                    payloadDigest: sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
                  aggregateVersion: 1
                meta:
                  apiVersion: '1'
                  workspaceId: 09707fa5-aaae-4493-8a23-827111000f89
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
  /operating-processes/{processId}/activate:
    post:
      operationId: activateOperatingProcess
      summary: Activate an operating process
      description: Activate a confirmed process so new work can flow through it.
      tags:
      - Operating processes
      security:
      - bearerAuth: []
      - cookieAuth: []
      parameters:
      - $ref: '#/components/parameters/ProcessId'
      - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OperatingProcessTransitionRequest'
            example:
              workspace_id: 98608ef9-3fc8-4e9a-8ae4-5f80e214cfab
              expected_aggregate_version: 0
      responses:
        '201':
          description: Process activated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OperatingProcessTransitionResponse'
              example:
                data:
                  processId: 75e02472-b242-4af9-845d-436c040749ed
                  transition: confirm
                  ledger:
                    eventId: 5e0e63b4-ae40-4cad-8d31-ab19a5622e4c
                    aggregateVersion: 1
                    eventHash: sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    duplicate: false
                    payloadDigest: sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
                  aggregateVersion: 1
                meta:
                  apiVersion: '1'
                  workspaceId: 09707fa5-aaae-4493-8a23-827111000f89
        '200':
          description: Idempotent replay of activation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OperatingProcessTransitionResponse'
              example:
                data:
                  processId: 75e02472-b242-4af9-845d-436c040749ed
                  transition: confirm
                  ledger:
                    eventId: 5e0e63b4-ae40-4cad-8d31-ab19a5622e4c
                    aggregateVersion: 1
                    eventHash: sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    duplicate: false
                    payloadDigest: sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
                  aggregateVersion: 1
                meta:
                  apiVersion: '1'
                  workspaceId: 09707fa5-aaae-4493-8a23-827111000f89
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
components:
  schemas:
    OperatingProcessMutationResponse:
      type: object
      additionalProperties: false
      required:
      - data
      - meta
      properties:
        data:
          type: object
          required:
          - process
          - revision
          - ledger
          properties:
            process:
              $ref: '#/components/schemas/OperatingProcess'
            revision:
              $ref: '#/components/schemas/ProcessSpecRevision'
            ledger:
              $ref: '#/components/schemas/OperatingProcessLedgerResult'
        meta:
          $ref: '#/components/schemas/ContractMeta'
    ContractMeta:
      type: object
      additionalProperties: false
      required:
      - apiVersion
      - workspaceId
      properties:
        apiVersion:
          type: string
          const: '1'
        workspaceId:
          type: string
          format: uuid
        count:
          type: integer
          minimum: 0
    OperatingProcessListResponse:
      type: object
      additionalProperties: false
      required:
      - data
      - meta
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/OperatingProcess'
        meta:
          allOf:
          - $ref: '#/components/schemas/ContractMeta'
          - type: object
            required:
            - count
            properties:
              count:
                type: integer
                minimum: 0
    OperatingProcessTransitionResponse:
      type: object
      additionalProperties: false
      required:
      - data
      - meta
      properties:
        data:
          type: object
          required:
          - processId
          - transition
          - ledger
          - aggregateVersion
          properties:
            processId:
              type: string
              format: uuid
            transition:
              type: string
              enum:
              - confirm
              - activate
            ledger:
              $ref: '#/components/schemas/OperatingProcessLedgerResult'
            aggregateVersion:
              type: integer
              minimum: 1
        meta:
          $ref: '#/components/schemas/ContractMeta'
    OperatingProcessProposalRequest:
      type: object
      additionalProperties: false
      required:
      - workspace_id
      - process
      - revision
      properties:
        workspace_id:
          type: string
          format: uuid
        process:
          $ref: '#/components/schemas/OperatingProcess'
        revision:
          $ref: '#/components/schemas/ProcessSpecRevision'
        correlation_id:
          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
    OperatingProcessTransitionRequest:
      type: object
      additionalProperties: false
      required:
      - workspace_id
      - expected_aggregate_version
      properties:
        workspace_id:
          type: string
          format: uuid
        expected_aggregate_version:
          type: integer
          minimum: 0
        correlation_id:
          type: string
          format: uuid
    OperatingProcessLedgerResult:
      type: object
      additionalProperties: false
      required:
      - eventId
      - aggregateVersion
      - eventHash
      - duplicate
      - payloadDigest
      properties:
        eventId:
          type: string
          format: uuid
        aggregateVersion:
          type: integer
          minimum: 1
        eventHash:
          type: string
        duplicate:
          type: boolean
        payloadDigest:
          type: string
    ProcessSpecRevision:
      type: object
      additionalProperties: false
      required:
      - schemaVersion
      - id
      - processId
      - workspaceId
      - revisionNumber
      - contentDigest
      - authoredBy
      - stages
      properties:
        schemaVersion:
          type: string
          const: 1.0.0
        id:
          type: string
          format: uuid
        processId:
          type: string
          format: uuid
        workspaceId:
          type: string
          format: uuid
        revisionNumber:
          type: integer
          minimum: 1
        contentDigest:
          type: string
          pattern: ^sha256:[a-f0-9]{64}$
        authoredBy:
          type: object
          additionalProperties: false
          required:
          - type
          - id
          properties:
            type:
              type: string
              enum:
              - human
              - agent
              - service
              - external_agent
              - system
            id:
              type: string
        ratifiedBy:
          type: array
          items:
            type: object
        effectiveFrom:
          type: string
          format: date-time
        effectiveTo:
          oneOf:
          - type: string
            format: date-time
          - type: 'null'
        triggerSpec:
          type: object
        intendedTransformation:
          type: object
        stages:
          type: array
          minItems: 1
          items:
            type: object
        handoffs:
          type: array
          items:
            type: object
        completionContract:
          type: object
        exceptionContracts:
          type: array
          items:
            type: object
        systemRefs:
          type: array
          items:
            $ref: '#/components/schemas/OperatingProcessRef'
        capabilityRefs:
          type: array
          items:
            $ref: '#/components/schemas/OperatingProcessRef'
        skillRefs:
          type: array
          items:
            $ref: '#/components/schemas/OperatingProcessRef'
        policyRefs:
          type: array
          items:
            $ref: '#/components/schemas/OperatingProcessRef'
        authorizationRequirements:
          type: array
          items:
            type: object
        budgetRef:
          oneOf:
          - $ref: '#/components/schemas/OperatingProcessRef'
          - type: 'null'
        measurementPlan:
          type: object
        adoptionPlan:
          type: object
        migrationState:
          oneOf:
          - type: object
          - type: 'null'
        provenance:
          type: object
        limitations:
          type: array
          items:
            type: string
    OperatingProcessRef:
      type: object
      additionalProperties: false
      required:
      - id
      - workspaceId
      properties:
        id:
          type: string
        workspaceId:
          type: string
          format: uuid
    OperatingProcess:
      type: object
      additionalProperties: false
      required:
      - schemaVersion
      - id
      - workspaceId
      - name
      - purpose
      - valueRecipientRefs
      - domainRef
      - lifecycleState
      - currentRevisionRef
      - accountableResponsibilityLinkRef
      - provenanceMode
      - confidence
      - tags
      - createdAt
      - updatedAt
      properties:
        schemaVersion:
          type: string
          const: 1.0.0
        id:
          type: string
          format: uuid
        workspaceId:
          type: string
          format: uuid
        name:
          type: string
          minLength: 1
        purpose:
          type: string
          minLength: 1
        valueRecipientRefs:
          type: array
          items:
            $ref: '#/components/schemas/OperatingProcessRef'
        domainRef:
          oneOf:
          - $ref: '#/components/schemas/OperatingProcessRef'
          - type: 'null'
        lifecycleState:
          type: string
          enum:
          - discovered
          - proposed
          - confirmed
          - shadowing
          - active
          - changing
          - deprecated
          - retired
        currentRevisionRef:
          oneOf:
          - $ref: '#/components/schemas/OperatingProcessRef'
          - type: 'null'
        accountableResponsibilityLinkRef:
          oneOf:
          - $ref: '#/components/schemas/OperatingProcessRef'
          - type: 'null'
        provenanceMode:
          type: string
          enum:
          - declared
          - observed
          - reconciled
        confidence:
          type: number
          minimum: 0
          maximum: 1
        tags:
          type: array
          items:
            type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    OperatingProcessDetailResponse:
      type: object
      additionalProperties: false
      required:
      - data
      - meta
      properties:
        data:
          type: object
          required:
          - process
          - revisions
          - observedEpisodeIds
          - variantIds
          - aggregateVersion
          properties:
            process:
              $ref: '#/components/schemas/OperatingProcess'
            revisions:
              type: array
              items:
                $ref: '#/components/schemas/ProcessSpecRevision'
            observedEpisodeIds:
              type: array
              items:
                type: string
            variantIds:
              type: array
              items:
                type: string
            aggregateVersion:
              type: integer
              minimum: 1
        meta:
          $ref: '#/components/schemas/ContractMeta'
  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'
  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.
    ProcessId:
      name: processId
      in: path
      required: true
      schema:
        type: string
        format: uuid
    WorkspaceIdQuery:
      name: workspace_id
      in: query
      required: true
      schema:
        type: string
        format: uuid
  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