Use this page when an API request fails or when an agreement does not move through the lifecycle as expected.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.
HTTP status codes
| Status | Meaning | Common cause |
|---|---|---|
400 | The request is malformed or semantically invalid. | Invalid status filter, deployment payload, agreement JSON, or signed input payload. |
401 | Missing or invalid API key. | X-API-Key is absent, revoked, disabled, or incorrect. |
402 | Payment required for the requested scope. | The principal has a paid_required entitlement mode for the requested scope. |
403 | Authenticated but not allowed. | Missing active entitlement, blocked entitlement, or resource access denial. |
404 | Requested agreement or resource was not found. | Wrong agreement ID, wrong deployed address, or unavailable record. |
Downstream conflict responses
Some deployment or input operations may surface409 Conflict from the downstream agreements service. This note is separate from the main status table; use the API Reference group for generated endpoint-specific response codes.
| Status | Where it may surface | Common cause | Next check |
|---|---|---|---|
409 | Deployment or input operations. | The record is in the wrong lifecycle status for the operation, or the live state no longer accepts the submitted action. | Reread the agreement record and current state, then confirm the requested operation is valid for that status and state. |
Validate the right thing
POST /v0/agreements/validate-template checks authored agreement JSON only. If it fails or returns warnings, inspect participant variable keys, input IDs, state IDs, and agreement structure before preparing deployment.
POST /v0/agreements/validate checks the assembled deployment request. If it fails, compare the authored agreement with initValues, participant wallet mappings, observers, and the normalized variables response.
Deployment preflight does not deploy the agreement and does not validate permit signatures.
Fix signing failures
Regenerate the signature if any of these values change:- agreement JSON
initValuesdocUri- chain
- factory or agreement address
- signer nonce
- deadline
- input ID
- input values
computeDefaultDeadlineSeconds(). Use a shorter deadline if your integration requires a tighter replay window, and regenerate the signature whenever the deadline expires.
Diagnose errors in the TypeScript client
ApiClient throws AgreementsApiError for unexpected HTTP responses. Inspect status, errorPayload, bodyText, and parsedBody before retrying.
client.exchangeJson('GET', '/v0/agreements') when you need status, ok, headers, bodyText, and parsedBody without throwing on HTTP errors.
Input does not move the agreement
Check these conditions in order:- The agreement is in the state that accepts the input.
- The submitted
inputIdexists in the authored agreement. - The submitted
valuesmatch the input schema. - The signer is allowed by the input
issuer. - The transition condition references that input from the current state.
- The signature has not expired and was generated for this exact payload.
MINED but state has not updated yet, reread GET /v0/agreements/{id}/state after a short delay and use GET /v0/agreements/{id}/inputs as the audit trail.
Deployment conflicts
For deployment and operation failures, confirm that:- the agreement has the expected
DraftorDeployedstatus - the requested operation is valid for that status
- the agreement ID or deployed address points to the intended record
- the API key can access that record
- the current state still accepts the action you are submitting