Send a machine's plan state
const url = 'https://api.cedr.dev/v1/route/machine';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"org":"northwind","machine":"m-1a2b3c4d5e6f","name":"work-laptop","at":"2026-10-29T18:02:11Z","cli":"0.1.0","rules":"8ff065e","routes":"org","pools":[{"harness":"codex","family":"","state":"ready","summary":"codex w4%","use":4},{"harness":"antigravity","family":"","state":"absent","summary":"antigravity skipped on this machine","use":null}],"next":[{"route":"review.code","targets":["codex/gpt-6.1-sol"],"reason":"primary"}],"stale":[{"harness":"muse","reader":"muse"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.cedr.dev/v1/route/machine \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "org": "northwind", "machine": "m-1a2b3c4d5e6f", "name": "work-laptop", "at": "2026-10-29T18:02:11Z", "cli": "0.1.0", "rules": "8ff065e", "routes": "org", "pools": [ { "harness": "codex", "family": "", "state": "ready", "summary": "codex w4%", "use": 4 }, { "harness": "antigravity", "family": "", "state": "absent", "summary": "antigravity skipped on this machine", "use": null } ], "next": [ { "route": "review.code", "targets": [ "codex/gpt-6.1-sol" ], "reason": "primary" } ], "stale": [ { "harness": "muse", "reader": "muse" } ] }'What cedr route sync sends after its pull: one machine’s current view, replacing the last one it sent. The Route page shows each plan’s state and the next pick on its ladders from it, and flags machines missing a provider the routes name or a usage reader the routes expect. Holds no history, briefs, code, paths or credentials. Machines not heard from for 30 days are dropped, and each member keeps their 10 most recent.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
The organization ID (org- and 12 hex digits)
The id the CLI made for this machine.
The machine’s name, its host name unless set in routes.toml; at most 64 characters.
The cedr version.
The rules hash of the routes the machine uses.
Whether it routes with its own file or the organization’s saved routes.
Each harness’s plan state, as cedr route pools --format json prints it.
object
A model window’s family
Highest percent used; null when unknown.
What a medium-size pick of each route would choose now; no targets when the work is kept.
object
Plans whose usage reader the machine’s routes.toml is missing.
object
Example
{ "org": "northwind", "machine": "m-1a2b3c4d5e6f", "name": "work-laptop", "at": "2026-10-29T18:02:11Z", "cli": "0.1.0", "rules": "8ff065e", "routes": "org", "pools": [ { "harness": "codex", "family": "", "state": "ready", "summary": "codex w4%", "use": 4 }, { "harness": "antigravity", "family": "", "state": "absent", "summary": "antigravity skipped on this machine", "use": null } ], "next": [ { "route": "review.code", "targets": [ "codex/gpt-6.1-sol" ], "reason": "primary" } ], "stale": [ { "harness": "muse", "reader": "muse" } ]}Responses
Section titled “Responses”The snapshot is stored.
object
Example
{ "ok": true}The request is malformed (bad_request); the message says what to send.
object
A stable code to branch on.
A readable explanation. Its wording may change.
Example
{ "error": "bad_request", "message": "Name the organization: ?org=<organization ID>."}The key is missing (missing_api_key) or invalid, expired or revoked (invalid_api_key). The WWW-Authenticate header names the Bearer scheme.
object
A stable code to branch on.
A readable explanation. Its wording may change.
Example
{ "error": "invalid_api_key", "message": "The key is invalid, expired or revoked."}Headers
Section titled “Headers”Example
Bearer realm="cedr.dev"The key’s owner is not a member of that organization (not_a_member).
object
A stable code to branch on.
A readable explanation. Its wording may change.
Example
{ "error": "not_a_member", "message": "You are not a member of an organization named northwind."}The body is over 64 KiB (too_large).
object
A stable code to branch on.
A readable explanation. Its wording may change.
Example
{ "error": "missing_api_key"}The key sent more requests in a minute than its owner’s plan allows (rate_limited): 30 on Free, 120 on Pro, 300 on Team and 600 on Business.
object
A stable code to branch on.
A readable explanation. Its wording may change.
Example
{ "error": "rate_limited", "message": "This key is over its plan's requests-a-minute limit."}Headers
Section titled “Headers”Seconds to wait before retrying.
Example
60Something failed on our side (internal_error). Retry with backoff.
object
A stable code to branch on.
A readable explanation. Its wording may change.
Example
{ "error": "internal_error", "message": "Something went wrong on our side. Try again."}