Skip to content

Get an organization's saved routes

GET
/route/routes
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.

org
required
string

The organization ID (org- and 12 hex digits), shown on Settings.

The organization’s routes.

Media typeapplication/json
object
org
required
string
routes
required

The routes.toml text.

string
rules
required

First 7 hex characters of SHA-256 over the text

string
updatedAt
required
string format: date-time
updatedBy
required

Who saved the choices last.

string | null

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.

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"

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.

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 organization has no saved routes (no_routes).

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