Create invite token
Generate a secure invite link to grant team members access to your profiles. Invites expire after 7 days and are single-use.
API key authentication - use your Zernio API key as a Bearer token
In: header
'all' grants access to all profiles, 'profiles' restricts to specific profiles
"all" | "profiles"Required if scope is 'profiles'. Array of profile IDs to grant access to.
Org role granted to the invitee. Defaults to 'member'. 'viewer' creates a read-only member who can view everything in their profile scope but cannot perform any content mutation (publish, edit, delete, connect accounts).
"member""member" | "billing_admin" | "viewer"Deprecated. Use role 'viewer' instead. When true, the invite is created with role 'viewer'. Cannot be combined with role 'billing_admin'.
Response Body
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.invites.createInviteToken({ body: { scope: 'all', },});console.log(data);{
"token": "inv_abc123def456ghi789",
"scope": "profiles",
"invitedProfileIds": [
"64f0a1b2c3d4e5f6a7b8c9d0",
"64f0a1b2c3d4e5f6a7b8c9d1"
],
"expiresAt": "2024-11-08T10:30:00Z",
"inviteUrl": "https://zernio.com/invite/inv_abc123def456ghi789"
}{
"error": "Unauthorized"
}Get user GET
Returns a single user's details by ID, including name, email, and role.
Get plan and usage stats GET
Returns the current plan name, billing period, plan limits, and usage counts. The response shape depends on the account's `billingSystem`: * Stripe users: per-period `usage.uploads` / `usage.profiles` counters. * Metronome (usage-based) users: `usage.connectedAccounts`, `usage.xApiCallsByOperation` (per-operation X API call counts — resolve keys via `GET /v1/billing/x-pricing`), plus a `spend` block with `currentPeriodCents`, `xSpendCents`, and `xSpendLimitCents`. The legacy `usage.xApiCalls` 3-tier aggregate is still emitted for back-compat but excludes the $0.200 URL tier and any future tiers — new clients should consume `xApiCallsByOperation` only.