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

# Get Chain

> Retrieve a signed chain, a page at a time, oldest first unless `order=desc`: an actor's by any of its DIDs, an agent's calls under your organization's policy (`chain=policy`), or a mandate's by its credential URN  
An actor merged into another is read by its own DID: its own chain, ending in its `ACTOR_RETIRED`  
`audit=true` checks the whole chain now — every signature and link from genesis, and an actor's record against its fold — and answers its verdict under `audit`



## OpenAPI

````yaml /versions/2026-11-02.yaml get /audit-trail/events/{id}
openapi: 3.1.0
info:
  title: Humanos API
  description: Humanos API
  version: '1.0'
  contact: {}
servers:
  - url: https://api.humanos.tech
security: []
tags:
  - name: Agents
  - name: Requests
  - name: Credentials
  - name: Approval
  - name: User
  - name: Actions
  - name: Audit trail
  - name: DID
  - name: Call proof
  - name: Webhooks
paths:
  /audit-trail/events/{id}:
    get:
      tags:
        - Audit trail
      summary: Get Chain
      description: >-
        Retrieve a signed chain, a page at a time, oldest first unless
        `order=desc`: an actor's by any of its DIDs, an agent's calls under your
        organization's policy (`chain=policy`), or a mandate's by its credential
        URN  

        An actor merged into another is read by its own DID: its own chain,
        ending in its `ACTOR_RETIRED`  

        `audit=true` checks the whole chain now — every signature and link from
        genesis, and an actor's record against its fold — and answers its
        verdict under `audit`
      operationId: audit_trail_getEvents
      parameters:
        - name: id
          required: true
          in: path
          description: >-
            An actor's DID, URL-encoded — an organization's, a person's or an
            agent's — or a credential's URN.
          schema:
            example: did:web:humanos.tech:agent:2f8b6c41-9d37-4e5a-8b02-6c1d9e7a4f35
            type: string
        - name: pageIndex
          required: false
          in: query
          description: Zero-based page index. `0` returns the first page.
          schema:
            minimum: 0
            default: 0
            example: 0
            type: number
        - name: pageSize
          required: false
          in: query
          description: Number of items per page
          schema:
            minimum: 5
            maximum: 100
            default: 10
            example: 10
            type: number
        - name: chain
          required: false
          in: query
          description: >-
            Which of an actor's chains: its own, or an agent's calls under the
            organization's policy. A credential, a person or an organization has
            no policy chain (400).
          schema:
            default: actor
            type: string
            enum:
              - actor
              - policy
        - name: order
          required: false
          in: query
          description: >-
            The order of the chain: `asc` oldest first, where a page never
            shifts; `desc` newest first, for a timeline.
          schema:
            default: asc
            type: string
            enum:
              - asc
              - desc
        - name: audit
          required: false
          in: query
          description: >-
            Walk the whole chain now — every signature and link from its
            genesis, and an actor's record against its fold — and answer its
            verdict under `audit`.
          schema:
            default: false
            type: boolean
        - $ref: '#/components/parameters/ApiVersion'
      responses:
        '200':
          description: >-
            Returns one page of the chain, the number of pages, and the verdict
            over the whole chain.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChainEntity'
        '400':
          description: >-
            Invalid query parameters — a negative pageIndex, a pageSize outside
            5-100, a value no parameter names — or `chain=policy` on anything
            but an agent.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 400
                  message:
                    type: string
                    example: only an agent has a policy chain
                  error:
                    type: string
                    example: Bad Request
        '404':
          description: >-
            No actor has this DID, or your organization may not read it: an
            organization reads itself, its agents, and the people it knows. An
            agent key reads only its own agent. A credential is read only by the
            organization whose request issued it.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 404
                  message:
                    type: string
                    example: actor not found
                  error:
                    type: string
                    example: Not Found
