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

# Read demo repo

> Requires the `settlements:read` scope (as an M2M scope or a user permission).

The repo in one view: the agreed economics, the four movements of the schedule and the shared progress. Source, custodian A and custodian B read the same terms; no view carries a wallet, a party, a participant's identity or a provider record.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/demo/repos/{repo_id}
openapi: 3.1.0
info:
  title: Keystone API
  description: Settlement orchestration API for tokenized Real-World Assets (RWAs).
  version: 1.0.0
  x-keystone-api-contract-version: 0.9.0
  x-keystone-source-revision: d54830817b62960fa380d4f782f341effe7185b2
servers:
  - url: https://api-staging.keystoneos.xyz
    description: Staging (sandbox)
  - url: https://api.keystoneos.xyz
    description: Production
security:
  - bearerAuth: []
tags:
  - name: health
    description: Health and version checks.
  - name: platforms
    description: Register and manage your platform profile.
  - name: environments
    description: Manage platform environments (sandbox, production).
  - name: settlement-templates
    description: View and manage settlement templates.
  - name: settlements
    description: Initiate, monitor, and manage settlements.
  - name: sessions
    description: Create and manage browser-safe session tokens for frontend widgets.
  - name: instructions
    description: Submit and manage settlement instructions.
  - name: invitations
    description: Invite team members to your platform.
  - name: members
    description: Manage platform team members and roles.
  - name: webhooks
    description: Configure webhook endpoints for real-time event notifications.
  - name: security
    description: IP allowlisting and API access controls.
  - name: activity
    description: Audit trail of platform actions.
  - name: dashboard
    description: Dashboard metrics and statistics.
  - name: callbacks
    description: Provider callback handlers (internal).
  - name: alchemy-webhooks
    description: Alchemy blockchain event webhooks (internal).
  - name: chains
    description: Supported blockchain networks for settlement.
  - name: demo-repos
    description: >-
      The BitGo repo demo: an immutable record of one linked test-network repo.
      These routes exist only in a non-production deployment that carries the
      operator's trusted configuration; elsewhere the paths do not exist.
  - name: admin
    description: KeyStone internal administration endpoints.
  - name: admin-platforms
    description: Admin platform management.
  - name: admin-settlements
    description: Admin settlement oversight and intervention.
  - name: admin-compliance
    description: Admin compliance check management.
  - name: admin-activity
    description: Admin system-wide activity logs.
  - name: admin-webhooks
    description: Admin webhook diagnostics.
  - name: internal
    description: Keystone-internal worker endpoints.
  - name: internal-compliance
    description: Internal compliance engine endpoints.
