Skip to content

API Key Introspection

The introspection endpoint allows API key holders to inspect their own key metadata, including scopes and expiration.

Authentication

This endpoint requires a customer API key with the keys:read scope:

http
x-releasy-api-key: <api-key>

Introspect API Key

POST /v1/auth/introspect

Returns information about the authenticated API key.

Response body:

json
{
  "active": true,
  "api_key_id": "<uuid>",
  "customer_id": "<uuid>",
  "key_type": "human",
  "scopes": [
    "releases:read",
    "downloads:read",
    "keys:read"
  ],
  "expires_at": null
}
FieldTypeDescription
activebooleanAlways true for valid keys
api_key_idstringUUID of the API key
customer_idstringUUID of the customer
key_typestringKey type: human, ci, or integration
scopesarrayList of granted scopes
expires_atinteger or nullUnix timestamp of expiration, or null if no expiration

Example:

bash
curl -X POST "http://localhost:8080/v1/auth/introspect" \
  -H "x-releasy-api-key: releasy_abc123..."

Error Responses

StatusCause
401 UnauthorizedMissing or invalid API key
403 ForbiddenAPI key lacks keys:read scope