Skip to main content

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:

ScopeDescription
readList and view resources
writeCreate, update, and delete resources
deployTrigger 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​

CodeDescription
200Success
201Created
400Bad request — invalid parameters
401Unauthorized — invalid or missing token
402Payment required — feature requires a Pro license
403Forbidden — insufficient permissions
404Not found — resource doesn't exist
409Conflict — resource already exists
422Validation error — invalid request body
429Too many requests — rate limit exceeded
500Internal 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:

HeaderDescription
X-RateLimit-LimitMaximum requests per window
X-RateLimit-RemainingRemaining requests in current window
X-RateLimit-ResetUnix 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:

ParameterTypeDescription
pageintegerPage number (default: 1)
per_pageintegerItems 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');