Create and use Account and Workspace API keys to connect VIVI to your own apps, scripts, and automations.
API keys let your own applications, scripts, and automations call the VIVI API securely, without a person having to log in. In the portal they’re called API Credentials, and they come in two types: Account API keys and Workspace API keys.This guide explains the difference between them, when to use each, and exactly how to create and use one.
API keys are not the same as the vivi-api-key header. The vivi-api-key is generated by an API channel and is used to send messages to one specific agent. The API keys on this page authenticate you to the VIVI platform API (managing agents, workspaces, knowledge bases, and more) and use an Authorization: Bearer token instead. If you only want to chat with a single agent, use an API channel.
Both kinds of keys work the same way technically. The difference is how much they can access.
Account API key
Acts as an account administrator with access to every workspace in your account. Best for organization-wide automation and managing multiple workspaces from one place.
Workspace API key
Limited to one workspace and to a role you choose (for example, Content Manager). Best for integrations tied to a single team, client, or project.
Account API key
Workspace API key
Access scope
The entire account (all workspaces)
A single workspace
Permissions
Full account admin
A workspace role you select (e.g. Workspace Admin, Content Manager, Chat User)
Rule of thumb: start with a Workspace API key and the narrowest role that does the job. Only reach for an Account API key when an integration genuinely needs to act across multiple workspaces. Smaller scope means less risk if a key is ever exposed.
A VIVI API key isn’t a single password you paste into one field. It’s a set of credentials your app exchanges for a temporary access token. When you create one, VIVI gives you four values to copy:
Account API key: go to Manage Account and open the API Credentials tab.
Workspace API key: open your workspace, go to Users, and open the API Credentials tab.
2
Create a new credential
Click Create and give it a clear name that explains what will use it (for example, Zapier integration or Nightly report job). For a Workspace key, also pick the role it should have.
3
Copy your four values immediately
VIVI shows your clientId, clientSecret, audience, and tokenUrl once, each with a copy button. The dialog also includes a ready-to-run curl example and a link to the API reference. Save the values in your secrets manager now.
The clientSecret is shown only once. After you close this dialog you’ll only ever see the last 4 characters. If you lose it, you’ll need to rotate the key (see below).
4
Start using it
Use the values to request a token and call the API, as shown in the next section.
API keys are available on eligible plans (such as Pro or Enterprise) and can only be created by a human administrator. If you don’t see the API Credentials tab, check your subscription or ask your account admin.
Never send your clientSecret to VIVI API endpoints. It’s used only at the tokenUrl to request an access token.
Acting on behalf of a user (optional). With an Account API key, you can add an X-User-Id: <user-id> header so new records are attributed to that specific VIVI user. This affects ownership only and never grants extra permissions.
API keys don’t have their own separate permissions. They inherit them from the role described in the comparison above: an Account API key acts as an account admin, while a Workspace API key uses the role you assigned it (which you can change later).For details on the available roles, see Users.
All of these actions live on the same API Credentials tab where you created the key.
Rotate the secret
Generates a new clientSecret (shown once) and retires the old one. Use it if a secret may have leaked, or on a regular schedule. Tokens already issued stay valid until they expire (~24 hours), so update your app promptly.
Deactivate the key
Permanently disables the key. Any app using it will start receiving 401 Unauthorized errors. Use this when an integration is retired or a key is compromised.
Change the role
For Workspace API keys, you can assign a different workspace role after creation. Account API keys are always account admin and can’t change roles.
Identify a key
Each key shows the last 4 characters of its secret. Use this to tell which key is installed in which external system.
Common causes: the token has expired (request a new one), the Authorization header isn’t formatted as Bearer <token>, or the key was deactivated. Request a fresh token and try again. (Rotating a secret doesn’t invalidate tokens that were already issued, so it won’t cause this on its own.)
I get 403 Forbidden
The key authenticated successfully but doesn’t have permission for that resource. A Workspace API key can only act inside its own workspace and within its assigned role. If you need broader access, raise the workspace role or use an Account API key.
My token request fails (invalid_client / invalid_request)
Check that you’re posting to the correct tokenUrl with Content-Type: application/json, and that clientId, clientSecret, and audience are copied exactly as shown in the portal (no extra spaces). The grant_type must be client_credentials. If the secret was lost, rotate the key to get a new one.
I closed the dialog and lost my client secret
Secrets can’t be recovered. VIVI only stores the last 4 characters. Open the API Credentials tab, rotate the key, and copy the new secret immediately.
I don't see the API Credentials tab
API keys require an eligible plan (such as Pro or Enterprise) and administrator permissions. For account keys you must be an Account Admin; for workspace keys, an Account Admin or that workspace’s admin. Confirm your subscription, or ask an account admin to create the key for you.
Should I use vivi-api-key instead?
Only for an API channel, which sends messages to a single agent. For everything else on the main VIVI API, use the API keys on this page with an Authorization: Bearer token.