Skip to content
Go to Boltz API

Create a workspace API key

$ boltz-api admin:api-keys create
POST/compute/v1/admin/api-keys

Create a workspace API key

ParametersExpand Collapse
--name: string

API key name

minLength1
maxLength255
--allowed-ip: optional array of string

IP addresses allowed to use this key (IPv4 or IPv6). An empty array (the default) means all IPs are allowed.

--expires-in-days: optional number

Days until the key expires. Omit for a key that does not expire.

minimum1
maximum365
--mode: optional "live" or "test"

Key mode. Test keys create test-mode resources with synthetic data.

--workspace-id: optional string

Workspace ID to scope this key to. Omit for default workspace.

ReturnsExpand Collapse
AdminAPIKeyNewResponse: object { key, key_details }
key: string

The full API key. This is only shown once — store it securely.

key_details: object { id, allowed_ips, created_at, 8 more }
id: string

API key ID

allowed_ips: array of string

IP addresses allowed to use this key. An empty array means all IPs are allowed.

created_at: string
formatdate-time
expires_at: string

When the key expires. Null if the key does not expire.

formatdate-time
is_active: boolean
key_prefix: string

First 12 characters of the key

key_type: "workspace"
last_used_at: string
formatdate-time
livemode: boolean

Whether this is a live API key (false for test keys).

name: string

API key name

workspace_id: string

Workspace this key is scoped to

Create a workspace API key

boltz-api admin:api-keys create \
  --name x
{
  "key": "key",
  "key_details": {
    "id": "id",
    "allowed_ips": [
      "string"
    ],
    "created_at": "2019-12-27T18:11:19.117Z",
    "expires_at": "2019-12-27T18:11:19.117Z",
    "is_active": true,
    "key_prefix": "key_prefix",
    "key_type": "workspace",
    "last_used_at": "2019-12-27T18:11:19.117Z",
    "livemode": true,
    "name": "name",
    "workspace_id": "workspace_id"
  }
}
Returns Examples
{
  "key": "key",
  "key_details": {
    "id": "id",
    "allowed_ips": [
      "string"
    ],
    "created_at": "2019-12-27T18:11:19.117Z",
    "expires_at": "2019-12-27T18:11:19.117Z",
    "is_active": true,
    "key_prefix": "key_prefix",
    "key_type": "workspace",
    "last_used_at": "2019-12-27T18:11:19.117Z",
    "livemode": true,
    "name": "name",
    "workspace_id": "workspace_id"
  }
}