C
Docs
Docs/api/API Authentication

API Authentication

Authenticate to the Celavii REST API with Bearer tokens (cvii_live_*). Token formats, scope groups, key generation flow, error responses.

Authenticate to the Celavii External API v1 with Bearer tokens. External API access requires a Starter plan or higher AND a payment method on file.

Keep your API keys secure

Never expose your API keys in client-side code or public repositories. Use environment variables for secure storage.

Getting Your API Key

  1. Navigate to Settings → API in your dashboard
  2. Request API access (requires Starter plan or higher)
  3. Once approved, generate your API key (cvii_live_*)
  4. Copy and store your key securely — it's only shown once

Using Your API Key

Include your API key in the Authorization header:

Authorization: Bearer cvii_live_YOUR_KEY

Example Request

curl -X GET "https://www.celavii.com/api/v1/me" \
  -H "Authorization: Bearer cvii_live_YOUR_KEY" \
  -H "Content-Type: application/json"

Key Formats

FormatUse
cvii_live_*Production keys — accepted by all endpoints
cvii_test_*Sandbox keys — rejected at the auth gate (not yet supported)

Scope Groups

New API keys default to: profiles:read, profiles:affinities, profiles:posts, profiles:network, campaigns:read, lists:read, analytics:read, manage:read, knowledge:read. Write, trigger, and contact scopes must be explicitly requested.

Two convenient groupings:

  • read_all — All read scopes (excludes write, trigger, and contact)
  • full_access — All 16 individual scopes

Error Responses

StatusDescription
401Missing or invalid API key
403API key doesn't have required permissions
429Rate limit exceeded

Related