POST
Create an API key

Authorizations

Authorization
string
header
required

A dashboard session token (EdDSA JWT issued by app.compute.anonalabs.com). API keys are refused.

Body

application/json
name
string
required
Required string length: 1 - 64
preset
enum<string>
required

read_only: sandboxes:read, templates:read, usage:read. use_existing: sandboxes:read, sandboxes:use. create_and_use: sandboxes:read, use, create, delete; templates:read. full_access: sandboxes:, templates:, usage:read, billing:read. custom: the scopes you list.

Available options:
read_only,
use_existing,
create_and_use,
full_access,
custom
scopes
enum<string>[]

Only with preset custom.

Available options:
sandboxes:read,
sandboxes:use,
sandboxes:create,
sandboxes:delete,
templates:read,
templates:write,
usage:read,
billing:read,
integrations:manage
sandboxIds
string[]

Limit the key to these sandbox IDs.

expiresInDays
enum<integer> | null

Omit or null for a key that never expires.

Available options:
7,
30,
90,
365

Response

The new key. key is the secret, shown only in this response.

apiKey
object
required
key
string
required

The secret. Store it now; it cannot be shown again.

Pattern: ^e2b_[0-9a-f]+$