ReaktlyDocs
API Reference

Authentication

API key authentication, scopes, and security best practices.

API keys

All REST endpoints authenticate with an API key in the x-api-key header:

curl https://api.reaktly.com/ingest \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{ ... }'

Keys are created in the dashboard under Settings → API keys. The secret is shown once at creation — store it in your secret manager or environment, never in code. The dashboard keeps a prefix (e.g. rk_live_abc…) so you can tell keys apart later.

API keys are not operator keys. The op_… operator key in your website's widget snippet is public by design — it ships in page source and is protected by your allowed domains. API keys are secrets and belong on a server.

Scopes

A key can only do what its scopes allow — grant the minimum you need:

ScopeDashboard labelGrants
iq:importIQ ImportPush data into a knowledge base (Ingestion API)
iq:readIQ ReadRead knowledge base data
usage:readUsage ReadRead usage statistics and analytics
articles:read—Read published articles (Articles API); provisioned by Reaktly

An endpoint returns 403 when the key is valid but lacks the required scope.

Rotating a key

  1. Create the replacement key with the same scopes.
  2. Deploy the new value to your integration.
  3. Verify traffic, then deactivate the old key in the dashboard.

Keys can carry an expiry date; set one for keys used by contractors or temporary migrations.

Security best practices

  • Store keys in environment variables or a secret manager — never in code, git, or client-side JavaScript.
  • One key per integration — a leaked key then has a small blast radius and a clear owner.
  • Use the minimum scopes — an ingestion key does not need usage:read.
  • Set expiration dates where possible, and rotate on a schedule.
  • Never put an API key in a website — browsers and mobile apps cannot keep secrets. The widget uses the public operator key instead.

Errors

StatusMeaningWhat to do
401Missing or invalid API keyCheck the header name (x-api-key) and that the key is active
403Valid key, insufficient scope or no access to the resourceGrant the scope, or check that the resource belongs to your tenant
429Rate limitedBack off and retry (Error handling)

On this page