API Overview
The sota.io REST API provides programmatic access to all platform operations. The API is the foundation that the CLI, dashboard, and MCP server all use.
Base URL
https://api.sota.io/v1
All endpoints are prefixed with /v1.
Authentication
Every request must include an authentication header. sota.io supports three authentication methods:
| Method | Header | Use Case |
|---|---|---|
| Supabase JWT | Authorization: Bearer <jwt> | Dashboard, CLI |
| API Key | Authorization: Bearer sota_<key> | CI/CD, MCP, scripts |
| Partner API Key | Authorization: Bearer sotap_<key> | B2B partner integration |
See Authentication for details.
Request Format
- Content-Type:
application/jsonfor most endpoints - Content-Type:
multipart/form-datafor deploy endpoint (file upload)
Response Format
All single-resource responses return JSON wrapped in a data envelope:
{
"data": { ... }
}
List endpoints include pagination metadata:
{
"data": [ ... ],
"pagination": {
"next_cursor": "abc123",
"has_more": true
}
}
Error responses:
{
"error": {
"message": "Project not found",
"code": "not_found"
}
}
HTTP Status Codes
| Code | Description |
|---|---|
200 | Success |
201 | Created |
202 | Accepted (async operation started) |
204 | No Content (successful delete) |
400 | Bad request (validation error) |
401 | Unauthorized (missing or invalid auth) |
403 | Forbidden (insufficient permissions) |
404 | Resource not found |
409 | Conflict (e.g. slug already taken) |
422 | Validation error |
429 | Rate limited |
500 | Internal server error |
503 | Service unavailable (e.g. build queue full) |
Rate Limiting
API requests are rate-limited to 100 requests per minute per authenticated user.
Rate limit headers are included in every response:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 98
X-RateLimit-Reset: 1709312400
Pagination
List endpoints use cursor-based pagination:
GET /v1/projects?limit=20&cursor=abc123
Response includes pagination metadata:
{
"data": [ ... ],
"pagination": {
"next_cursor": "def456",
"has_more": true
}
}
When has_more is false, there are no more results.
SDKs
Use the official TypeScript SDK for type-safe API access:
npm install @sota-io/sdk
- npm package
- Source Code
- CLI (Go) and MCP Server (TypeScript) also available