Pick an auth route
Third-party agents use the OAuth 2.0 authorization-code flow with PKCE. First-party automation mints a scoped key in the app or via the API.
Authorization: Bearer ak_<keyId>.<secret>
Developers & API
Everything an automated client needs: a typed OpenAPI surface, OAuth 2.0 with PKCE, scoped long-lived agent keys, an MCP server, and machine-readable discovery at predictable URLs.
Quickstart
Third-party agents use the OAuth 2.0 authorization-code flow with PKCE. First-party automation mints a scoped key in the app or via the API.
Authorization: Bearer ak_<keyId>.<secret>
Every public endpoint is specified in the OpenAPI 3.0 specification — operationIds, request/response schemas, error codes, and per-operation OAuth scopes.
curl -s https://topodrive.top/openapi.json
Base URL https://app.topodrive.top. Health probe first: GET /api/v2/health. Rate-limit headers (RateLimit-Limit / -Remaining / -Reset) ride every response.
GET https://app.topodrive.top/api/v2/health
Machine-readable endpoints
Socrates advertises machine-readable contracts and manifests at standardized URLs for agent crawlers, developer toolchains, and LLMs.
Architecture & Rules
Failures return one shape: {"code": "MACHINE_READABLE_CODE", "message": "human detail", "detail": …} with standard HTTP statuses: 400 validation, 401 UNAUTHORIZED, 403 INSUFFICIENT_SCOPE, 404 NOT_FOUND, 429 TOO_MANY_REQUESTS.
OAuth tokens and agent keys carry grants from a closed set (chat:read/write, sessions:…, memory:…, files:…, projects:…). Read methods demand :read, mutations demand :write.
Send Idempotency-Key: <uuid> on any write; replays within 24 hours return the original response instead of duplicating work.
Standard RateLimit-Limit, RateLimit-Remaining, and RateLimit-Reset headers are returned on every request for client-side proactive throttling.
List endpoints respond with {items, cursor, hasMore}. Pass ?cursor=<cursor> until hasMore returns false.
Deprecations are announced with a Sunset header (HTTP date) and notes in announcements at least 90 days before removal.
Integration Support
Email help@addtech.site — include your request ID (the X-Request-Id response header) and we can trace the exact execution call.