Exact POST request and 201 response with a Bearer runtime key.
API Examples
Use exact request and response shapes.
These examples mirror the exported Persistly contract bundle so developers and coding agents can lift them directly without guessing field names, statuses, or envelope structure.
Reading Order
Start with the operation you are implementing.
Each page includes the HTTP method, exact path, required headers, and the canonical JSON shape returned by the runtime.
Exact GET request by saveId and the canonical save envelope response.
Exact POST sync request with baseVersion and the accepted response shape.
Exact conflict response body so SDKs and agents can recover intentionally.
Shared error envelope with HTTP status, code, message, and optional details.
Contract Source
These pages are derived from the same OpenAPI-backed contract the SDKs follow.
Persistly keeps one public runtime surface. The docs examples, SDK types, and validation logic should all match the same contract bundle.
OpenAPI file: persistly-api.yaml
Stable error envelope: error.code, error.message, error.details
Canonical save envelope: save.saveId, metadata, state, version, timestamps
Published examples for create, save envelope, sync, conflict, and error responses