components:
  parameters:
    ApiVersion:
      name: API-Version
      in: header
      required: false
      schema:
        type: string
        pattern: ^\d{4}-\d{2}-\d{2}$
        example: '2026-11-02'
      description: >-
        Pin request, response, and webhook shapes to a specific dated API
        version (YYYY-MM-DD). Omit to use the version pinned to your API key
        (set when the key is created; new keys default to the latest version).
        New integrations should target the latest version.
  schemas:
    ChainEntity:
      type: object
      properties:
        id:
          type: string
          description: 'The id as asked: a DID, or a credential URN.'
          example: did:web:humanos.tech:agent:2f8b6c41-9d37-4e5a-8b02-6c1d9e7a4f35
        chain:
          type: string
          description: >-
            Which of an actor's chains: its own, or an agent's calls under the
            organization's policy (v0.3 §21.5). Absent for a credential.
          enum:
            - actor
            - policy
          example: actor
        policy:
          type:
            - string
            - 'null'
          description: >-
            `chain=policy` only: the organization's policy the chain is under;
            null when it has published none.
          example: urn:via:policy:7c9e6679-7425-40de-944b-e07fc1f90ae7
        eventCount:
          type: number
          description: Events in the whole chain, not in the page.
          example: 2
        lastEventAt:
          type:
            - string
            - 'null'
          description: When the newest event was signed. Null with none.
          example: '2026-10-01T09:12:00.000Z'
        pending:
          type: boolean
          description: >-
            An actor's chain: an event of it is accepted and not yet written.
            False for any other chain.
          example: false
        events:
          type: array
          description: >-
            One page of the chain, oldest first unless `order=desc`: each event
            a VIAEvent credential (v0.3 §2) with one Data Integrity proof.

            `credentialSubject.event` is the kind, `previousEvent` the
            chain-link of the event before it (null at genesis), and the kind's
            own fields sit beside them.
          items:
            type: object
            additionalProperties: true
          example:
            - '@context':
                - https://www.w3.org/ns/credentials/v2
                - https://via.humanos.tech/ns/v1
              id: urn:via:event:550e8400-e29b-41d4-a716-446655440000
              type:
                - VerifiableCredential
                - VIAEvent
              specVersion: '0.3'
              issuer: did:web:humanos.tech
              validFrom: '2026-10-01T09:12:00.000Z'
              credentialSubject:
                id: >-
                  did:web:humanos.tech:agent:2f8b6c41-9d37-4e5a-8b02-6c1d9e7a4f35
                event: ACTOR_REGISTERED
                previousEvent: null
                actorType: agent
                keyId: >-
                  did:web:humanos.tech:agent:2f8b6c41-9d37-4e5a-8b02-6c1d9e7a4f35#key-1
                publicKeyJwk:
                  kty: EC
                  crv: P-256
                  x: …
                  'y': …
                assurance: pop
                binding: self
                bootstrapAnchor: api_key
                verifiedAt: '2026-10-01T09:12:00.000Z'
                existedSince: '2026-10-01T09:12:00.000Z'
                attestationKind: device-self
              proof:
                type: DataIntegrityProof
                cryptosuite: eddsa-jcs-2022
                verificationMethod: did:web:humanos.tech#key-1
                created: '2026-10-01T09:12:00.000Z'
                proofPurpose: assertionMethod
                proofValue: z2pcVdSdoMTrkTRrXdz...
        totalPages:
          type: number
          description: Pages available at the requested pageSize.
          example: 1
        audit:
          description: >-
            `audit=true` only: the whole chain checked now — every signature and
            link from genesis, and an actor's record against its fold.
          allOf:
            - $ref: '#/components/schemas/ChainVerdictEntity'
      required:
        - id
        - eventCount
        - lastEventAt
        - pending
        - events
        - totalPages
    ChainVerdictEntity:
      type: object
      properties:
        ok:
          type: boolean
          description: >-
            The chain verifies and folds and, for an actor with nothing queued,
            its record agrees with it. False if anything failed.
          example: true
        reason:
          type:
            - string
            - 'null'
          description: >-
            The first problem, most serious first; null when ok:
            `chain_invalid`, `signature_or_link_invalid`, `fold_failed`,
            `record_mismatch`, `chain_binding_mismatch`, `record_outdated`,
            `merged_key_unresolved`, `merge_claim_invalid`, `lane_blocked`,
            `signer_key_unknown`.
          example: null
        failureCount:
          type: number
          description: Every event that failed, in the whole chain.
          example: 0
        failures:
          description: >-
            The events that failed, at most 100, in link order — never a page of
            them.
          type: array
          items:
            $ref: '#/components/schemas/ChainFailureEntity'
      required:
        - ok
        - reason
        - failureCount
        - failures
    ChainFailureEntity:
      type: object
      properties:
        urn:
          type: string
          description: 'The event''s own URN: the `id` of one of the chain''s events.'
          example: urn:via:event:550e8400-e29b-41d4-a716-446655440000
        signatureValid:
          type: boolean
          description: The event's signature verifies against its signer's key.
          example: false
        chainLinkValid:
          type: boolean
          description: >-
            `previousEvent` is the chain-link of the event before it (null at
            genesis): the tamper-evidence link.
          example: true
        signerKnown:
          type: boolean
          description: >-
            A key is kept for the signer. False: the signature could not be
            checked — an unknown signer, not a forgery.
          example: true
      required:
        - urn
        - signatureValid
        - chainLinkValid
        - signerKnown

````

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