Skip to main content

Authentication & API keys

Every request carries an API key in the X-API-Key header. Keys are tenant-scoped and minted in the admin console. Keys with admin capabilities stay on your backend. A key with an empty capability set is the one kind meant for clients (together with an OIDC ID token). Never ship an admin-capability key or the HMAC signing secret to a browser, SPA or mobile bundle.

X-API-Key: ek_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

This is distinct from identity signing: the API key authenticates your backend (what it may do), while the identity assertion vouches for the reader acting (who is acting). Most acting writes need both.

Minting a key​

In the console: API Keys, then fill in the inline form (Label, Expires (optional), Capabilities) and click Create Key. The label is required, capabilities may be empty. The raw ek_… value (ek_ plus 64 hex characters) is returned once — store it securely; only a prefix is shown afterwards.

You can also mint programmatically with POST /api/v1/keys, using an existing key that has the manage_api_keys capability. See the API Reference.

Capabilities (scoping)​

A key holds a flat set of capabilities — least-privilege rather than all-or-nothing. A moderation bot can hold only moderate_content; a settings tool only manage_settings.

CapabilityAllows
moderate_contentModeration actions on comments
ban_usersBanning users
anonymize_usersAnonymizing users
moderate_discussionModerating discussions
manage_api_keysCreating and revoking API keys
manage_webhooksWebhook CRUD
manage_settingsTenant settings and identity configuration
view_analyticsAnalytics
export_user_dataUser data export

A key cannot grant a capability its creator lacks. The request fails with 403 CAPABILITY_ESCALATION.

Capabilities gate admin-style routes (settings, moderation actions, webhook CRUD, key management, analytics). The publisher surface — posting comments, reacting, reading — is not capability-gated: any authenticated key may call those, including a key with an empty capability set. So a least-privilege key minted purely for posting comments still works. The admin user reads (GET /api/v1/users and GET /api/v1/users/id/{userId}) are the exception: they need a key with an admin capability.

Expiry​

A key may carry an optional expiresAt. After it lapses the key is rejected and no longer counts against your active-key budget. A tenant can have 2 active keys by default, and a third returns 409. Rotation today is manual. With a free slot, mint a new key, cut over, then revoke the old one. If you are at the limit (for example one backend key and one client key), revoke a live key first, which leaves a short gap. Or ask the RSMG Engage team to raise your limit.

Key handling​

  • Treat keys that have capabilities as secrets: backend only, never in client code. An empty-capability key is meant for clients (with OIDC). It still goes in X-API-Key. If it leaks, rotate it.
  • A key only works on its own tenant's host. On any other tenant it returns 401.
  • Browser origins must be allowlisted. Ask the RSMG Engage team to add yours. Native apps are unaffected.
  • Use a separate key per integration so you can revoke one without disrupting the others. The default limit is 2 active keys. For more, ask the RSMG Engage team to raise it.
  • Revoke with the Revoke button in the console, or DELETE /api/v1/keys/{keyId}.

Admin vs API-key paths​

Many endpoints accept either an API key or an admin-console JWT (dual-auth). Your backend integration uses the API-key path. The admin JWT is what the console UI uses; you won't issue those from your backend.