Docs/Interfaces

API conventions

Consistent identities, errors and bounded retrieval.

Read as Markdown ↗
On this page

Select the authority

CLI/SDK/MCP share connection and ledger selection. HTTP clients supply the service endpoint and the workspace ID using the API’s tenant selector. Hosted operations use the generated OpenAPI contract. GET /v1/identity verifies the workspace and issuer-qualified principal for the authenticated request.

Detailed contract and examples

Append through HTTP

Use a reachable managed or customer-operated service, your own credential, the workspace ID and an authorized ledger ID. This payload is suitable for a permissive contract; follow the actual ledger’s rules.

An accepted response contains state=accepted and acceptance.record_id. HTTP returns the domain object directly; errors use an error object and HTTP status. Keep the operation ID for recovery after a lost response.

Append through HTTP · Shell
curl --fail-with-body \  "$VEYLAR_ENDPOINT/v1/ledgers/$LEDGER_ID/records" \  -H "Authorization: Bearer $ACCESS_TOKEN" \  -H "X-Veylar-Tenant: $TENANT_ID" \  -H 'Content-Type: application/json' \  --data '{"operation_id":"first-record","payload":{"message":"Hello"}}'

Complete HTTP routes and schemasAppend capability

Read the result through your interface

The Python SDK returns the domain result directly. For CLI tools call with JSON output, read payload.tool.result. MCP tools/call exposes structuredContent and isError; when isError is true, inspect its error object. Hosted ledger HTTP returns the domain result directly, with an HTTP status and error object for failures. Account routes use their documented response shapes and {code, message} errors; API key revocation returns HTTP 204 with no body.

A successful transport response is not necessarily an accepted record. Inspect the domain state, acceptance facts and recovery guidance. Pending and uncertain contributions remain distinct from accepted history.

Retries and concurrency

Append uses operation_id for retry identity; configuration uses expected_revision. Reusing an operation ID with changed input fails. Resolve uncertainty with records.outcome before changing identity or withdrawing work.

Detailed contract and examples

Pagination and errors

Core snapshots use next and changes_from; finish the snapshot before consuming changes. Structured errors carry code, operation, retry and recovery guidance. Report coverage and source observation to consumers.

Detailed contract and examples