List keys
Returns API keys with a preview only, not the full key value. For a regular team member this is their own keys; for the team owner this is every team member's keys, each carrying a createdBy field.
Authorization
bearerAuth API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.
In: header
Response Body
application/json
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.apiKeys.listApiKeys();console.log(data);{ "apiKeys": [ { "id": "6507a1b2c3d4e5f6a7b8c9d0", "name": "Production API Key", "keyPreview": "sk_12345678...abcdef01", "expiresAt": "2025-12-31T23:59:59Z", "createdAt": "2024-01-15T10:30:00Z", "scope": "full", "profileIds": [], "permission": "read-write", "createdBy": { "id": "6507a1b2c3d4e5f6a7b8c9d0", "email": "owner@example.com" } }, { "id": "6507a1b2c3d4e5f6a7b8c9d1", "name": "Analytics Read-Only", "keyPreview": "sk_87654321...12345678", "expiresAt": null, "createdAt": "2024-03-20T14:45:00Z", "scope": "profiles", "profileIds": [ { "_id": "6507a1b2c3d4e5f6a7b8c9d0", "name": "Main Brand", "color": "#ffeda0" } ], "permission": "read", "createdBy": { "id": "6507a1b2c3d4e5f6a7b8c9d2", "email": "member@example.com" } } ]}Get ledger balances
Returns the balance of each bucket (for example accruing, owed, payable) for one ledger scope. A scope owned by another team returns an empty balances object. A profile-scoped key (or a member limited to some profiles) only reads `campaign` and `participant` scopes of campaigns under its profiles; any other scope returns an empty balances object.
Create key
Creates a new API key with an optional expiry. The full key value is only returned once in the response.