Skip to content

API Reference

The SKE API is a REST API that powers both the CLI and dashboard. All resources are managed through this API.

https://api.ske.io/api/v1

All endpoints are prefixed with /api/v1.

The API supports two authentication methods:

Used by the CLI and dashboard. Obtained through the passwordless login flow:

  1. POST /auth/login — sends a magic link to the user’s email
  2. User clicks the link in their browser
  3. POST /auth/verify or POST /auth/poll — exchanges the token for a JWT access + refresh token pair

Access tokens expire after 15 minutes. Use POST /auth/refresh to get a new access token.

Authorization: Bearer eyJhbGciOiJSUzI1NiIs...

Used by CI/CD pipelines and automation. Created through the dashboard or API.

Authorization: Bearer ske_tok_abc123...

See API Tokens for creating and managing tokens.

  • Request bodies use JSON (Content-Type: application/json)
  • Responses are JSON
  • Timestamps use ISO 8601 format
  • IDs are ULIDs

Resources are nested under the organization and workspace:

/api/v1/organizations/{org}/workspaces/{workspace}/projects/{project}/environments/{env}

The {org} and {workspace} slugs are required for most endpoints. The CLI resolves these automatically from your configuration.

The API enforces rate limits per authentication identity. Rate limit headers are included in responses:

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 58
X-RateLimit-Reset: 1726840200
Method Path Description
POST /auth/login Send magic link
POST /auth/register Create account + send magic link
POST /auth/verify Exchange magic link token for JWT
POST /auth/poll CLI polls for JWT after magic link click
POST /auth/refresh Refresh access token
POST /auth/logout Revoke refresh token
GET /auth/me Current user, org, workspace, permissions
Method Path Description
GET /organizations List organizations
POST /organizations Create organization
GET /organizations/{org} Get organization details
PUT /organizations/{org} Update organization
POST /organizations/{org}/switch Switch current organization
GET /organizations/{org}/audit-log View audit log
GET /organizations/{org}/doctor Run diagnostics
Method Path Description
GET /organizations/{org}/workspaces List workspaces
POST /organizations/{org}/workspaces Create workspace
GET /organizations/{org}/workspaces/{ws} Get workspace
PUT /organizations/{org}/workspaces/{ws} Update workspace
DELETE /organizations/{org}/workspaces/{ws} Delete workspace
Method Path Description
GET .../{org}/members List members
DELETE .../{org}/members/{id} Remove member
GET .../{org}/teams List teams
POST .../{org}/teams Create team
PUT .../{org}/teams/{id} Update team
DELETE .../{org}/teams/{id} Delete team
POST .../{org}/teams/{id}/members Add member to team
DELETE .../{org}/teams/{id}/members/{uid} Remove member from team
Method Path Description
GET .../{org}/invitations List pending invitations
POST .../{org}/invitations Send invitation
DELETE .../{org}/invitations/{id} Cancel invitation
POST .../{org}/invitations/{id}/resend Resend invitation
POST /invitations/{token}/accept Accept invitation
POST /invitations/{token}/decline Decline invitation
Method Path Description
GET .../{ws}/projects List projects
POST .../{ws}/projects Create project
GET .../{ws}/projects/{proj} Get project
PUT .../{ws}/projects/{proj} Update project
DELETE .../{ws}/projects/{proj} Delete project
Method Path Description
GET .../{proj}/environments List environments
POST .../{proj}/environments Create environment
GET .../{proj}/environments/{env} Get environment
PUT .../{proj}/environments/{env} Update environment
DELETE .../{proj}/environments/{env} Delete environment
Method Path Description
GET .../{env}/deployments List deployments
GET .../{env}/deployments/{id} Get deployment details
POST .../{env}/deploy Trigger deployment
POST .../{env}/deploy/assets Upload static assets
POST .../{env}/deploy/confirm Confirm deployment
POST .../{env}/redeploy Redeploy (config sync)
POST .../{env}/rollback Roll back deployment
Method Path Description
GET .../{env}/secrets List secrets (keys only)
POST .../{env}/secrets Set a secret
DELETE .../{env}/secrets/{key} Delete a secret
Method Path Description
GET .../{ws}/cloud-providers List cloud providers
POST .../{ws}/cloud-providers Connect provider
POST .../{ws}/cloud-providers/{id}/validate Validate credentials
GET .../{ws}/networks List networks
POST .../{ws}/networks Create network
GET .../{ws}/databases List databases
POST .../{ws}/databases Create database
GET .../{ws}/caches List caches
POST .../{ws}/caches Create cache
GET .../{ws}/domains List domains
POST .../{ws}/domains Create domain
Method Path Description
GET .../{env}/logs Get logs
POST .../{env}/maintenance/down Enable maintenance mode
POST .../{env}/maintenance/up Disable maintenance mode
POST .../{env}/command Run artisan command
POST .../{env}/tinker Run tinker command
POST .../{env}/warmup Trigger warmup
POST .../{env}/queues/{name}/pause Pause queue
POST .../{env}/queues/{name}/resume Resume queue
GET .../{env}/metrics Get environment metrics
Method Path Description
GET .../{org}/jobs List infrastructure jobs
GET .../{org}/jobs/{id} Get job details
POST .../{org}/jobs/{id}/cancel Cancel job
Method Path Description
GET .../{org}/api-tokens List tokens
POST .../{org}/api-tokens Create token
GET .../{org}/api-tokens/{id} Get token details
DELETE .../{org}/api-tokens/{id} Revoke token
GET .../{org}/api-tokens/available-permissions List available permissions

Errors return a JSON object with message and optional errors for validation failures:

{
"message": "The given data was invalid.",
"errors": {
"name": ["The name field is required."]
}
}
Status Meaning
400 Bad request
401 Unauthenticated
403 Unauthorized
404 Not found
422 Validation error
429 Rate limited
500 Server error