Skip to main content
GET
/
api
/
api-keys
Get all API keys for the current tenant
curl --request GET \
  --url https://api.example.com/api/api-keys \
  --header 'Authorization: <authorization>' \
  --header 'organization-id: <organization-id>'
[
  {
    "id": 1,
    "name": "My API Key",
    "token": "bc_1234...",
    "createdAt": "2024-01-01T00:00:00.000Z",
    "revoked": false,
    "expiresAt": "2024-12-31T23:59:59.000Z"
  }
]

Headers

Authorization
string
required

Value must be 'Bearer ' where is an API key prefixed with 'bc_' or a JWT token.

Example:

"Bearer bc_1234567890abcdef"

organization-id
string
required

Required if Authorization is a JWT token. The organization ID to operate within.

Response

200 - application/json

List of API keys

id
number
required

API key ID

Example:

1

name
string
required

API key name

Example:

"My API Key"

token
string
required

First 8 characters of the API key token

Example:

"bc_1234..."

createdAt
string<date-time>
required

Creation date

Example:

"2024-01-01T00:00:00.000Z"

revoked
boolean
required

Whether the key is revoked

Example:

false

expiresAt
string<date-time>

Expiration date

Example:

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