---
title: "Get agreement"
method: GET
path: "/v0/agreements/{id}"
tags: ["Agreement Records"]
---

# Get agreement

`GET /v0/agreements/{id}`

## Request

- Base URL: `https://test-api.shodai.network`
- URL: `https://test-api.shodai.network/v0/agreements/{id}`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

Returns a single agreement record, including agreement JSON and hosted record context.

## Path parameters

- `id` string, required

## Response `200`

Agreement record.

- object
  - `data` AgreementRecord, required: Hosted record for an authored or deployed agreement. Use the state and input-history routes when you need current execution state or submitted input history.
    - `id` string, required: Agreement record ID.
    - `operationId` string: Stable durable permit-operation identity, when API initiated.
    - `operationLifecycle` 'intent_recorded' | 'transaction_ready' | 'confirmed' | 'completed' | 'failed': Durable permit-operation lifecycle, when API initiated.
    - `transactionHash` string: Durable deployment transaction hash, when prepared.
    - `pendingOperation` object: Unresolved or terminally failed deployment operation for this agreement, in the same shape input records use for their on-chain operation data. Present while a permit deployment is in flight or after it failed terminally; cleared when the deployment completes. Poll the agreement to follow a pending deployment instead of re-submitting the permit.
      - `kind` 'deployment', required
      - `submissionId` string, required: Durable permit-operation identity (the same axis as an input submissionId).
      - `operationLifecycle` 'intent_recorded' | 'transaction_ready' | 'confirmed' | 'completed' | 'failed', required
      - `txHash` string
      - `blockNumber` integer
      - `error` string: Terminal failure classification, e.g. 'transaction_reverted'.
      - `createdAt` string, date-time, required
      - `updatedAt` string, date-time, required
    - `address` string: Deployed agreement address, when deployed.
    - `chainId` integer, required: Chain ID for the deployed agreement.
    - `status` 'Draft' | 'Deployed', required: Agreement record status.
    - `lastInputId` string: Most recent submitted input ID, when available.
    - `lastInputAt` string, date-time: Time of the most recent submitted input, when available.
    - `json` object, required: Authored agreement JSON.
    - `state` string: Cached agreement state, when available.
    - `variables` object: Current stored agreement values.
    - `updatedAt` string, date-time, required: Record update timestamp.
    - `createdAt` string, date-time, required: Record creation timestamp.
    - `displayName` string, required: Human-readable record label.
    - `owner` string: Wallet address associated with hosted record ownership.
    - `documentId` string: Opaque hosted agreement document identifier used by /agreements/documents/{documentId}.
    - `docUri` string: Optional document URI associated with the deployed agreement, typically /agreements/documents/{documentId}.
    - `contributors` string[]: Wallet addresses associated with agreement activity.
    - `participants` ParticipantRecord[]: Participants associated with agreement participant variables.
      - `variableKey` string, required: Participant address variable key in the agreement JSON.
      - `email` string, email: Participant email context.
      - `firstName` string: Participant first name, when available.
      - `lastName` string: Participant last name, when available.
      - `walletAddress` string: Participant wallet address, when available.
      - `walletBinding` 'verified_via_auth' | 'verified_via_siwe' | 'partner_asserted': Wallet provenance recorded by the API.
    - `observers` string[]: Observer email addresses associated with the agreement record.
    - `onChain` object: On-chain agreement data when available.
  - `meta` ResponseMeta, required
    - `apiVersion` string, required
    - `requestId` string, required: Correlation ID for support and debugging.

## Other responses

- `401`: Missing or invalid API credential.
- `402`: The authenticated Shodai account has paid_required entitlement mode for the requested scope. Per-call x402 settlement is not implemented. Treat this as an entitlement/operator issue.
- `403`: The credential lacks the required OAuth scope, the account lacks entitlement, or the account cannot access the resource.
- `404`: Agreement not found.

---

[API](https://skmtc.dev/shodai/apis/agreements-api.md) · [All operations](https://skmtc.dev/shodai/apis/agreements-api/llms.txt) · [OpenAPI document](https://skmtc.dev/shodai/apis/agreements-api/revisions/0ac329d0e9a0?raw)
