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

# Read the current complete Triage record



## OpenAPI

````yaml /api-reference/openapi.json get /records/{intent_id}
openapi: 3.1.0
info:
  title: composerID Intent API
  version: 1.0.0-draft
  summary: >-
    Publish a decision into any destination system of record, under one Intent
    ID.
  description: >
    The composerID Intent API: mint an intent at the decision, plan its

    destinations, preflight against a tenant's own requirements, publish
    idempotently,

    and reconcile drift, with every step on an append-only timeline under one
    Intent ID.


    **Status.** This is the documented contract, served today by the reference
    sandbox

    (`service/` in the composerID repository) over mock destination tenants. The

    production service behind `https://api.composer.id` is in build; nothing
    here is a

    claim that it is live. The sandbox implements this document exactly, so a
    client

    generated from it works against the sandbox now and against production
    unchanged.


    **Authentication.** Bearer token on every request (`Authorization: Bearer

    <token>`). Production clients use OAuth 2.0 client credentials: exchange a

    `client_id` and `client_secret` at `POST /v1/oauth/token` for a token that

    expires in an hour and carries only the scopes the client was granted

    (`intents:read`, `intents:write`, `publish`, `reconcile`, `passthrough`,

    `destinations:read`); a token without the scope a route needs gets 403

    `insufficient_scope`. Personal sandbox API keys are also accepted as bearer

    tokens and carry every scope. All comparisons are constant-time. Destination

    credentials are never supplied by the caller: they are held per tenant and

    injected by the adapter.


    **Sandbox credentials.** The hosted sandbox issues its own: `POST

    /v1/sandbox/keys` (no authentication, rate-limited per caller address)

    creates a tenant with a personal API key, an OAuth client and a webhook

    signing key, shown once and expiring together. Each tenant sees only the

    intents it minted. The local run prints a key at startup instead. The

    production service will not expose this route.

    The one route that carries no bearer token is `POST
    /v1/webhooks/{platform}`:

    the caller is a destination platform, so the delivery authenticates by its

    `X-Signature-HMAC-SHA256-{n}` header (Base64 HMAC-SHA256 over the raw body,

    any active signing key, timing-safe), the same convention composerID's own

    outbound webhooks use.


    **Idempotency.** Publishing is idempotent on

    `{intent_id}-{intent_version}-{target_system}`. A replayed publish returns
    the

    stored receipt with `replayed: true` and never creates a second record in
    the

    destination system. Where a destination documents no idempotency header, the

    adapter dedupes by querying the destination's own client-supplied id before

    creating.


    **What crosses the boundary.** A destination receives a valid request plus
    the

    Intent ID. Diagnostic answers, scores and the Compliance File never leave

    composerID.
  contact:
    name: composerID developer access
    url: https://www.composer.id/authentication
servers:
  - url: https://sandbox.composer.id/v1
    description: >-
      Hosted reference sandbox: mock destination tenants, self-serve credentials
      at POST /sandbox/keys.
  - url: https://api.composer.id/v1
    description: 'Production. In build: see the status note above.'
  - url: http://127.0.0.1:8787/v1
    description: >-
      Local reference sandbox (python3 -m service.server), mock destination
      tenants.
security:
  - oauth2:
      - destinations:read
      - intents:read
      - intents:write
      - passthrough
      - publish
      - reconcile
  - bearerAuth: []
tags:
  - name: Auth
    description: >-
      OAuth 2.0 client credentials. Exchange a client id and secret for a
      short-lived bearer token carrying only the scopes the client was granted.
  - name: Intent
    description: Mint, read, amend and audit an intent. The timeline is append-only.
  - name: Routing
    description: >-
      Apply the Channel Map, then validate against the destination tenant's own
      requirements before publishing.
  - name: Publishing
    description: >-
      Idempotent publish, drift reconciliation, inbound destination events, and
      a raw escape hatch that stays anchored to the Intent ID.
  - name: Discovery
    description: What composerID can reach, and what each destination requires.
externalDocs:
  description: >-
    The composerID documentation: API reference, schemas and destination
    coverage
  url: https://www.composer.id/api-reference/overview
