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 fromscripts/openapi/endpoints.ts and emitted to openapi.json.
Base URLs
| Environment | Base URL |
|---|---|
| Production | https://selltraces.com |
| Local development | http://localhost:3000 |
Main surfaces
| Surface | Endpoints |
|---|---|
| CLI auth | POST /api/cli/device/start, GET /api/cli/device/poll, GET /api/cli/session |
| CLI telemetry | POST /api/cli/telemetry |
| Ingest | POST /api/ingest |
| Trace actions | GET /api/traces/{id}, PATCH /api/traces/{id}, POST /api/traces/bulk, GET /api/traces/{id}/download, POST /api/traces/known |
| Auth delegation | GET /api/auth/{path}, POST /api/auth/{path} |
Generated reference
Open the API Reference tab for generated operation pages. Endpoint pages use stable/api-reference/... URLs generated from the OpenAPI registry.
| Surface | Generated endpoint pages |
|---|---|
| CLI auth | Start device login, poll device login, get CLI session |
| CLI telemetry | Submit CLI parser diagnostics |
| Ingest | Queue trace ingestion |
| Trace actions | Get trace sale state, update trace sale eligibility, bulk update trace sale eligibility, check known trace hashes, download scrubbed trace JSON |
| Auth delegation | Better Auth GET route, Better Auth POST route |
Response style
Most application-owned JSON routes return anok envelope:
error objects because their wire contract predates the shared envelope or is owned by Better Auth.