Create an API key
const url = 'https://api.global.stillbox.example/v1/api-keys';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","access":"read","actions":["example"],"sandbox_ids":["example"],"expires_at":"2026-04-15T12:00:00Z","service_user_id":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.global.stillbox.example/v1/api-keys \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "access": "read", "actions": [ "example" ], "sandbox_ids": [ "example" ], "expires_at": "2026-04-15T12:00:00Z", "service_user_id": "example" }'The key is in the response only; it can’t be shown again.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
What a key may do, never more than the role behind it allows. read: every read, no terminals. use: also
work in existing sandboxes (commands, terminals, files, checkpoints, schedules, the agent). create: also make
and remove sandboxes and their parts. full: everything, including organization settings. custom: only
actions.
For custom access, the operation IDs the key may call (see listKeyActions).
Limit the key to these sandboxes. Such a key can’t use organization-wide operations.
When the key stops working.
Make the key for a service user instead of yourself (owners only).
Responses
Section titled “Responses”The new key
object
The whole key. Store it now; it is never shown again.
Example generated
{ "id": "example", "name": "example", "key": "example"}The request is invalid
object
Example
{ "code": "not_found"}The API key is missing or invalid
object
Example
{ "code": "not_found"}