Authentication
Secret keys, publishable keys, scopes and session tokens for the front end.
The API uses three types of credential. Each one has its proper place.
| Credential | Format | Where to use it | What it does |
|---|---|---|---|
| Secret key | nvx_sk_live_... / nvx_sk_test_... | Only on your server | Full access, according to its scopes |
| Publishable key | nvx_pk_live_... / nvx_pk_test_... | Website and app (front end) | Loads the widget and sends tracking events. Does not read data. |
| Session token | nvx_st_... | Website and app (front end), generated by your server | Identifies a logged-in user in the widget, for up to 1 hour |
Secret keys
Send it in the Authorization header:
curl https://api.nevox.ai/v1/agents \
-H "Authorization: Bearer nvx_sk_live_..."Management
- Only the account owner can generate keys, in Dashboard → Developers → API keys.
- The key is shown only once. Nevox stores only an encrypted version (hash). If you lose it, generate another one.
- You can have several keys (one per system) and revoke any of them instantly. Revocation takes effect within 1 minute.
- The dashboard shows when each key was last used and the call log, including errors.
- If a key shows up in a public repository, revoke it and generate a new one immediately.
Scopes
Give each key only what it needs. Scopes for features that haven't shipped yet can be checked now: they take effect when the feature ships.
| Scope | Allows |
|---|---|
agents:read | List and view agents |
conversations:read | Read conversations and messages |
conversations:write | Open conversations, send messages, hand off to a human, close |
contacts:read / contacts:write | Read / create, update and delete contacts |
knowledge:read | Read knowledge and use /ask |
knowledge:write | Create, update and delete knowledge and the service list |
learning:write | Correct answers and approve learning suggestions |
actions:write | Create and change actions |
webhooks:write | Create and change webhooks |
analytics:read | Read metrics, funnel, visitors and contact timelines |
events:write | Send tracking events from the server |
sessions:write | Generate session tokens for the widget |
forms:read | Read the forms sent on the sites |
A call without the required scope gets a 403 with the code insufficient_scope.
Publishable keys
The publishable key identifies your account on the front end. It can only:
- load the agent widget;
- send visitor tracking events (
/v1/collect).
It does not read conversations, contacts or metrics. Even so, you set which domains can use it in Dashboard → Developers → Widget in your app. Requests from other domains are rejected with 403 origin_not_allowed. There is one publishable key per environment; generating a new one disables the previous one immediately.
Session token
When the user is already logged in to your system, your server generates a session token and hands it to the front end. That way the widget knows who the person is without exposing the secret key.
curl https://api.nevox.ai/v1/widget/sessions \
-H "Authorization: Bearer $NEVOX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"agent_id": "agt_8f2k1x",
"contact": {
"external_id": "patient_1042",
"name": "Mary Smith",
"email": "mary@example.com",
"language": "en-US"
}
}'{
"token": "nvx_st_9c1e...",
"expires_at": "2026-11-03T15:30:00Z",
"contact_id": "ctc_4hq81"
}The token is valid for 1 hour and only for that contact and that agent. Generate a new one on every login or when it expires. See how to use it in the widget.
Environments
Test (_test_) | Production (_live_) | |
|---|---|---|
| Agent answers | Real, using current knowledge | Real |
| Sending via WhatsApp, SMS, email | Never | According to channel settings |
| Actions in your system | Called, with the Nevox-Environment: test header | Called normally |
| Webhooks | Sent only to test endpoints | Sent to production endpoints |
| Plan allowance | Doesn't count | Counts |
| Limit | 20 requests per minute | According to the plan |