Skip to content

Get all API keys (Admin/Business)

Request

Admin: returns all integration keys for the tenant, optionally filtered by type. Business: returns only keys scoped to their own business entity. Use pagination parameters (page & limit) for optimal performance.

Security
authJWT or projectKey
Query
typestring

Optional filter by integration API key type (database-stored tokens that can be revoked)

Enum:"TENANT_SYSTEM_JWT""BUSINESS_SYSTEM_JWT"
includeRevokedboolean

Include revoked API keys in results (default: false)

pagenumber

Page number for pagination (1-based)

limitnumber

Items per page for pagination

curl -i -X GET \
  'https://docs.pers.ninja/_mock/swagger/api-keys?type=TENANT_SYSTEM_JWT&includeRevoked=true&page=0&limit=0' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Successfully retrieved tenant API keys

Bodyapplication/json
Array [
idstringrequired

Unique identifier for the API key

Example:"f47ac10b-58cc-4372-a567-0e02b2c3d479"
typestringrequired

Type of API key

Enum:"TENANT_SYSTEM_JWT""ADMIN_JWT_ACCESS_TOKEN""ADMIN_JWT_REFRESH_TOKEN""USER_JWT_ACCESS_TOKEN""USER_JWT_REFRESH_TOKEN""BUSINESS_JWT_ACCESS_TOKEN""BUSINESS_JWT_REFRESH_TOKEN""BUSINESS_SYSTEM_JWT""BLOCKCHAIN_WRITER_JWT""BLOCKCHAIN_READER_JWT"
Example:"TENANT_SYSTEM_JWT"
nameobject or null

Human-readable name for the API key

Example:"JWT Token (Mainnet) - 2025-11-22"
createdAtstring, (date-time)required

Creation timestamp

Example:"2025-11-22T10:30:00.000Z"
shortenedPrivateKeystring, <= 20 charactersrequired

Token preview for dashboard identification (first 8 + last 4 characters)

Example:"eyJhbGci...xMjM"
expiresAtobject or null

Expiration timestamp (null = no expiry)

Example:"2026-11-22T10:30:00.000Z"
isRevokedbooleanrequired

Indicates if the API key has been revoked

Example:false
lastUsedAtobject or null

Last time the API key was used for authentication

Example:"2025-11-24T14:30:00.000Z"
entityIdobject or null

Entity ID this key is scoped to (e.g. businessId for BUSINESS_SYSTEM_JWT)

Example:"biz_abc123"
]
Response
[ { "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479", "type": "TENANT_SYSTEM_JWT", "name": "JWT Token (Mainnet) - 2025-11-22", "createdAt": "2025-11-22T10:30:00.000Z", "shortenedPrivateKey": "eyJhbGci...xMjM", "expiresAt": "2026-11-22T10:30:00.000Z", "isRevoked": false, "lastUsedAt": "2025-11-24T14:30:00.000Z", "entityId": "biz_abc123" } ]