API Reference Notes
This document summarizes API versioning and error payload conventions for sideBar.Versioning
- Base path:
/api/v1for all backend routes. - Legacy path:
/api/*routes are supported but deprecated.
Deprecation headers
When a legacy/api/* route is used, the backend responds with:
X-API-Deprecated: trueX-API-Deprecated-Path: /api/...X-API-New-Path: /api/v1/...X-API-Sunset-Date: 2026-06-01
Error responses
All API errors return a consistent JSON payload:Error codes
These are the standardized error codes returned by the backend:| Code | HTTP | Description |
|---|---|---|
BAD_REQUEST | 400 | Invalid request payload or missing input. |
VALIDATION_ERROR | 400 | Validation failed for a specific field. |
AUTHENTICATION_REQUIRED | 401 | Missing authentication credentials. |
INVALID_TOKEN | 401 | Invalid or expired token. |
PERMISSION_DENIED | 403 | User lacks permission for the action. |
NOT_FOUND | 404 | Resource does not exist. |
CONFLICT | 409 | Resource state conflict (e.g., in-progress processing). |
PAYLOAD_TOO_LARGE | 413 | Upload exceeded size limits. |
RANGE_NOT_SATISFIABLE | 416 | Invalid content range requested. |
SERVICE_UNAVAILABLE | 503 | Required service unavailable. |
INTERNAL_ERROR | 500 | Unhandled server error. |
EXTERNAL_SERVICE_ERROR | 502 | Upstream service failed. |
HTTP_ERROR | varies | Legacy FastAPI HTTPException normalization. |
Tasks API
Base path:/api/v1/tasks
GET /lists/{scope}
Scopes: inbox, today, upcoming, someday, search (use /search endpoint), project, area.
Response (example):
GET /search?query=...
Response (example):
GET /counts
Response (example):
POST /apply
Applies task operations (single or batched) with idempotency.
Request (single op example):
POST /sync
Offline-first sync endpoint. Applies outbox operations and returns deltas since
last_sync. Conflicts return the server version without applying the client op.
Request (example):