Skip to content

API Overview

The Doto API is a RESTful HTTP API. All requests and responses use JSON.

Base URL

http://localhost:3000

Authentication

All API endpoints that manage Doto resources require an API key.

The unauthenticated endpoints are:

  • GET /health
  • GET /api/v1/auth/google
  • GET /api/v1/auth/google/callback

Pass it in the Authorization header:

Authorization: Bearer doto_xxxxxxxx...

Requests without a valid key return 401:

json
{ "error": "Unauthorized", "code": "AUTH_REQUIRED" }

Response format

Success

json
{
  "data": { ... }
}

Paginated list

json
{
  "data": [ ... ],
  "meta": {
    "cursor": "eyJpZCI6Ii4uLiJ9",
    "hasMore": true
  }
}

Pass cursor as a query parameter to fetch the next page. Use limit to control page size (default: 20, max: 100).

Error

json
{
  "error": "Human-readable message",
  "code": "MACHINE_READABLE_CODE"
}

Error codes

CodeHTTPDescription
AUTH_REQUIRED401Missing or invalid API key
FORBIDDEN403Insufficient permissions
NOT_FOUND404Resource does not exist
VALIDATION_ERROR400Invalid request body or parameters
OAUTH_STATE_MISMATCH400OAuth callback state is missing or invalid
INVALID_TRANSITION400Task status transition not allowed
MAX_KEYS_REACHED400User already has 10 active API keys
CONFLICT409General uniqueness conflict
INTERNAL_ERROR500Unexpected server error

Endpoints

Released under the MIT License.