Public API Overview
Automate and integrate with SailOps through a fully programmable REST API.
The SailOps Public API gives you programmatic control over every resource in your project: containers, databases, gateways, jobs, and more. Use it to automate deployments, build internal tooling, integrate with CI/CD pipelines, or manage infrastructure declaratively with the Stack Engine.
Base URL
https://app.sailops.io/api/public/api/v1
All endpoints are served over HTTPS. HTTP requests are not supported.
Authentication
The Public API uses API key authentication. Include your API key in the X-Api-Key header on every request:
curl -H "X-Api-Key: $SAILOPS_API_KEY" \
https://app.sailops.io/api/public/api/v1/containers
API key scoping
Only project API keys are accepted. An organization or personal key receives a FORBIDDEN error with the message "This API key does not belong to a project." Use the API (new) for keys with a broader subject.
Each project key is bound to a specific project. A key created in project my-project can only access resources within that project. Keys cannot be shared across projects.
To create a project key, go to Project Settings > API Keys. See the API Keys guide for step-by-step instructions.
Store your API key in a secret manager or CI/CD secret store. Never commit it to source control or include it in client-side code.
Unauthenticated Endpoints
Two endpoints do not require an API key:
GET /api/v1/plans— public support plan catalogGET /api/v1/pricing— public pricing information
Quick Example
List all containers in your project:
curl -H "X-Api-Key: $SAILOPS_API_KEY" \
https://app.sailops.io/api/public/api/v1/containers
Deploy a new container image via CI/CD:
curl -X PUT \
-H "X-Api-Key: $SAILOPS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"computeClass": "standard", "image": "ghcr.io/myorg/api:v2.0.0", "resources": {"cpu": 500, "memory": 512}}' \
https://app.sailops.io/api/public/api/v1/containers/my-api
Rate Limiting
Standard rate limits apply to all authenticated requests. If you exceed the rate limit, the API returns a 429 Too Many Requests response. Use exponential backoff when retrying.
Error Format
All errors follow a consistent JSON structure:
{
"code": "NOT_FOUND",
"traceId": "01HXYZ123456789",
"message": "Container 'my-api' not found"
}
For validation errors, an additional validations array provides field-level details:
{
"code": "REQUEST_VALIDATION",
"traceId": "01HXYZ123456789",
"message": "Request validation failed",
"validations": [
{
"path": "$.body.name",
"code": "PATTERN",
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
}
]
}
Error Codes
| Code | HTTP Status | Description |
|---|---|---|
UNAUTHORIZED | 401 | Missing or invalid API key |
FORBIDDEN | 403 | API key does not have permission for this resource |
EXPIRED_AUTHENTICATION | 401 | API key has expired |
REQUEST_VALIDATION | 400 | One or more request fields failed validation — check validations for details |
METHOD_NOT_ALLOWED | 405 | HTTP method is not allowed for this path |
NOT_FOUND | 404 | The requested resource does not exist |
CONFLICT | 409 | Request conflicts with the current state of the resource |
ORGANIZATION_ARCHIVED | 403 | Organization is archived. Modifications are no longer permitted. |
ORGANIZATION_HAS_ACTIVE_PROJECTS | 409 | Cannot archive an organization while active or pending-deletion projects remain. |
PROJECT_PENDING_DELETION | 403 | Project is scheduled for deletion. Restore the project to make changes. |
INTERNAL | 500 | Internal server error — include traceId when contacting support |
What's Available
The Public API exposes the full surface of the SailOps platform:
| Category | Resources |
|---|---|
| Containers | Create, update, start, stop, restart, configure, and stream logs |
| Websites | Create, update, start, stop, and delete static or PHP websites |
| Gateways & Routes | Manage load balancers, domains, and HTTP/TCP/gRPC/TLS routing |
| Services | Provision and scale PostgreSQL, MariaDB, Valkey, and NATS |
| Connections | Wire containers to services with auto-injected environment variables |
| Jobs | Run one-time batch tasks |
| CronJobs | Schedule recurring tasks with cron expressions |
| Stack Engine | Apply declarative YAML stacks for infrastructure-as-code |
| Plans | Browse the public support plan catalog (no auth required) |
| Pricing | Query current compute and storage pricing (no auth required) |
See the Endpoints Reference for the complete list of 91 endpoints, or the Stack Engine guide for declarative infrastructure management.
MCP Server
The SailOps MCP Server exposes the same API as a set of tools for AI assistants. Connect Claude, Cursor, or any MCP-compatible client to manage your infrastructure through natural language.
Related Topics
- API Keys — Create and manage API keys
- CI/CD Integration — GitHub Actions and GitLab CI deployment guides
- Endpoints Reference — Full endpoint listing
- Stack Engine — Declarative infrastructure-as-code
- MCP Server — AI assistant integration