Skip to main content
The REST API is the canonical application surface. The web app, CLI, and MCP server all call the same domain services behind these routes — so behavior is consistent no matter how you connect.
This page covers conventions and common calls. For the full endpoint list, see the REST API reference.

Base URLs

Authentication

Browser sessions use Better Auth cookies through /api/auth/*. Automation uses bearer auth:
Bearer-authenticated requests skip CSRF checks, which makes them convenient for scripts and services.

Response shape

Most JSON routes return either a domain object or an object wrapping a collection:
Create routes return 201 on success. Raw content routes can return source text with content headers instead of JSON.

Errors

Domain errors map to stable HTTP categories:

Common calls

Path resolution is handy when an agent has a URL-like identity and needs the artifact ID for later operations.

MCP metadata

The API also serves the OAuth metadata MCP clients need:

REST API reference

Every endpoint, grouped by resource, with request bodies.