Authorization: Bearer. Its permissions decide which operations
work. Set apiUrl for a self-hosted Daytona, and organizationId when a
key reaches more than one organization.
- Three APIs, one key. The main API manages sandboxes, snapshots,
volumes, registries, secrets and organizations.
toolbox.*operations run inside one sandbox (files, processes and sessions, git, LSP, the code interpreter, computer use): the plugin asks the API for the sandbox’s toolbox proxy URL and calls<proxy>/<sandbox id>.analytics.*reads telemetry and usage from the Analytics API thatGET /confignames. - Money. Sandboxes are billed per second for the vCPU, memory and disk
they reserve (a stopped one for its disk). Creating, starting, forking,
resizing or recovering one, running commands or code in it, snapshots,
volumes and warm pools are
destructive, as are git pushes, key and credential rotation and every delete. - Organization routes take the key’s own organization id
(
apiKeys.getCurrentreturns it asorganizationId); another id answers403 Invalid authentication context. - Daytona Cloud gaps (checked live on v0.235.0):
runners.list,runners.create,organizations.createRegionand thewarmPools.*routes answer 404 there and work only on a self-hosted Daytona that has them;apiKeys.listandapiKeys.deleteanswer 403 until the organization allows managing keys with an API key; the main API’s sandbox telemetry (sandboxes.getLogs,getMetrics,getTraces,getTraceSpans) answers 403 because Cloud serves it fromanalytics.telemetry.*. - Webhooks go out through Svix. Open the endpoint portal with
webhooks.getAppPortalAccess, add an endpoint, and store itswhsec_signing secret as the webhook secret; the plugin checks the Svix signature of every delivery. - Rate limits depend on the organization’s tier. A 429 carries
Retry-Afterand core retries it three times; a 5xx is retried for reads only. - Not wrapped: routes that answer 401 to every API key and take only the
dashboard’s user sign-in (listing, creating and deleting organizations,
invitations, roles, identity providers and SSO, member access changes,
the
users/meroutes), routes Daytona’s own runners, proxy, SSH gateway, OTEL collector and dashboard call, the PTY WebSocket, the code interpreter’s WebSocket execute (toolbox.process.codeRunruns code over HTTP), bulk file upload and download (multipart batches; upload and download one file at a time), the toolbox daemon’s own setup routes, and deprecated routes.
- 212 typed API operations
- 7 incoming webhook event types
Setup
1
Install
2
Add the plugin
corsair.ts
multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.3
Choose authentication
- API Key (Recommended)
Store the Daytona API key before the first call: More: API Key
pnpm corsair setup --plugin=daytona --tenant=acme api_key=<your-key> (leave out --tenant without multiTenancy), or pass it as key in the plugin options. With Hub, each tenant enters their own key on the connect page. See API key auth.4
Connect a tenant
Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see Connect / OAuth.
Example API calls
List sandboxesWebhooks
This plugin registers 7 webhook event types. Configure the provider to POST to your Corsair HTTP handler, then usewebhookHooks on the plugin factory.
See Webhooks for every event path and payload shape, and Webhooks concept for routing.
What’s next
API reference
Every
daytona.api.* operation with input and output types.Webhooks
Event paths, payloads, and
webhookHooks examples.Connect / OAuth
createLink, Hub delivery, and tenant connect flows.
Use with agents
Expose this plugin’s operations as MCP tools.