API Reference

Explore the full Spunto REST API — all endpoints, request bodies, and response schemas.

The Spunto API is a REST API. All endpoints require a Bearer token (except public auth routes).

The full interactive API reference is available at:

https://spunto.net/api/docs

It's generated automatically from the OpenAPI 3.1 spec — always up to date.

All API requests (except /api/auth/*) require:

Authorization: Bearer <token>

Two kinds of token are accepted:

  • Session token — issued when you sign in with Google. The same token is set as an httpOnly session cookie by the auth flow — browser requests include it automatically. Carries full access (no scoping).
  • API key (spk_...) — a scoped, revocable token generated from the dashboard for headless access (scripts, CI, AI agents). See the API Keys page for how to create and use one.

https://spunto.net

All endpoints start with /api/.

GET    /api/orgs              List organizations
POST   /api/orgs              Create organization
GET    /api/orgs/:orgId       Get organization details
GET    /api/orgs/:orgId/members  List members

GET    /api/orgs/:orgId/projects                         List projects
POST   /api/orgs/:orgId/projects                         Create project
GET    /api/orgs/:orgId/projects/:projectId              Get project
PATCH  /api/orgs/:orgId/projects/:projectId              Update project
DELETE /api/orgs/:orgId/projects/:projectId              Delete project
POST   /api/orgs/:orgId/projects/:projectId/build        Trigger pre-build on all nodes
GET    /api/orgs/:orgId/projects/:projectId/image-builds List build records

GET    /api/orgs/:orgId/projects/:projectId/workers                      List workers
POST   /api/orgs/:orgId/projects/:projectId/workers                      Spawn worker
GET    /api/orgs/:orgId/projects/:projectId/workers/:workerId            Get worker
POST   /api/orgs/:orgId/projects/:projectId/workers/:workerId/stop       Stop worker
POST   /api/orgs/:orgId/projects/:projectId/workers/:workerId/start      Start worker
DELETE /api/orgs/:orgId/projects/:projectId/workers/:workerId            Destroy worker
GET    /api/orgs/:orgId/projects/:projectId/workers/:workerId/logs       Docker logs
GET    /api/orgs/:orgId/projects/:projectId/workers/:workerId/stats      CPU + memory
GET    /api/orgs/:orgId/projects/:projectId/workers/:workerId/git-status Git status
GET    /api/orgs/:orgId/projects/:projectId/workers/:workerId/ports      Listening ports
POST   /api/orgs/:orgId/projects/:projectId/workers/:workerId/ssh-token  Generate SSH token

GET    /api/orgs/:orgId/nodes                     List nodes
POST   /api/orgs/:orgId/nodes                     Register node
GET    /api/orgs/:orgId/nodes/:nodeId             Get node
DELETE /api/orgs/:orgId/nodes/:nodeId             Delete node
POST   /api/orgs/:orgId/nodes/:nodeId/token       Rotate token
POST   /api/orgs/:orgId/nodes/:nodeId/drain       Drain node
GET    /api/orgs/:orgId/nodes/:nodeId/inventory   Live container inventory

GET    /api/orgs/:orgId/deployments                              List deployments
POST   /api/orgs/:orgId/deployments                              Create deployment
GET    /api/orgs/:orgId/deployments/:deploymentId                Get deployment
PATCH  /api/orgs/:orgId/deployments/:deploymentId                Update deployment
DELETE /api/orgs/:orgId/deployments/:deploymentId                Delete deployment
POST   /api/orgs/:orgId/deployments/:deploymentId/start          Start all services
POST   /api/orgs/:orgId/deployments/:deploymentId/stop           Stop all services
POST   /api/orgs/:orgId/deployments/:deploymentId/deploy         Deploy all services

GET    /api/orgs/:orgId/deployments/:deploymentId/services                    List services
POST   /api/orgs/:orgId/deployments/:deploymentId/services                    Add service
PATCH  /api/orgs/:orgId/deployments/:deploymentId/services/:serviceId         Update service
DELETE /api/orgs/:orgId/deployments/:deploymentId/services/:serviceId         Remove service
POST   /api/orgs/:orgId/deployments/:deploymentId/services/:serviceId/start   Start
POST   /api/orgs/:orgId/deployments/:deploymentId/services/:serviceId/stop    Stop
POST   /api/orgs/:orgId/deployments/:deploymentId/services/:serviceId/deploy  Deploy
POST   /api/orgs/:orgId/deployments/:deploymentId/services/:serviceId/verify-domain  Verify domain
GET    /api/orgs/:orgId/deployments/:deploymentId/services/:serviceId/logs    Service logs

GET    /api/orgs/:orgId/api-keys           List keys
POST   /api/orgs/:orgId/api-keys           Create a key (token shown once)
DELETE /api/orgs/:orgId/api-keys/:keyId    Revoke a key

Session-only — an API key cannot be used to manage other API keys. See API Keys.

GET    /api/users/me            Get current user (dotfilesRepo)
PATCH  /api/users/me            Update user settings
GET    /api/users/me/secrets    List secret names
POST   /api/users/me/secrets    Create / replace secret
DELETE /api/users/me/secrets/:secretId  Delete secret

EndpointDescription
GET /api/workers/:id/terminal?mode=terminalBrowser PTY — interactive shell
GET /api/workers/:id/terminal?mode=logsDocker log stream
GET /api/agent/connect?token=Agent connection (node token)
GET /api/tunnel/relayProxy ↔ agent relay (internal)

Note

For the full interactive reference with request/response schemas and a built-in HTTP client, visit /api/docs.