paths:
  /v1/demo/repos/{repo_id}:
    get:
      tags:
        - demo-repos
      summary: Read demo repo
      description: >-
        Requires the `settlements:read` scope (as an M2M scope or a user
        permission).


        The repo in one view: the agreed economics, the four movements of the
        schedule and the shared progress. Source, custodian A and custodian B
        read the same terms; no view carries a wallet, a party, a participant's
        identity or a provider record.
      operationId: read_repo_v1_demo_repos__repo_id__get
      parameters:
        - name: repo_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Repo Id
        - name: view
          in: query
          required: false
          schema:
            anyOf:
              - enum:
                  - source
                  - custodian_a
                  - custodian_b
                type: string
              - type: 'null'
            description: >-
              The view to answer. Omitted, the sole view granted to the caller's
              actor is answered; with several granted, one must be named. A view
              that is not granted is refused; naming one never grants it.
            title: View
          description: >-
            The view to answer. Omitted, the sole view granted to the caller's
            actor is answered; with several granted, one must be named. A view
            that is not granted is refused; naming one never grants it.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RepoSnapshot'
        '403':
          description: >-
            INSUFFICIENT_SCOPES: the credential lacks the scope, or its identity
            is not bound to a demo repo actor in its active environment, or the
            requested view is not granted. SESSION_WRITE_DENIED: a session token
            on a write. NO_ENVIRONMENT_CONTEXT: a user token without the
            X-Keystone-Environment header.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: >-
            HTTP_ERROR: `Repo not found` for an identity the caller's actor
            holds no role on.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    RepoSnapshot:
      properties:
        schemaVersion:
          type: string
          const: bitgo-repo-demo.v1
          title: Schemaversion
        repoId:
          type: string
          format: uuid
          title: Repoid
        runId:
          type: string
          format: uuid
          title: Runid
        revision:
          type: string
          maxLength: 20
          pattern: ^(0|[1-9][0-9]*)$
          title: Revision
        templateId:
          type: string
          pattern: ^[\x21-\x7E]{1,255}$
          title: Templateid
        templateDigest:
          type: string
          pattern: ^[0-9a-f]{64}$
          title: Templatedigest
        termsDigest:
          type: string
          pattern: ^[0-9a-f]{64}$
          title: Termsdigest
        view:
          type: string
          enum:
            - source
            - custodian_a
            - custodian_b
          title: View
        createdAt:
          type: string
          format: date-time
          title: Createdat
        terms:
          $ref: '#/components/schemas/RepoSnapshotTerms'
        opening:
          $ref: '#/components/schemas/RepoOpeningPhase'
        closing:
          $ref: '#/components/schemas/RepoClosingPhase'
        movements:
          items:
            $ref: '#/components/schemas/RepoMovement'
          type: array
          maxItems: 4
          minItems: 4
          title: Movements
        nextActions:
          items: {}
          type: array
          maxItems: 0
          title: Nextactions
        blockers:
          items:
            $ref: '#/components/schemas/RepoBlocker'
          type: array
          maxItems: 1
          minItems: 1
          title: Blockers
        trust:
          $ref: '#/components/schemas/RepoTrust'
        authority:
          $ref: '#/components/schemas/RepoAuthority'
        decision:
          $ref: '#/components/schemas/RepoDecision'
        reservation:
          $ref: '#/components/schemas/RepoReservation'
        asOf:
          $ref: '#/components/schemas/RepoAsOf'
      additionalProperties: false
      type: object
      required:
        - schemaVersion
        - repoId
        - runId
        - revision
        - templateId
        - templateDigest
        - termsDigest
        - view
        - createdAt
        - terms
        - opening
        - closing
        - movements
        - nextActions
        - blockers
        - trust
        - authority
        - decision
        - reservation
        - asOf
      title: RepoSnapshot
      description: |-
        One view of a repo at one revision. The movements are the schedule
        the terms prescribe, in order, and the phases list exactly their own
        movements, so a snapshot cannot describe a transfer the terms do not.
    ErrorResponse:
      properties:
        detail:
          type: string
          title: Detail
          description: The rule that refused the request, naming no submitted value.
        code:
          $ref: '#/components/schemas/ErrorCode'
          description: The machine-readable error code to branch on.
        docs_url:
          type: string
          title: Docs Url
          description: The documentation anchor for the code.
          examples:
            - https://docs.keystoneos.xyz/guides/error-codes#http-error
      type: object
      required:
        - detail
        - code
        - docs_url
      title: ErrorResponse
      description: |-
        A refused request: the rule in words, the machine-readable code and
        the documentation anchor for it.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
        code:
          type: string
          enum:
            - VALIDATION_ERROR
          title: Code
        docs_url:
          type: string
          title: Docs Url
          examples:
            - https://docs.keystoneos.xyz/guides/error-codes#validation-error
      type: object
      title: HTTPValidationError
      required:
        - detail
        - code
        - docs_url
    RepoSnapshotTerms:
      properties:
        borrower:
          type: string
          const: client_a
          title: Borrower
        lender:
          type: string
          const: client_b
          title: Lender
        collateral:
          $ref: '#/components/schemas/RepoCollateralTerms'
        cash:
          $ref: '#/components/schemas/RepoCashTerms'
        maturityAt:
          type: string
          format: date-time
          title: Maturityat
      additionalProperties: false
      type: object
      required:
        - borrower
        - lender
        - collateral
        - cash
        - maturityAt
      title: RepoSnapshotTerms
    RepoOpeningPhase:
      properties:
        phaseId:
          type: string
          format: uuid
          title: Phaseid
        kind:
          type: string
          const: opening
          title: Kind
        complete:
          type: boolean
          const: false
          title: Complete
        movementIds:
          items:
            type: string
            format: uuid
          type: array
          maxItems: 2
          minItems: 2
          title: Movementids
      additionalProperties: false
      type: object
      required:
        - phaseId
        - kind
        - complete
        - movementIds
      title: RepoOpeningPhase
    RepoClosingPhase:
      properties:
        phaseId:
          type: string
          format: uuid
          title: Phaseid
        kind:
          type: string
          const: closing
          title: Kind
        openingPhaseId:
          type: string
          format: uuid
          title: Openingphaseid
        complete:
          type: boolean
          const: false
          title: Complete
        movementIds:
          items:
            type: string
            format: uuid
          type: array
          maxItems: 2
          minItems: 2
          title: Movementids
      additionalProperties: false
      type: object
      required:
        - phaseId
        - kind
        - openingPhaseId
        - complete
        - movementIds
      title: RepoClosingPhase
    RepoMovement:
      properties:
        movementId:
          type: string
          format: uuid
          title: Movementid
        phaseId:
          type: string
          format: uuid
          title: Phaseid
        kind:
          type: string
          enum:
            - opening_collateral
            - opening_cash
            - closing_repayment
            - closing_collateral
          title: Kind
        fromActor:
          type: string
          enum:
            - client_a
            - client_b
          title: Fromactor
        toActor:
          type: string
          enum:
            - client_a
            - client_b
          title: Toactor
        assetId:
          type: string
          pattern: ^(tcanton|eip155:11155111/erc20:0x[0-9a-f]{40})$
          title: Assetid
        amountBaseUnits:
          type: string
          maxLength: 128
          pattern: ^[1-9][0-9]*$
          title: Amountbaseunits
        executionStatus:
          type: string
          const: not_started
          title: Executionstatus
        signingStatus:
          type: string
          const: not_started
          title: Signingstatus
        acceptanceStatus:
          type: string
          const: not_observed
          title: Acceptancestatus
        ledgerStatus:
          type: string
          const: not_observed
          title: Ledgerstatus
        bookStatus:
          type: string
          const: not_observed
          title: Bookstatus
        evidence:
          items: {}
          type: array
          maxItems: 0
          title: Evidence
        observedAt:
          type: 'null'
          title: Observedat
      additionalProperties: false
      type: object
      required:
        - movementId
        - phaseId
        - kind
        - fromActor
        - toActor
        - assetId
        - amountBaseUnits
        - executionStatus
        - signingStatus
        - acceptanceStatus
        - ledgerStatus
        - bookStatus
        - evidence
        - observedAt
      title: RepoMovement
    RepoBlocker:
      properties:
        code:
          type: string
          const: provider_execution_unqualified
          title: Code
        message:
          type: string
          pattern: ^[\x20-\x7E]{1,256}$
          title: Message
      additionalProperties: false
      type: object
      required:
        - code
        - message
      title: RepoBlocker
    RepoTrust:
      properties:
        provider:
          type: string
          const: bitgo_test
          title: Provider
        custodyModel:
          type: string
          const: self_custody_mpc
          title: Custodymodel
        reservation:
          type: string
          const: simulated
          title: Reservation
        crossNetworkAtomicity:
          type: boolean
          const: false
          title: Crossnetworkatomicity
      additionalProperties: false
      type: object
      required:
        - provider
        - custodyModel
        - reservation
        - crossNetworkAtomicity
      title: RepoTrust
    RepoAuthority:
      properties:
        state:
          type: string
          const: not_observed
          title: State
        observedAt:
          type: 'null'
          title: Observedat
      additionalProperties: false
      type: object
      required:
        - state
        - observedAt
      title: RepoAuthority
    RepoDecision:
      properties:
        state:
          type: string
          const: not_started
          title: State
        observedAt:
          type: 'null'
          title: Observedat
      additionalProperties: false
      type: object
      required:
        - state
        - observedAt
      title: RepoDecision
    RepoReservation:
      properties:
        mode:
          type: string
          const: simulated
          title: Mode
        state:
          type: string
          const: not_observed
          title: State
        observedAt:
          type: 'null'
          title: Observedat
      additionalProperties: false
      type: object
      required:
        - mode
        - state
        - observedAt
      title: RepoReservation
    RepoAsOf:
      properties:
        sequence:
          type: string
          maxLength: 20
          pattern: ^(0|[1-9][0-9]*)$
          title: Sequence
        observedAt:
          type: 'null'
          title: Observedat
      additionalProperties: false
      type: object
      required:
        - sequence
        - observedAt
      title: RepoAsOf
    ErrorCode:
      type: string
      enum:
        - INVALID_TOKEN
        - TOKEN_EXPIRED
        - MISSING_TOKEN
        - INSUFFICIENT_SCOPES
        - NO_PLATFORM_CONTEXT
        - NO_ENVIRONMENT_CONTEXT
        - IP_NOT_ALLOWED
        - AUTH_CONTEXT_NOT_RESOLVED
        - PRINCIPAL_CONFLICT
        - USER_TOKEN_REQUIRED
        - MISSING_CALLBACK_SIGNATURE
        - INVALID_CALLBACK_SIGNATURE
        - CALLBACK_AUTH_NOT_CONFIGURED
        - SETTLEMENT_NOT_FOUND
        - TEMPLATE_NOT_FOUND
        - PLATFORM_NOT_FOUND
        - ENVIRONMENT_NOT_FOUND
        - INSTRUCTION_NOT_FOUND
        - WEBHOOK_ENDPOINT_NOT_FOUND
        - IP_RANGE_NOT_FOUND
        - MEMBER_NOT_FOUND
        - PROVIDER_NOT_FOUND
        - SESSION_NOT_FOUND
        - LEG_NOT_FOUND
        - NOT_REPO_SETTLEMENT
        - PRINCIPAL_NOT_FOUND
        - COMPLIANCE_CHECK_NOT_FOUND
        - SESSION_TOKEN_EXPIRED
        - SESSION_ESCALATION_DENIED
        - SESSION_SETTLEMENT_SCOPE_DENIED
        - SESSION_WRITE_DENIED
        - DEPOSIT_SECRET_NOT_AVAILABLE
        - DEPOSITOR_WALLET_NOT_AVAILABLE
        - NO_ESCROW_FOR_CHAIN
        - LEG_NOT_DEPOSITABLE
        - OFFCHAIN_LEG
        - FUNDING_WINDOW_CLOSED
        - FUNDING_DEADLINE_PASSED
        - LEG_ALREADY_DEPOSITED
        - ESCROW_REGISTRATION_MISMATCH
        - DUPLICATE_RESOURCE
        - IDEMPOTENCY_CONFLICT
        - IDEMPOTENCY_REPLAY_UNVERIFIABLE
        - SETTLEMENT_STATE_CONFLICT
        - NO_VALID_TRANSITION
        - SETTLEMENT_BUSY
        - INSTRUCTION_NOT_CANCELLABLE
        - NOT_REPO_OPEN
        - SETTLEMENT_NOT_FINALIZED
        - CLOSING_ALREADY_EXISTS
        - CLOSING_CREATION_FAILED
        - ENVIRONMENT_DEACTIVATED
        - PRINCIPAL_NO_LSEG_CASE
        - LSEG_TOOLKIT_STALE
        - MEMBER_CHANGE_IN_PROGRESS
        - VALIDATION_ERROR
        - NO_FIELDS_PROVIDED
        - INVALID_PARTY_CONFIGURATION
        - UNSUPPORTED_CHAIN_COMBINATION
        - UNSUPPORTED_SETTLEMENT_CHAIN
        - NON_INTEGRAL_QUANTITY
        - TEMPLATE_INACTIVE
        - UNSUPPORTED_SETTLEMENT_MACHINE
        - UNSUPPORTED_SETTLEMENT_MECHANISM
        - NO_AUTH0_ORGANIZATION
        - SELF_ACTION_FORBIDDEN
        - LAST_MEMBER_MANAGER
        - INVALID_TARGET_STATE
        - CANNOT_RESOLVE_TARGET_STATE
        - UNRECOGNIZED_CLIENT
        - INVALID_API_VERSION
        - RATE_LIMIT_EXCEEDED
        - RATE_LIMIT_UNATTRIBUTED
        - RATE_LIMIT_CREDENTIAL_ISSUANCE
        - AUTH0_ERROR
        - EXTERNAL_SERVICE_ERROR
        - SCREENING_AUDIT_WRITE_FAILED
        - CUSTODY_EXECUTION_UNREADABLE
        - HTTP_ERROR
      title: ErrorCode
      description: Machine-readable error codes for all API error responses.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    RepoCollateralTerms:
      properties:
        network:
          type: string
          const: canton-testnet
          title: Network
        assetId:
          type: string
          const: tcanton
          title: Assetid
        symbol:
          type: string
          const: testCC
          title: Symbol
        decimals:
          type: integer
          maximum: 255
          minimum: 0
          title: Decimals
        amountBaseUnits:
          type: string
          maxLength: 128
          pattern: ^[1-9][0-9]*$
          title: Amountbaseunits
      additionalProperties: false
      type: object
      required:
        - network
        - assetId
        - symbol
        - decimals
        - amountBaseUnits
      title: RepoCollateralTerms
    RepoCashTerms:
      properties:
        network:
          type: string
          const: sepolia
          title: Network
        chainId:
          type: string
          const: '11155111'
          title: Chainid
        tokenAddress:
          type: string
          pattern: ^0x[0-9a-f]{40}$
          title: Tokenaddress
        symbol:
          type: string
          pattern: ^[\x21-\x7E]{1,64}$
          title: Symbol
        decimals:
          type: integer
          maximum: 255
          minimum: 0
          title: Decimals
        principalBaseUnits:
          type: string
          maxLength: 78
          pattern: ^[1-9][0-9]*$
          title: Principalbaseunits
        repaymentBaseUnits:
          type: string
          maxLength: 78
          pattern: ^[1-9][0-9]*$
          title: Repaymentbaseunits
      additionalProperties: false
      type: object
      required:
        - network
        - chainId
        - tokenAddress
        - symbol
        - decimals
        - principalBaseUnits
        - repaymentBaseUnits
      title: RepoCashTerms
      description: |-
        The ERC-20 cash leg on Sepolia. The all-zero token address is refused
        because it stands for native ether, which no ERC-20 transfer moves. The
        repayment is whatever positive amount the template fixes; it may sit
        below the principal, and no rate is derived from the pair.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Auth0 JWT access token. See
        [Authentication](/getting-started/authentication) for details.

````

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