Skip to main content
GET
Retrieve an existing API key by ID

Authorizations

Authorization
string
header
required

Personal API key sent as a bearer token.

Query Parameters

configId
string

The configuration ID to use for the API key lookup. If not provided, the default configuration will be used.

id
string

The id of the Api Key

Response

API key retrieved successfully

id
string
required

ID

userId
string
required

The owner of the user id

enabled
boolean
default:true
required

Sets if key is enabled or disabled

rateLimitEnabled
boolean
required

Whether the key has rate limiting enabled

requestCount
number
required

The number of requests made within the rate limit time window

createdAt
string<date-time>
required

created at

updatedAt
string<date-time>
required

updated at

name
string | null

The name of the key

start
string | null

Shows the first few characters of the API key, including the prefix. This allows you to show those few characters in the UI to make it easier for users to identify the API key.

prefix
string | null

The API Key prefix. Stored as plain text.

refillInterval
number | null

The interval in milliseconds between refills of the remaining count. Example: 3600000 // refill every hour (3600000ms = 1h)

refillAmount
number | null

The amount to refill

lastRefillAt
string<date-time> | null

The last refill date

rateLimitTimeWindow
number | null

The duration in milliseconds

rateLimitMax
number | null

Maximum amount of requests allowed within a window

remaining
number | null

Remaining requests (every time api key is used this should updated and should be updated on refill as well)

lastRequest
string<date-time> | null

When last request occurred

expiresAt
string<date-time> | null

Expiry date of a key

metadata
object | null

Extra metadata about the apiKey

permissions
string | null

Permissions for the api key (stored as JSON string)