> ## 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 agreement document

> Returns the rendered prose document associated with an agreement documentId. Access requires the same authorization as reading the agreement record.



## OpenAPI

````yaml /openapi.json get /v0/agreements/documents/{documentId}
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: Webhooks
    description: Register signed push callbacks for agreement events.
  - name: System
    description: Health and OpenAPI discovery endpoints.
paths:
  /v0/agreements/documents/{documentId}:
    get:
      tags:
        - Agreement Documents
      summary: Get agreement document
      description: >-
        Returns the rendered prose document associated with an agreement
        documentId. Access requires the same authorization as reading the
        agreement record.
      parameters:
        - name: documentId
          in: path
          required: true
          schema:
            type: string
          description: Opaque hosted agreement document identifier.
      responses:
        '200':
          description: Rendered agreement prose document.
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - meta
                properties:
                  data:
                    $ref: '#/components/schemas/AgreementDocumentResponse'
                  meta:
                    $ref: '#/components/schemas/ResponseMeta'
        '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: Not authorized to access this agreement document.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Agreement document not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    AgreementDocumentResponse:
      type: object
      required:
        - documentId
        - agreementId
        - chainId
        - displayName
        - contentType
        - content
      description: >-
        Authenticated resolver response for hosted agreement prose associated
        with an on-chain docUri.
      properties:
        documentId:
          type: string
          description: Opaque hosted agreement document identifier.
        docUri:
          type: string
          description: Hosted document URI recorded with the agreement.
        agreementId:
          type: string
          description: Hosted agreement record ID.
        agreementAddress:
          type: string
          description: Deployed agreement address, when deployed.
        chainId:
          type: integer
          description: Agreement chain ID.
        displayName:
          type: string
          description: Human-readable agreement label.
        contentType:
          type: string
          description: MIME type for the rendered prose content.
        content:
          type: string
          description: Rendered agreement prose with stored variable values applied.
        docHash:
          type: string
          description: On-chain document hash, when available.
        updatedAt:
          type: string
          format: date-time
          description: Agreement record update timestamp.
      example:
        documentId: 7b0f6c2d-3e4f-4a5b-8c9d-0e1f2a3b4c5d
        docUri: >-
          https://test-api.shodai.network/v0/agreements/documents/7b0f6c2d-3e4f-4a5b-8c9d-0e1f2a3b4c5d
        agreementId: agr_123
        agreementAddress: '0x3333333333333333333333333333333333333333'
        chainId: 59141
        displayName: Advisory Retainer
        contentType: text/markdown
        content: |-
          # Advisory Retainer

          Service agreement between provider and client.
        docHash: '0x325698d320b8d4e884a856480df1d934877cb71cd39f08bd3c5a268bd21d82db'
        updatedAt: '2026-04-27T16:05:00.000Z'
    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

````