For AI agents: the complete documentation index is at https://docs.routebase.dev/llms.txt. Every page is also available as Markdown by appending index.md to its URL or by sending Accept: text/markdown.

Connect your agent

Your AI agent can search and read these docs over MCP. The endpoint is read-only and needs no key.

MCP endpoint

https://docs.routebase.dev/mcp

Claude Code Run in a terminal

claude mcp add --transport http routebase-documentation https://docs.routebase.dev/mcp

Cursor Add to .cursor/mcp.json

{
  "mcpServers": {
    "routebase-documentation": {
      "url": "https://docs.routebase.dev/mcp"
    }
  }
}

VS Code Add to .vscode/mcp.json

{
  "servers": {
    "routebase-documentation": {
      "type": "http",
      "url": "https://docs.routebase.dev/mcp"
    }
  }
}

Codex Add to ~/.codex/config.toml

[mcp_servers.routebase-documentation]
url = "https://docs.routebase.dev/mcp"
API Policies

API Authentication

Every request to the Routebase public API carries a credential that identifies your organization. Most operations take an API key, and the SCIM endpoints take a separate bearer token that your identity provider sends.

Getting an API key

API keys are created under Settings → API Keys, which requires the org:manage-security permission and a verified email address. The full key is shown once after creation, so store it in a CI secret or a password manager right away.

Keys start with rb_live_. API Keys covers the dialog, the expiry options and the scopes a key can carry.

Sending the key

Send the key in the X-API-Key header on every request to https://api.routebase.dev.

curl "https://api.routebase.dev/api/cli/suites?projectId=$PROJECT_ID" \
  -H "X-API-Key: $ROUTEBASE_API_KEY"

The API answers with 401 when the key is missing, unknown, revoked or expired.

Organizations in the US region

An organization lives in exactly one region. If your organization is in the US region, send X-RB-Region: us on every request.

curl "https://api.routebase.dev/api/cli/suites?projectId=$PROJECT_ID" \
  -H "X-API-Key: $ROUTEBASE_API_KEY" \
  -H "X-RB-Region: us"

Without the header, the request reaches the EU region, which doesn't know your key and answers with 401. EU organizations leave the header out.

Every response carries an X-RB-Region header with the region that answered, so you can check the routing when a valid key is rejected.

What a key can reach

The scopes of a key decide which operations it can call:

  • A Full Access key reaches every operation in the reference.
  • A scoped key reaches only the operations whose permission it holds, such as tests:execute for starting a test run.
  • A permission that is restricted to one project works only in that project.
  • A scoped key never reaches organization level operations, even with every permission ticked.

Grant the least privilege that works, because a key in a pipeline is exposed to everybody who can change that pipeline.

Authenticating SCIM requests

The SCIM endpoints under /scim/v2/{orgSlug}/ take the SCIM token of your organization in the Authorization header.

Authorization: Bearer <your SCIM token>

The token is issued when SCIM provisioning is enabled for your organization, and your identity provider sends it on every request. It only unlocks the SCIM endpoints, and an API key is rejected there with 401. SSO Setup Overview explains how SCIM provisioning is set up.

SCIM errors use the SCIM error envelope with the content type application/scim+json, as RFC 7644 defines it.

Troubleshooting

Symptom Cause Way out
401 on every request The key is missing, mistyped, revoked or expired. Check the header name X-API-Key and the key in Settings → API Keys.
401 although the key is valid Your organization is in the US region and the request went to the EU region. Send X-RB-Region: us.
403 with the code API_KEY_SCOPE_DENIED The key lacks the permission for this operation, or the operation is organization level and the key is scoped. Add the permission to the key, or use a key that has it.
403 with the code API_KEY_PROJECT_SCOPE_DENIED The key is restricted to another project. Extend the restriction to this project, or use the key of this project.
403 with the code PROJECT_ACCESS_DENIED The project ID doesn't exist in your organization, or the user behind the key has no team access to it. Check the project ID and the team access of that user.

API Error Codes lists every code the API returns.