API Reference
The Corelix API provides programmatic access to manage your applications, databases, services, servers, and infrastructure. It follows REST conventions and returns JSON responses.
Base URL
All API endpoints are prefixed with /api/v1/:
https://your-instance.com/api/v1/
For Corelix Cloud users:
https://app.corelix.io/api/v1/
Authentication
All API requests require a Bearer token. Create an API token from Settings > Keys & Tokens > API Tokens in the dashboard.
Include the token in the Authorization header:
curl -H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json" \
https://app.corelix.io/api/v1/servers
Token Scopes
API tokens have three permission scopes:
| Scope | Description |
|---|---|
read | List and view resources |
write | Create, update, and delete resources |
deploy | Trigger deployments |
When creating a token, select the scopes your integration requires. Use the principle of least privilege — grant only the scopes you need.
Team-Scoped Access
API tokens are scoped to your current team. All requests return resources belonging to that team only.
Response Format
All responses are JSON. Successful responses return the resource data directly or wrapped in a data key for lists:
Single resource:
{
"uuid": "abc123",
"name": "My Application",
"status": "running"
}
Collection:
{
"data": [
{ "uuid": "abc123", "name": "App 1" },
{ "uuid": "def456", "name": "App 2" }
]
}
Mutation (create/update):
{
"message": "Application created.",
"data": { "uuid": "abc123", "name": "My Application" }
}
Error Handling
Errors return standard HTTP status codes with a JSON body:
{
"message": "Human-readable error message.",
"errors": {
"field_name": ["Specific error for this field."]
}
}
Common Status Codes
| Code | Description |
|---|---|
200 | Success |
201 | Created |
400 | Bad request — invalid parameters |
401 | Unauthorized — invalid or missing token |
402 | Payment required — feature requires a Pro license |
403 | Forbidden — insufficient permissions |
404 | Not found — resource doesn't exist |
409 | Conflict — resource already exists |
422 | Validation error — invalid request body |
429 | Too many requests — rate limit exceeded |
500 | Internal server error |
Rate Limiting
API requests are rate-limited to 60 requests per minute per API token.
Rate limit information is included in response headers:
| Header | Description |
|---|---|
X-RateLimit-Limit | Maximum requests per window |
X-RateLimit-Remaining | Remaining requests in current window |
X-RateLimit-Reset | Unix timestamp when the window resets |
When the rate limit is exceeded, a 429 Too Many Requests response is returned. Wait until the reset time before retrying.
Pagination
List endpoints return all results by default. For large datasets, results are paginated:
| Parameter | Type | Description |
|---|---|---|
page | integer | Page number (default: 1) |
per_page | integer | Items per page (default: 15, max: 100) |
SDK Examples
cURL
curl -H "Authorization: Bearer $API_TOKEN" \
-H "Accept: application/json" \
https://app.corelix.io/api/v1/applications
JavaScript
const response = await fetch('https://app.corelix.io/api/v1/applications', {
headers: {
'Authorization': `Bearer ${apiToken}`,
'Accept': 'application/json',
},
});
const data = await response.json();
Python
import requests
response = requests.get(
'https://app.corelix.io/api/v1/applications',
headers={
'Authorization': f'Bearer {api_token}',
'Accept': 'application/json',
}
)
data = response.json()
PHP (Laravel)
$response = Http::withToken($apiToken)
->get('https://app.corelix.io/api/v1/applications');
$applications = $response->json('data');