REST API
Mila provides a REST API for programmatic access to your documents, sheets, and slide presentations. Authenticate with an API key and interact with your content using standard HTTP methods.
Base URL:
https://api.mila.gg/v1Authentication
All requests require an API key. Include it in the Authorization header:
bash
Authorization: Bearer mila_sk_your_key_hereYou can also use the X-API-Key header:
bash
X-API-Key: mila_sk_your_key_hereCreate and manage API keys from your account at /api-keys (individual) or /team-api (teams).
Scopes
Each API key has scopes that control what it can access:
| Scope | Description |
|---|---|
documents:read | List and read documents |
documents:write | Create, update, and delete documents |
sheets:read | List and read sheets |
sheets:write | Create, update, and delete sheets |
slides:read | List and read slide presentations |
slides:write | Create, update, and delete slide presentations |
Response Format
All responses follow the same structure:
JSON
{
"success": true,
"data": { ... }
}Error responses:
JSON
{
"success": false,
"error": "Description of what went wrong."
}List endpoints include pagination:
JSON
{
"success": true,
"data": [ ... ],
"pagination": {
"total": 42,
"limit": 50,
"offset": 0
}
}Rate Limits
API keys have a default rate limit of 60 requests per minute. When exceeded, requests return 429 Too Many Requests. The limit is configurable per key (up to 120/min).