Sandboxes
A sandbox is what an application sends to. The API can list the ones you have, and mint one per pipeline run that cleans up after itself.
List sandboxes
GET /api/v1/sandboxes Scope: sandboxes:read Response: [ { "id": "k3n8x2p9qa7c1m4z", "name": "Acme — staging", "color": "#6366f1", "forward_email": "k3n8x2p9qa7c1m4z@mailclutch.com", "ephemeral": false, "expires_at": null, "created_at": "2026-08-03T09:14:22.000000Z", "url": "https://app.mailclutch.com/studio-nord/acme-staging", "organization": { "id": "b7t4m1w0zc9k2r5e", "name": "Studio Nord" } } ]
Every sandbox the token reaches — all of the organization's, or the ones it is bound to. The listing never carries SMTP credentials; read one sandbox for those.
Read one sandbox
GET /api/v1/sandboxes/{sandbox_id} Scope: sandboxes:read Response: the sandbox above, plus { "smtp": { "host": "smtp.mailclutch.com", "port": 587, "username": "mc_7f3k...", "password": "…", "encryption": "starttls" } }
The SMTP pair is what an application configures to send into this sandbox. Treat the response as a secret. forward_email is the other way in: mail sent or forwarded to that address lands in the sandbox like any other capture.
Create a sandbox
POST /api/v1/sandboxes Scope: sandboxes:create Idempotency-Key: <recommended> { "name": "pr-482", "ttl": "30m" } Response: 201, the sandbox with its smtp block and { "ephemeral": true, "expires_at": "2026-09-02T09:44:22.000000Z" }
| Field | Accepts |
|---|---|
name | Required. Up to 60 characters |
ttl | Optional. A duration: 90s, 30m, 2h, 1d. Clamped to between 1 minute and 24 hours |
Permanent or ephemeral
Without a ttl the sandbox is permanent and counts against the plan's sandbox quota, exactly as one created in the app. When the quota is full the call answers 422 and says so.
With a ttl the sandbox is ephemeral: the unit of a pipeline. One per pull request, per branch, per matrix cell. It is outside the sandbox quota on purpose — the first team to adopt CI would otherwise hit the limit on day one — and bounded instead by how many can be alive at once: 50 per organization. At expires_at the sandbox and everything in it are deleted for good, and it disappears from every open browser tab. A runner that dies mid-run leaves nothing behind. How a test suite uses one is in the CI / Assertion guide.
Send an Idempotency-Key: a retried create must not mint a second sandbox. See Conventions.
A token bound to specific sandboxes cannot create one — the result would be outside its own reach — and answers 403.
Delete a sandbox
DELETE /api/v1/sandboxes/{sandbox_id} Scope: sandboxes:delete Response: { "deleted": true }
A permanent sandbox goes to the trash, as it does from the app. An ephemeral one is purged outright. Either way the sandbox disappears from every open browser tab and any share link into it dies immediately.