Skip to content

Get API key details

GET
/api/v1/api-keys/{keyId}
curl --request GET \
--url https://localhost:8080/api/v1/api-keys/example \
--header 'Authorization: <Authorization>'

Get details of one of the authenticated user’s API keys. JWT/session only — API keys cannot manage API keys

keyId
required
string

API Key ID

API key details

Media type application/json

An API key for service-to-service authentication; the secret itself is never returned here

object
allowedIps
Array<string>
createdAt
string format: date-time
createdBy
string
description
string
expiresAt
string format: date-time
id
string
keyId
string
lastUsedAt
string format: date-time
name
string
organizationId
integer
projectId
integer
revocationReason

Set via the revoke endpoint

string
revokedAt
string format: date-time
revokedBy
string
scopes
Array<string>
status
string
Allowed values: active expired revoked
usageCount
integer
userId

Resolved from the caller

string
Example
{
"status": "active"
}

Bad request - Key ID required

Media type application/json

Error body returned across the auth endpoints; the message is human-readable and not a stable identifier

object
error
string
error_description
string
Example
{
"error": "Unauthorized",
"error_description": "Invalid token"
}

Unauthorized - Authentication required

Media type application/json

Error body returned across the auth endpoints; the message is human-readable and not a stable identifier

object
error
string
error_description
string
Example
{
"error": "Unauthorized",
"error_description": "Invalid token"
}

Forbidden - API keys cannot manage API keys, or can only view own API keys

Media type application/json

Error body returned across the auth endpoints; the message is human-readable and not a stable identifier

object
error
string
error_description
string
Example
{
"error": "Unauthorized",
"error_description": "Invalid token"
}

API key not found

Media type application/json

Error body returned across the auth endpoints; the message is human-readable and not a stable identifier

object
error
string
error_description
string
Example
{
"error": "Unauthorized",
"error_description": "Invalid token"
}

Internal server error

Media type application/json

Error body returned across the auth endpoints; the message is human-readable and not a stable identifier

object
error
string
error_description
string
Example
{
"error": "Unauthorized",
"error_description": "Invalid token"
}