Skip to content

Send a machine's plan state

PUT
/route/machine
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.

Media typeapplication/json
object
org
required

The organization ID (org- and 12 hex digits)

string
machine
required

The id the CLI made for this machine.

string
/^m-[0-9a-f]{12}$/
name
required

The machine’s name, its host name unless set in routes.toml; at most 64 characters.

string
<= 64 characters
at
required
string format: date-time
cli
required

The cedr version.

string
rules
required

The rules hash of the routes the machine uses.

string
routes
required

Whether it routes with its own file or the organization’s saved routes.

string
Allowed values: local org
pools
required

Each harness’s plan state, as cedr route pools --format json prints it.

Array<object>
<= 64 items
object
harness
required
string
family
required

A model window’s family

string
state
required
string
Allowed values: ready unknown conserve out absent
summary
required
string
use
required

Highest percent used; null when unknown.

number | null
next
required

What a medium-size pick of each route would choose now; no targets when the work is kept.

Array<object>
<= 64 items
object
route
required
string
targets
required
Array<string>
reason
required
string
stale
required

Plans whose usage reader the machine’s routes.toml is missing.

Array<object>
<= 16 items
object
harness
required
string
reader
required
string
Allowed values: codex muse claude-statusline

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"
}
]
}

The snapshot is stored.

Media typeapplication/json
object
ok
required
boolean

Example

{
"ok": true
}

The request is malformed (bad_request); the message says what to send.

Media typeapplication/json
object
error
required

A stable code to branch on.

string
Allowed values: missing_api_key invalid_api_key ip_not_allowed insufficient_scope rate_limited not_found internal_error
message
required

A readable explanation. Its wording may change.

string

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.

Media typeapplication/json
object
error
required

A stable code to branch on.

string
Allowed values: missing_api_key invalid_api_key ip_not_allowed insufficient_scope rate_limited not_found internal_error
message
required

A readable explanation. Its wording may change.

string

Example

{
"error": "invalid_api_key",
"message": "The key is invalid, expired or revoked."
}
WWW-Authenticate
string
Example
Bearer realm="cedr.dev"

The key’s owner is not a member of that organization (not_a_member).

Media typeapplication/json
object
error
required

A stable code to branch on.

string
Allowed values: missing_api_key invalid_api_key ip_not_allowed insufficient_scope rate_limited not_found internal_error
message
required

A readable explanation. Its wording may change.

string

Example

{
"error": "not_a_member",
"message": "You are not a member of an organization named northwind."
}

The body is over 64 KiB (too_large).

Media typeapplication/json
object
error
required

A stable code to branch on.

string
Allowed values: missing_api_key invalid_api_key ip_not_allowed insufficient_scope rate_limited not_found internal_error
message
required

A readable explanation. Its wording may change.

string

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.

Media typeapplication/json
object
error
required

A stable code to branch on.

string
Allowed values: missing_api_key invalid_api_key ip_not_allowed insufficient_scope rate_limited not_found internal_error
message
required

A readable explanation. Its wording may change.

string

Example

{
"error": "rate_limited",
"message": "This key is over its plan's requests-a-minute limit."
}
Retry-After
integer

Seconds to wait before retrying.

Example
60

Something failed on our side (internal_error). Retry with backoff.

Media typeapplication/json
object
error
required

A stable code to branch on.

string
Allowed values: missing_api_key invalid_api_key ip_not_allowed insufficient_scope rate_limited not_found internal_error
message
required

A readable explanation. Its wording may change.

string

Example

{
"error": "internal_error",
"message": "Something went wrong on our side. Try again."
}