Get an organization's saved routes
const url = 'https://api.cedr.dev/v1/route/routes?org=example';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.cedr.dev/v1/route/routes?org=example' \ --header 'Authorization: Bearer <token>'What cedr route sync pulls: the routes.toml generated from the organization’s saved choices and the current recommendations, so a new recommendation arrives without saving again. It never contains plan readers or sync settings; those stay in each machine’s own file. Saving routes needs Pro or higher.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”The organization ID (org- and 12 hex digits), shown on Settings.
Responses
Section titled “Responses”The organization’s routes.
object
The routes.toml text.
First 7 hex characters of SHA-256 over the text
Who saved the choices last.
Example
{ "org": "northwind", "routes": "version = 1\n...", "rules": "8ff065e", "updatedAt": "2026-10-29T07:00:00.000Z", "updatedBy": "Sam Rivera"}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"You are not a member of that organization (not_a_member), or its plan does not include saved routes (plan_required). The CLI removes any copy it pulled earlier.
object
A stable code to branch on.
A readable explanation. Its wording may change.
Example
{ "error": "missing_api_key"}The organization has no saved routes (no_routes).
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."}