Skip to main content
Use Boat through Corsair: one client, typed API calls, and incoming webhooks. Create an API key with boat api-key create <name> or in the Boat dashboard. Keys start with boat_ (older box_ keys still work). Things to know before you write:
  • Which key. An organization key works on the organization’s sandboxes, environments, snapshots, limits and usage. Account settings (webhooks, API keys, credential profiles, CI, telemetry, AI proxy, secrets, repositories, caller address, data retention) answer 403 api_key_org_forbidden to it: use a personal account key there. A scoped key (apiKeys.createScoped) can be limited to some sandboxes, environments or actions.
  • Sandboxes bill while they run. sandboxes.create, fork, resume and recover start a machine that bills until it stops (ttlSeconds, default one hour; null turns auto-stop off), so they are destructive. sandboxes.stop saves the disk and stops billing; a stopped sandbox reads as archived. Send idempotencyKey with create and fork to make a retry safe. A full start window answers 429 rate_limited and is not retried: account.getLimits shows canStart and what is left.
  • Commands and files go to the sandbox machine. sandboxes.commands.run waits for the command (30 s by default, up to 600 s); start long jobs with detached: true, then read commands.getStatus or commands.attach. A call right after a start can answer 409 sandbox_starting: retry after a few seconds. File reads stop at 5 MiB (413); use files.createDownloadUrl for bigger files.
  • Integrated agents (sandboxes.agent.*) run Codex, Claude Code, pi, OpenCode and other harnesses inside the sandbox with the model key or subscription connected on the dashboard, so a prompt spends that account’s model usage. With no harness set up at all, prompts answer 409 provider_not_configured; a prompt to a provider that has no key is accepted and the run fails in the harness (agent.getPrompt shows failed).
  • Snapshots. Every stop leaves a snapshot (snapshots.*, sandboxes.snapshots.*); a fork or resume starts from it. Saved snapshots (savedSnapshots.*, with share codes) need a paid plan: the free trial answers 403. A command in the first seconds after a fork or resume can answer 502 sandbox_restoring (it did not run): retry after 1-3 s.
  • Deletes of sandboxes and snapshots take the id a second time as confirm, Boat’s guard against deleting the wrong one.
  • Webhooks. Boat posts sandbox lifecycle events (sandbox.ready, hydrated, error, archived, degraded, recovered) to endpoints made with webhooks.create, signed with HMAC-SHA256 (X-Ascii-Signature). The plugin checks the signature with the endpoint’s whsec_ secret.
What you get:
  • 125 typed API operations
  • 6 incoming webhook event types

Setup

1

Install

2

Add the plugin

corsair.ts
With multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.
3

Choose authentication

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 sandboxes
Run a command in a sandbox
See the full list on the API page.

Webhooks

This plugin registers 6 webhook event types. Configure the provider to POST to your Corsair HTTP handler, then use webhookHooks on the plugin factory. See Webhooks for every event path and payload shape, and Webhooks concept for routing.

What’s next

API reference

Every boat.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.