Skip to main content
POST
Create an API key

Authorizations

Authorization
string
header
required

WorkOS session token or RunTools API key (rt_live_* / rt_test_*). Used in Authorization: Bearer <token> header.

Body

application/json
name
string
required
scopes
enum<string>[]

Empty defaults to ['*'].

Available options:
sandbox:create,
sandbox:read,
sandbox:write,
sandbox:*,
agent:run,
agent:read,
agent:write,
agent:*,
files:read,
files:write,
files:*,
org:read,
org:write,
org:members,
org:*,
admin:resources,
admin:*,
*
expiresIn
string

Duration string like 30d, 90d, 1y.

isTest
boolean
default:false
projectId
string<uuid> | null

Response

201 - application/json

Created.

data
object
message
string
Example:

"Store this key securely. You will not be able to see it again."