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

# Get input history

> Returns recorded input submissions for the agreement. Use this to inspect what events have been submitted.

For the complete documentation index, see [llms.txt](https://docs.shodai.network/llms.txt).

Use `client.listAgreementInputs(...)` to inspect submitted events before deciding the next lifecycle action.


## OpenAPI

````yaml /openapi.json get /v0/agreements/{id}/inputs
openapi: 3.1.0
info:
  title: Agreements API
  version: v0
  description: Author, deploy, read, and advance agreements through the Agreements API.
servers:
  - url: https://test-api.shodai.network
    description: Public base URL for the Agreements API testnet environment.
  - url: https://api.shodai.network
    description: Public base URL for the Agreements API production environment.
security: []
tags:
  - name: Agreement Records
    description: List and read agreement records.
  - name: Agreement Documents
    description: Resolve hosted agreement prose documents.
  - name: Authoring
    description: Check authored agreement JSON before deployment.
  - name: Deployment
    description: Preflight and deploy agreements.
  - name: Using Agreements
    description: Read state, inspect input history, and submit signed inputs.
  - name: System
    description: Health and OpenAPI discovery endpoints.
paths:
  /v0/agreements/{id}/inputs:
    get:
      tags:
        - Using Agreements
      summary: Get input history
      description: >-
        Returns recorded input submissions for the agreement. Use this to
        inspect what events have been submitted.
      operationId: listAgreementInputs
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Agreement ID or deployed agreement address.
        - name: userId
          in: query
          required: false
          schema:
            type: string
          description: Optional platform user ID filter.
        - name: inputId
          in: query
          required: false
          schema:
            type: string
          description: Optional agreement input ID filter.
        - name: status
          in: query
          required: false
          schema:
            type: string
            enum:
              - PENDING
              - MINED
              - FAILED
          description: Optional input submission status filter.
        - name: createdAt[gt]
          in: query
          required: false
          schema:
            type: string
            format: date-time
          description: Include records with createdAt greater than this timestamp.
        - name: createdAt[gte]
          in: query
          required: false
          schema:
            type: string
            format: date-time
          description: >-
            Include records with createdAt greater than or equal to this
            timestamp.
        - name: createdAt[lt]
          in: query
          required: false
          schema:
            type: string
            format: date-time
          description: Include records with createdAt less than this timestamp.
        - name: createdAt[lte]
          in: query
          required: false
          schema:
            type: string
            format: date-time
          description: Include records with createdAt less than or equal to this timestamp.
        - name: updatedAt[gt]
          in: query
          required: false
          schema:
            type: string
            format: date-time
          description: Include records with updatedAt greater than this timestamp.
        - name: updatedAt[gte]
          in: query
          required: false
          schema:
            type: string
            format: date-time
          description: >-
            Include records with updatedAt greater than or equal to this
            timestamp.
        - name: updatedAt[lt]
          in: query
          required: false
          schema:
            type: string
            format: date-time
          description: Include records with updatedAt less than this timestamp.
        - name: updatedAt[lte]
          in: query
          required: false
          schema:
            type: string
            format: date-time
          description: Include records with updatedAt less than or equal to this timestamp.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
          description: Maximum number of records to return.
        - name: cursor
          in: query
          required: false
          schema:
            type: string
          description: Opaque cursor returned by a previous list response.
        - name: sort[createdAt]
          in: query
          required: false
          schema:
            type: string
            enum:
              - asc
              - desc
            default: desc
          description: Sort by createdAt. Only one sort field may be supplied.
        - name: sort[updatedAt]
          in: query
          required: false
          schema:
            type: string
            enum:
              - asc
              - desc
          description: Sort by updatedAt. Only one sort field may be supplied.
      responses:
        '200':
          description: Paged cached input records.
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - pageInfo
                  - meta
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/AgreementInputRecord'
                  pageInfo:
                    $ref: '#/components/schemas/PageInfo'
                  meta:
                    $ref: '#/components/schemas/ResponseMeta'
              examples:
                inputHistory:
                  summary: Submitted agreement inputs
                  value:
                    data:
                      - agreementId: agr_123
                        agreementAddress: '0x3333333333333333333333333333333333333333'
                        chainId: 59141
                        inputId: submitInitialPaymentProof
                        txHash: >-
                          0x4444444444444444444444444444444444444444444444444444444444444444
                        payload: 0x...
                        values:
                          paymentReference: wire-2026-04-27-001
                        status: MINED
                        createdAt: '2026-04-27T16:10:00.000Z'
                        updatedAt: '2026-04-27T16:11:00.000Z'
                    pageInfo:
                      limit: 25
                      nextCursor: null
                      totalCount: 1
                    meta:
                      apiVersion: v0
                      requestId: req_123
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '402':
          description: >-
            The authenticated API principal has paid_required entitlement mode
            for the requested scope. Per-call x402 settlement is not
            implemented. Treat this as an entitlement/operator issue.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: The API key is not allowed to access this resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Agreement not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: typescript
          label: SDK
          source: >-
            const page = await client.listAgreementInputs('agr_123', { limit: 25
            });

            console.log(page.data, page.pageInfo.nextCursor);
components:
  schemas:
    AgreementInputRecord:
      type: object
      required:
        - agreementId
        - agreementAddress
        - chainId
        - inputId
        - txHash
        - payload
        - values
        - status
        - createdAt
        - updatedAt
      properties:
        agreementId:
          type: string
          description: Hosted agreement record ID associated with this input.
        agreementAddress:
          type: string
          description: Deployed agreement address associated with this input.
        chainId:
          type: integer
          description: Chain ID for the deployed agreement.
        inputId:
          type: string
          description: Input ID submitted to the agreement.
        userId:
          type: string
          description: Platform user ID associated with the submission, when available.
        blockNumber:
          type: integer
          description: Block number for the mined input transaction, when available.
        payload:
          type: string
          description: Encoded input payload retained by the API.
        values:
          type: object
          additionalProperties: true
          description: Business values submitted with the input.
        txHash:
          type: string
          description: Transaction hash for the input submission.
        error:
          type: string
          description: Error message when the input submission failed.
        createdAt:
          type: string
          format: date-time
          description: Input record creation timestamp.
        updatedAt:
          type: string
          format: date-time
          description: Input record update timestamp.
        status:
          type: string
          enum:
            - PENDING
            - MINED
            - FAILED
          description: Input submission status.
      example:
        agreementId: agr_123
        agreementAddress: '0x3333333333333333333333333333333333333333'
        chainId: 59141
        inputId: submitInitialPaymentProof
        txHash: '0x4444444444444444444444444444444444444444444444444444444444444444'
        payload: 0x...
        values:
          paymentReference: wire-2026-04-27-001
        status: MINED
        createdAt: '2026-04-27T16:10:00.000Z'
        updatedAt: '2026-04-27T16:11:00.000Z'
    PageInfo:
      type: object
      required:
        - limit
        - nextCursor
      properties:
        limit:
          type: integer
          example: 25
        nextCursor:
          oneOf:
            - type: string
            - type: 'null'
        totalCount:
          type: integer
          description: Total number of matching records when available.
    ResponseMeta:
      type: object
      required:
        - apiVersion
        - requestId
      properties:
        apiVersion:
          type: string
          example: v0
        requestId:
          type: string
          description: Correlation ID for support and debugging.
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - requestId
          properties:
            code:
              type: string
              example: unauthorized
              description: Stable machine-readable error code.
            message:
              type: string
              example: Missing API key
              description: Safe human-readable error summary.
            details:
              description: Optional field errors or upstream-safe context.
            requestId:
              type: string
              description: Correlation ID for support and debugging.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        Canonical API-key credential. Send X-API-Key: cns_pk_..., or
        Authorization: Bearer cns_pk_... only as an API-key compatibility alias.
        OAuth and JWT bearer tokens are not supported.
      x-default: YOUR_API_KEY

````