API overview

The public API is for user-owned clients such as the CLI, browser flows, and integrations that act on behalf of a signed-in SellTraces user. The generated endpoint reference is built from scripts/openapi/endpoints.ts and emitted to openapi.json.

Base URLs

EnvironmentBase URL
Productionhttps://selltraces.com
Local developmenthttp://localhost:3000
The generated OpenAPI file includes both servers.

Main surfaces

SurfaceEndpoints
CLI authPOST /api/cli/device/start, GET /api/cli/device/poll, GET /api/cli/session
CLI telemetryPOST /api/cli/telemetry
IngestPOST /api/ingest
Trace actionsGET /api/traces/{id}, PATCH /api/traces/{id}, POST /api/traces/bulk, GET /api/traces/{id}/download, POST /api/traces/known
Auth delegationGET /api/auth/{path}, POST /api/auth/{path}
Internal routes such as health checks are intentionally excluded from the public API reference.

Generated reference

Open the API Reference tab for generated operation pages. Endpoint pages use stable /api-reference/... URLs generated from the OpenAPI registry. The raw OpenAPI document is available at:
https://selltraces.com/docs/openapi.json

Response style

Most application-owned JSON routes return an ok envelope:
{
  "ok": true
}
Errors generally return:
{
  "ok": false,
  "error": "unauthorized"
}
Some legacy and delegated auth routes return bare error objects because their wire contract predates the shared envelope or is owned by Better Auth.