Skip to main content
POST
/
workspaces
/
{workspaceId}
/
api-keys
Create a workspace API key
curl --request POST \
  --url https://api.example.com/workspaces/{workspaceId}/api-keys \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "agent-prod",
  "description": "Production key for autonomous portfolio research agent",
  "scopes": [
    "workspace_read",
    "system_strategies_read",
    "strategies_read",
    "strategies_write",
    "backtests_read",
    "backtests_write"
  ],
  "expiresAt": "2026-12-31T23:59:59.000Z"
}
'

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

workspaceId
string
required

Body

application/json
name
string
required
Maximum string length: 100
Example:

"agent-prod"

description
string
Maximum string length: 500
Example:

"Production key for autonomous portfolio research agent"

scopes
enum<string>[]
Available options:
workspace_read,
system_strategies_read,
strategies_read,
strategies_write,
backtests_read,
backtests_write
Example:
[
"workspace_read",
"system_strategies_read",
"strategies_read",
"strategies_write",
"backtests_read",
"backtests_write"
]
expiresAt
string<date-time>
Example:

"2026-12-31T23:59:59.000Z"

Response

201

API key created. Plaintext apiKey is returned once.