Interfaces

The Apprail API

The console and the CLI are built on the same versioned REST API. Everything they do, your own tools can do.

Authentication

Send an API token as a bearer token. A token belongs to one workspace, carries its access (read, deploy, or full), and never exceeds its creator’s role.

Terminal
curl https://console.apprail.io/api/v1/me \
  -H "Authorization: Bearer $APPRAIL_TOKEN"

Deploy with curl

Terminal
curl -X POST https://console.apprail.io/api/v1/services/$SERVICE_ID/deployments \
  -H "Authorization: Bearer $APPRAIL_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"environment_id": "'$ENV_ID'", "image": "ghcr.io/acme/web:1.4"}'

curl https://console.apprail.io/api/v1/deployments/$DEPLOYMENT_ID \
  -H "Authorization: Bearer $APPRAIL_TOKEN"

Reference

The OpenAPI 3.1 description is the complete reference: https://console.apprail.io/api/openapi.yaml. Load it into your HTTP client or generate a typed client from it. GET /api/v1/capabilities needs no sign-in and says what this platform supports right now, separating what’s available from what’s planned.

AreaMain paths
Account/me, /me/sessions
Workspace/workspaces/{id}/members, /invitations, /tokens, /activity, /usage, /quotas, /export, /alert-channels, /registry-credentials
Projects/workspaces/{id}/projects, /projects/{id}/environments, /projects/{id}/approvals
Environments/environments/{id}/variables, /references, /protection
Services/projects/{id}/services, /services/{id}, /github, /domains, /uptime-checks
Shipping/services/{id}/deployments, /builds, /promotions, /deployments/{id}/rollback, /changes, /approve, /reject
Running/services/{id}/logs, /metrics, /diagnostics, /runs, /jobs, /job-runs/{id}
Data/projects/{id}/databases, /caches, /queues, /buckets, and each resource’s rotate-password, backups, credentials, tunnel

All paths start with /api/v1. The JSON Schema for apprail.yml is at /api/apprail.schema.json.

Conventions

Building an agent integration? The agent guide covers scoped tokens, JSON output, and approvals.