Authentication
Authenticated routes return401 for a missing or invalid bearer token. On the hosted API, the proxy derives the session from the token and replaces a body session_id.
Cloudflare 403 with error 1010
An HTTP403 response containing error code: 1010 identifies a client-signature block at Cloudflare, before the API handles the request. Inspect the response body before changing API credentials.
Send a descriptive User-Agent, such as my-app/1.0, that identifies your application. The Python quickstart includes this header. Cloudflare documents this error and the client-header correction, including the default Python urllib signature. If blocking continues, preserve the response details for support.
Status families
Use the selected endpoint contract for its supported status codes.
Reads and writes
POST /api/v1/domains/{domain_id}/adapt/events, normal domain events, feedback, and State writes can mutate persistent or adaptive state. Use stable identifiers and inspect available state before replaying an ambiguous write.
POST /api/v1/domains/{domain_id}/adapt/predict reads the current adaptive prediction without adding an observation.
Isolation
A bearer token maps to the hosted session identity. Use freshdomain_id values for independent Domain workflows and structured run_id metadata to correlate their records. Independent State scopes require separate authenticated identities. Run one writer per online adaptive Domain unless interleaving is intended.
Recovery sequence
classify response → back off if transient → inspect state if write was ambiguous → resume from checkpoint See Operate stateful and adaptive workflows for ordering, identifiers, and reset behavior.Public API limits
Domain batches above 50 operations have returned HTTP
422. Batches that stopped after an operation failed have returned HTTP 207 with status: partial_failure. Follow the batch reconciliation rules to identify completed, uncertain, and unexecuted operations.
A 413 response means the request exceeded its payload limit. For admission-capacity responses such as 429, honor Retry-After when present and use bounded exponential backoff.
Batch store preserves items completed before a later failure. Reconcile a failed write from available state or returned item results before resubmitting it.