---
title: "Preflight deployment request"
method: POST
path: "/v0/agreements/validate"
tags: ["Deployment"]
---

# Preflight deployment request

`POST /v0/agreements/validate`

## Request

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

Checks whether authored agreement JSON plus target chain, deployment values, participant wallet mappings, and observer context are ready for deployment. This does not deploy the agreement.

## Request body

- ValidateDirectAgreementRequest: Deployment preflight request for authored agreement JSON and its deployment context.
  - `agreement` object, required: Authored agreement JSON to preflight before deployment.
  - `chainId` integer, required: Supported agreement deployment chain ID to preflight. Use the same value when signing and submitting the deploy-with-permit request.
  - `initValues` object: Deployment values for variables required when the agreement is created.
  - `participants` DirectParticipantRecord[]: Participant wallet mappings for participant address variables.
    - `variableKey` string, required: Participant address variable key in the agreement JSON.
    - `walletAddress` string, required: Wallet address for this participant. Required for direct API deployment.
    - `email` string, email: Optional participant email context.
    - `firstName` string: Optional participant first name.
    - `lastName` string: Optional participant last name.
    - `walletBinding` 'verified_via_auth' | 'verified_via_siwe' | 'partner_asserted': Wallet provenance recorded by the API.
  - `observers` string[]: Optional observer email addresses to associate with the agreement record.

## Response `201`

Deployment preflight summary.

- object
  - `data` ValidateDirectAgreementResponse, required
    - `templateId` string, nullable, required: Agreement metadata templateId or id value, when present.
    - `participantVariableKeys` string[], required: Participant address variable keys found in the agreement JSON.
    - `participants` DirectParticipantRecord[], required: Normalized participant wallet mappings.
      - `variableKey` string, required: Participant address variable key in the agreement JSON.
      - `walletAddress` string, required: Wallet address for this participant. Required for direct API deployment.
      - `email` string, email: Optional participant email context.
      - `firstName` string: Optional participant first name.
      - `lastName` string: Optional participant last name.
      - `walletBinding` 'verified_via_auth' | 'verified_via_siwe' | 'partner_asserted': Wallet provenance recorded by the API.
    - `observers` string[], required: Normalized observer email addresses.
    - `variables` object, required: Deployment values after participant wallet mappings are applied.
    - `contributors` string[], required: Wallet addresses that may contribute to agreement visibility or activity.
    - `warnings` string[], required: Warnings to review before deployment.
  - `meta` ResponseMeta, required
    - `apiVersion` string, required
    - `requestId` string, required: Correlation ID for support and debugging.

## Other responses

- `400`: Invalid deployment preflight payload.
- `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.

---

[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)
