Returns all sandboxes owned by the authenticated API key. Killed sandboxes are
hidden by default — pass ?state=all to include them. Results are wrapped in a
sandboxes array with a next_token pagination cursor.
Query Parameters
Maximum number of sandboxes to return. Capped at 1000.
Zero-based offset for pagination.
Pass "all" to include killed sandboxes in the results. Any other value (or
omission) filters them out.
Response
Array of Sandbox objects. May be empty.
Pagination cursor for the next page of results. Currently always null —
full pagination is coming in a future release.
Example
curl https://api.declaw.ai/sandboxes \
-H "X-API-Key: YOUR_API_KEY"
{
"sandboxes": [
{
"sandbox_id": "sbx-a1b2c3d4",
"template_id": "tpl-base",
"name": "base",
"state": "running",
"timeout": 300,
"started_at": "2024-01-15T10:30:00Z"
},
{
"sandbox_id": "sbx-e5f6g7h8",
"template_id": "tpl-base",
"name": "base",
"state": "paused",
"timeout": 0,
"started_at": "2024-01-15T09:00:00Z"
}
],
"next_token": null
}
Error Responses
| Status | Cause |
|---|
401 | Missing or invalid API key |
500 | Internal error listing sandboxes |