paths:
  /records/{intent_id}:
    get:
      tags:
        - Intent
      summary: Read the current complete Triage record
      operationId: getTriageRecord
      parameters:
        - name: intent_id
          in: path
          required: true
          description: The Intent ID minted by POST /intent.
          schema:
            $ref: '#/components/schemas/IntentId'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TriageDecisionRecord'
        '401':
          description: Missing, invalid or expired bearer token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: 'insufficient_scope: the token lacks `intents:read`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Unknown intent or destination
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - oauth2:
            - intents:read
        - bearerAuth: []
components:
  schemas:
    IntentId:
      type: string
      pattern: ^[A-Za-z0-9_-]{10,64}$
      description: >-
        Minted at the decision and carried unchanged into every destination
        record. Fits a 64-character client-supplied id field, which is how the
        same id finds the record in either direction.
      examples:
        - itn_7f3aK2mQ9xLp
    TriageDecisionRecord:
      title: TriageDecisionRecord
      description: >-
        Immutable full Triage snapshot at an exact Intent ID and version. The
        requester identity and timings are source-reported; submitted_by
        identifies the authenticated sending credential.
      type: object
      required:
        - intent_id
        - intent_version
        - state
        - created_at
        - payload
      properties:
        intent_id:
          type: string
          pattern: ^[A-Za-z0-9_-]{10,64}$
          description: >-
            Identifier-safe ID minted by composerID. URI-safe, no special
            characters.
        intent_version:
          type: integer
          minimum: 1
          description: >-
            Monotonically increasing version; a bump mints a new idempotency
            key.
        state:
          type: string
          enum:
            - draft
            - diagnosed
            - decided
            - planned
            - published
            - failed
            - cancelled
          description: Lifecycle state. Transitions enforce minimum-viable guards.
        payload:
          type: object
          required:
            - triage_record
          properties:
            triage_record:
              type: object
              required:
                - schema_version
                - environment
                - kind
                - requester
                - identity_assurance
                - timing_assurance
                - decision
                - submissions
              properties:
                schema_version:
                  const: '1.0'
                environment:
                  const: sandbox
                kind:
                  enum:
                    - initial
                    - change_request
                requester:
                  type: object
                  required:
                    - id
                    - display_name
                  properties:
                    id:
                      type: string
                      pattern: ^[A-Za-z0-9_.:-]{1,160}$
                    display_name:
                      type: string
                  additionalProperties: false
                identity_assurance:
                  const: source_reported
                timing_assurance:
                  const: client_reported_elapsed
                decision:
                  type: object
                  required:
                    - status
                  properties:
                    status:
                      enum:
                        - not_evaluated
                        - awaiting_desk
                        - decided
                    recommended_channels:
                      type: array
                      items:
                        enum:
                          - permanent_hire
                          - outsourced
                          - contingent
                          - statement_of_work
                          - ai
                      minItems: 0
                      maxItems: 5
                    final_channel:
                      enum:
                        - permanent_hire
                        - outsourced
                        - contingent
                        - statement_of_work
                        - ai
                    scores: {}
                    ruleset_version:
                      type: string
                    override:
                      type: object
                      required:
                        - actor_id
                        - reason
                        - at
                      properties:
                        actor_id:
                          type: string
                        reason:
                          type: string
                        at:
                          type: string
                          format: date-time
                      additionalProperties: false
                  additionalProperties: false
                work:
                  type: object
                  required:
                    - reason
                    - change_types
                  properties:
                    reason:
                      type: string
                    change_types:
                      type: array
                      items:
                        enum:
                          - scope
                          - budget
                          - dates
                          - people
                          - renewal
                          - other
                      minItems: 1
                      maxItems: 6
                    original_intent_id:
                      type: string
                      pattern: ^[A-Za-z0-9_.:-]{1,160}$
                    original_version:
                      type: integer
                      minimum: 1
                    external_reference:
                      type: object
                      required:
                        - system
                        - id
                      properties:
                        system:
                          type: string
                        id:
                          type: string
                      additionalProperties: false
                  additionalProperties: false
                  anyOf:
                    - required:
                        - original_intent_id
                        - original_version
                    - required:
                        - external_reference
                submissions:
                  type: array
                  items:
                    type: object
                    required:
                      - version
                      - received_at
                      - submitted_by
                      - content_sha256
                      - packet
                    properties:
                      version:
                        type: integer
                        minimum: 1
                      received_at:
                        type: string
                        format: date-time
                      submitted_by:
                        type: string
                      content_sha256:
                        type: string
                      packet:
                        $ref: '#/components/schemas/TriageSubmission'
                    additionalProperties: false
                  minItems: 1
                  maxItems: 50
              additionalProperties: false
          additionalProperties: false
        publishing:
          $ref: '#/components/schemas/PublishingBundle'
          description: Populated after the first successful publish.
        defence_file_ref:
          type: string
          format: uri
          description: URI to the DefenceFile (JSON-LD) evidence artifact.
        override_event:
          type:
            - object
            - 'null'
          description: Present when a human override bypassed standard diagnostic scoring.
          properties:
            reason:
              type: string
            actor:
              type: string
            at:
              type: string
              format: date-time
        created_at:
          type: string
          format: date-time
          description: ISO 8601 timestamp of intent creation.
        updated_at:
          type: string
          format: date-time
      additionalProperties: false
      $defs:
        state_transitions:
          description: >-
            Minimum-viable transition guards (illustrative, enforced by the
            service). draft→diagnosed: diagnostics present and scored OR
            override_event. diagnosed→decided: routing decision recorded.
            decided→planned: routing + admin present + destination selected.
            planned→published: publish receipt + external IDs + intent_version.
            Any state→failed: adapter error or preflight rejection. Any
            state→cancelled: explicit cancellation.
          type: 'null'
      x-canonical-url: https://composer.id/schemas/triage-record.json
    Error:
      type: object
      required:
        - error
      additionalProperties: true
      properties:
        error:
          type: string
    TriageSubmission:
      title: TriageSubmission
      type: object
      required:
        - schema_version
        - environment
        - source
        - kind
        - requester
        - context
        - questionnaire
        - responses
        - events
        - decision
      properties:
        schema_version:
          const: '1.0'
        environment:
          const: sandbox
        source:
          type: object
          required:
            - system
            - instance
            - session_id
            - revision
          properties:
            system:
              const: triage
            instance:
              type: string
              pattern: ^[A-Za-z0-9_.:-]{1,160}$
            session_id:
              type: string
              pattern: ^[A-Za-z0-9_.:-]{1,160}$
            revision:
              type: integer
              minimum: 1
          additionalProperties: false
        kind:
          enum:
            - initial
            - follow_on
            - change_request
        requester:
          type: object
          required:
            - id
            - display_name
          properties:
            id:
              type: string
              pattern: ^[A-Za-z0-9_.:-]{1,160}$
            display_name:
              type: string
          additionalProperties: false
        context:
          type: object
          required:
            - locale
            - timezone
            - started_at
            - submitted_at
          properties:
            locale:
              type: string
            timezone:
              type: string
            started_at:
              type: string
              format: date-time
            submitted_at:
              type: string
              format: date-time
          additionalProperties: false
        questionnaire: 346105ca-2ba5-4908-aab9-5a56f923de87
        responses:
          type: array
          items: 8b9b5d15-0822-40b8-b095-4569f10de443
          minItems: 1
          maxItems: 100
        events:
          type: array
          items:
            type: object
            required:
              - sequence
              - type
              - question_id
              - at
            properties:
              sequence:
                type: integer
                minimum: 1
              type:
                enum:
                  - question.shown
                  - question.answered
                  - question.skipped
                  - guidance.opened
                  - branch.skipped
              question_id:
                type: string
                pattern: ^[A-Za-z0-9_.:-]{1,160}$
              at:
                type: string
                format: date-time
              detail: {}
            additionalProperties: false
          minItems: 0
          maxItems: 2000
        decision: 01e83615-600e-44f0-857f-32f4a68e42b1
        target:
          type: object
          required:
            - intent_id
            - expected_version
          properties:
            intent_id:
              type: string
              pattern: ^[A-Za-z0-9_.:-]{1,160}$
            expected_version:
              type: integer
              minimum: 1
          additionalProperties: false
        work: d2fb2c10-7f7e-41fd-8c52-030a73daf34b
        metadata:
          type: object
      additionalProperties: false
      description: >-
        Complete source-reported Triage capture. Semantic validation also checks
        answer types against definitions, branch visibility, option IDs, parent
        references and timings. Follow-ons preserve original diagnostics; change
        requests get a new linked Intent ID.
      allOf:
        - if:
            properties:
              kind:
                const: follow_on
          then:
            required:
              - target
          else:
            not:
              required:
                - target
        - if:
            properties:
              kind:
                const: change_request
          then:
            required:
              - work
          else:
            not:
              required:
                - work
      $defs:
        question:
          type: object
          required:
            - id
            - type
            - prompt
            - guidance
            - answer_guidance
            - required
            - stage
          properties:
            id:
              type: string
              pattern: ^[A-Za-z0-9_.:-]{1,160}$
            type:
              enum:
                - text
                - single_choice
                - multiple_choice
                - boolean
                - date
                - money
                - number
            prompt:
              type: string
            guidance:
              type: string
            answer_guidance:
              type: string
            required:
              type: boolean
            stage:
              enum:
                - diagnostic
                - intake
                - country_compliance
                - desk_review
                - change_request
            options:
              type: array
              items:
                type: object
                required:
                  - id
                  - label
                  - guidance
                properties:
                  id:
                    type: string
                    pattern: ^[A-Za-z0-9_.:-]{1,160}$
                  label:
                    type: string
                  guidance:
                    type: string
                additionalProperties: false
              minItems: 1
              maxItems: 100
            follow_on:
              type: object
              required:
                - parent_question_id
                - reason
              properties:
                parent_question_id:
                  type: string
                  pattern: ^[A-Za-z0-9_.:-]{1,160}$
                reason:
                  type: string
                equals: {}
              additionalProperties: false
            semantic_key:
              type: string
              pattern: ^[A-Za-z0-9_.:-]{1,160}$
          additionalProperties: false
          allOf:
            - if:
                properties:
                  type:
                    enum:
                      - single_choice
                      - multiple_choice
              then:
                required:
                  - options
              else:
                not:
                  required:
                    - options
        questionnaire:
          type: object
          required:
            - id
            - version
            - title
            - questions
          properties:
            id:
              type: string
              pattern: ^[A-Za-z0-9_.:-]{1,160}$
            version:
              type: string
            title:
              type: string
            questions:
              type: array
              items:
                $ref: '#/components/schemas/TriageSubmission/$defs/question'
              minItems: 1
              maxItems: 100
          additionalProperties: false
        response:
          type: object
          required:
            - question_id
            - status
            - value
            - timing
          properties:
            question_id:
              type: string
              pattern: ^[A-Za-z0-9_.:-]{1,160}$
            status:
              enum:
                - answered
                - skipped
                - not_shown
                - invalidated
            value:
              oneOf:
                - type: string
                - type: boolean
                - type: number
                - type: array
                  items:
                    type: string
                  minItems: 1
                  maxItems: 100
                - $ref: '#/components/schemas/TriageSubmission/$defs/money'
                - type: 'null'
            timing:
              oneOf:
                - $ref: '#/components/schemas/TriageSubmission/$defs/timing'
                - type: 'null'
          additionalProperties: false
          allOf:
            - if:
                properties:
                  status:
                    enum:
                      - skipped
                      - not_shown
              then:
                properties:
                  value:
                    type: 'null'
            - if:
                properties:
                  status:
                    const: not_shown
              then:
                properties:
                  timing:
                    type: 'null'
        timing:
          type: object
          required:
            - shown_at
            - answered_at
            - elapsed_ms
            - guidance_opened
          properties:
            shown_at:
              type: string
              format: date-time
            answered_at:
              type: string
              format: date-time
            elapsed_ms:
              type: integer
              minimum: 0
            guidance_opened:
              type: boolean
          additionalProperties: false
        money:
          type: object
          required:
            - amount
            - currency
          properties:
            amount:
              type: string
              pattern: ^(?:0|[1-9][0-9]{0,14})(?:\.[0-9]{1,2})?$
            currency:
              enum:
                - GBP
                - EUR
                - USD
                - AUD
                - CAD
                - SGD
          additionalProperties: false
        decision:
          type: object
          required:
            - status
          properties:
            status:
              enum:
                - not_evaluated
                - awaiting_desk
                - decided
            recommended_channels:
              type: array
              items:
                enum:
                  - permanent_hire
                  - outsourced
                  - contingent
                  - statement_of_work
                  - ai
              minItems: 0
              maxItems: 5
            final_channel:
              enum:
                - permanent_hire
                - outsourced
                - contingent
                - statement_of_work
                - ai
            scores: {}
            ruleset_version:
              type: string
            override:
              type: object
              required:
                - actor_id
                - reason
                - at
              properties:
                actor_id:
                  type: string
                reason:
                  type: string
                at:
                  type: string
                  format: date-time
              additionalProperties: false
          additionalProperties: false
        work:
          type: object
          required:
            - reason
            - change_types
          properties:
            reason:
              type: string
            change_types:
              type: array
              items:
                enum:
                  - scope
                  - budget
                  - dates
                  - people
                  - renewal
                  - other
              minItems: 1
              maxItems: 6
            original_intent_id:
              type: string
              pattern: ^[A-Za-z0-9_.:-]{1,160}$
            original_version:
              type: integer
              minimum: 1
            external_reference:
              type: object
              required:
                - system
                - id
              properties:
                system:
                  type: string
                id:
                  type: string
              additionalProperties: false
          additionalProperties: false
          anyOf:
            - required:
                - original_intent_id
                - original_version
            - required:
                - external_reference
      x-canonical-url: https://composer.id/schemas/triage-submission.json
    PublishingBundle:
      title: PublishingBundle
      description: >-
        Publish receipts, external IDs, idempotency keys, and adapter status.
        Populated on the IntentRecord after the first successful publish.
      type: object
      required:
        - receipts
      properties:
        receipts:
          type: array
          items: 4a6dabf4-e47c-457c-809e-d3e11d62d3d7
          description: One entry per publish attempt (successful replays included).
        current_external_id:
          type: string
          description: >-
            The external ID in the destination system for the latest successful
            publish.
        current_idempotency_key:
          type: string
          description: >-
            The idempotency key for the latest publish, format:
            {intent_id}-{intent_version}-{provider}.
        adapter_status:
          type: string
          enum:
            - pending
            - published
            - failed
            - replayed
          description: Aggregate adapter status.
      additionalProperties: false
      $defs:
        publish_receipt:
          type: object
          required:
            - target_system
            - object_type
            - external_id
            - idempotency_key
            - status
            - at
          properties:
            target_system:
              type: string
              description: Provider key (e.g. 'fieldglass', 'docusign').
            object_type:
              type: string
              description: Destination object type (e.g. 'job_posting', 'envelope').
            external_id:
              type: string
              description: The ID assigned by the destination system.
            idempotency_key:
              type: string
              pattern: ^[A-Za-z0-9_-]+-[0-9]+-[a-z0-9]+
              description: 'Deterministic key: {intent_id}-{intent_version}-{provider}.'
            status:
              type: string
              enum:
                - published
                - failed
            replayed:
              type: boolean
              description: True if this was an idempotent replay of a prior publish.
            deep_link:
              type: string
              format: uri
              description: One-click URL to the record in the destination system.
            at:
              type: string
              format: date-time
          additionalProperties: false
      x-canonical-url: https://composer.id/schemas/publishing-bundle.json
  securitySchemes:
    oauth2:
      type: oauth2
      description: >-
        Client credentials, the production model: server-to-server, short-lived
        tokens, least-privilege scopes, rotation by issuing a new client secret.
      flows:
        clientCredentials:
          tokenUrl: https://api.composer.id/v1/oauth/token
          scopes:
            intents:read: Read intent records and their timelines.
            intents:write: Create, patch, plan, preflight and enrich intents.
            publish: Publish an intent into a destination system.
            reconcile: Run reconciliation against a destination.
            passthrough: Raw platform calls anchored to an Intent ID.
            destinations:read: List platforms, destinations and capabilities.
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        A personal sandbox API key, minted by POST /sandbox/keys and carrying
        every scope; or a token from the oauth2 flow. Compared in constant time.
        Destination credentials are never passed by the caller.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.