Skip to main content

Authentication

All /v1 endpoints require an API key. Keys are scoped — you only grant the permissions your integration needs.

API key format

All NextNeural API keys start with nn_k_:

nn_k_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Pass it as a Bearer token in every request:

Authorization: Bearer nn_k_your_key_here

Creating an API key

  1. Go to Settings → API Keys in the dashboard
  2. Click New API Key and give it a name
  3. Select the scopes you need (see table below)
  4. Copy the key — it is shown only once

Scopes

ScopeWhat it allows
voice:calls:readList calls, get transcripts, call stats
voice:calls:writeTrigger calls, end calls, write call metadata
voice:campaigns:readList campaigns and their metrics
voice:campaigns:writeLaunch, stop, and manage campaigns
voice:contacts:readList and search contacts
voice:contacts:writeCreate, update, delete, and bulk-import contacts
voice:webhooks:readList webhooks and delivery logs
voice:webhooks:writeRegister and delete webhooks

Assign only the scopes your application requires. A key missing a required scope receives 403 Forbidden.

Error responses

StatusMeaning
401 UnauthorizedKey is missing, malformed, or revoked
403 ForbiddenKey is valid but lacks the required scope
{ "detail": "Invalid or expired token" }
{ "detail": "Insufficient permissions. Required scopes: voice:calls:write" }

WebSocket authentication

WebSocket endpoints accept the token as a query parameter:

wss://api.nextneural.ai/ws/live/{call_uuid}?token=nn_k_your_key_here