Skip to main content

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.

Key Security

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 catalog
  • GET /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​

CodeHTTP StatusDescription
UNAUTHORIZED401Missing or invalid API key
FORBIDDEN403API key does not have permission for this resource
EXPIRED_AUTHENTICATION401API key has expired
REQUEST_VALIDATION400One or more request fields failed validation — check validations for details
METHOD_NOT_ALLOWED405HTTP method is not allowed for this path
NOT_FOUND404The requested resource does not exist
CONFLICT409Request conflicts with the current state of the resource
ORGANIZATION_ARCHIVED403Organization is archived. Modifications are no longer permitted.
ORGANIZATION_HAS_ACTIVE_PROJECTS409Cannot archive an organization while active or pending-deletion projects remain.
PROJECT_PENDING_DELETION403Project is scheduled for deletion. Restore the project to make changes.
INTERNAL500Internal server error — include traceId when contacting support

What's Available​

The Public API exposes the full surface of the SailOps platform:

CategoryResources
ContainersCreate, update, start, stop, restart, configure, and stream logs
WebsitesCreate, update, start, stop, and delete static or PHP websites
Gateways & RoutesManage load balancers, domains, and HTTP/TCP/gRPC/TLS routing
ServicesProvision and scale PostgreSQL, MariaDB, Valkey, and NATS
ConnectionsWire containers to services with auto-injected environment variables
JobsRun one-time batch tasks
CronJobsSchedule recurring tasks with cron expressions
Stack EngineApply declarative YAML stacks for infrastructure-as-code
PlansBrowse the public support plan catalog (no auth required)
PricingQuery 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.