Skip to content
DhvaneeDocs
Dashboard
On this page

Authentication

Create, send, limit and revoke the API keys that identify your workspace on every public /v1 request.

Every request to /v1 carries a workspace API key. The key tells Dhvanee which workspace you are, and its scopes say what you may do there. Keys are made and revoked in the dashboard, never through the API.

The machine-readable contract is openapi.public.yaml. Download it for clients and codegen. This site has no live Try-it console.

Key kinds

PropertySecret keyPublishable key
Starts withdhvanee_live_dhvanee_pub_
Scopes allowedAny scope, including every write scope and copilot:use.Read scopes only: every *:read scope. No write scopes and no copilot:use.
Where it belongsYour servers, scripts and the local MCP. Never in a browser or mobile app.Places where the key is visible to the people using it, such as a partner or mobile app that only reads.
After you create itShown once. Dhvanee keeps only a one-way hash, so a lost key cannot be recovered; make a new one.Stays visible in Settings → Developer access → API Keys → Public so you can copy it again.
Treat a secret key like a password. Keep it in a secrets manager or an environment variable, never in source control, front-end code or chat. If it leaks, revoke it straight away.

Create a key

  • Open Settings → Developer access → API Keys in the dashboard. Only the workspace Owner and Admins can see this page.
  • Choose Secrets or Public, click Create API Key, give it a name (1 to 120 characters) and tick the scopes it needs.
  • A workspace can hold at most 10 active keys. At the limit, creating another is refused with 422 and This workspace already has the maximum of 10 active API keys. Revoke an unused key first.
  • Use one key per integration. A key's scopes cannot be edited after creation: to change them, create a new key and revoke the old one.
  • Keys do not expire. They work until you revoke them.

Send the key

Send the key in either header. They are equivalent:

HeaderValue
AuthorizationBearer dhvanee_live_YOUR_KEY
X-API-Keydhvanee_live_YOUR_KEY

The word Bearer is not case sensitive. If you send both headers they must hold the same key, otherwise the request is refused with 401.

curl -sS -X GET "https://api.stage.dhvanee.com/v1/contacts?limit=5" \
  -H "Authorization: Bearer dhvanee_live_YOUR_KEY"

The same request with the other header:

curl -sS "https://api.stage.dhvanee.com/v1/contacts?limit=5" \
  -H "X-API-Key: dhvanee_live_YOUR_KEY"

Scopes

A scope is a permission written as resource:action. A route needs exactly one scope, shown below. A key may hold several.

ScopeLets the key
contacts:readList and read contacts.
contacts:writeCreate, update and delete contacts.
calls:readList and read calls.
calls:writePlace a call and stop a call.
campaigns:readList and read campaigns.
campaigns:writeCreate, start, pause, resume and cancel campaigns.
agents:readList and read agents, their workflow and their published versions.
agents:writeCreate, rename, delete and publish agents, and save a workflow.
knowledge:readList knowledge documents and read an agent's attached documents.
knowledge:writeUpload and delete documents, and change an agent's attached documents.
automations:readList and read automations and their runs.
automations:writeCreate, change, activate and run automations.
numbers:readList the workspace's phone numbers.
numbers:writeImport a number you own, and attach or detach a number to an agent.
account:readRead the plan, balances and wallet summary.
copilot:useSend a message to the workspace copilot. This spends copilot credits.
Give a key only the scopes it needs. A reporting job needs read scopes only; an intake form that adds leads needs contacts:write and nothing else.

When a key is refused

Status`detail`Cause
401Valid API key is requiredNo key was sent, the Authorization header is not Bearer <key>, the value does not start with dhvanee_live_ or dhvanee_pub_, or Authorization and X-API-Key disagree.
401API key is invalid or revokedThe key is well formed but unknown or revoked, or its workspace is suspended or deleted.
403API key needs contacts:write scopeThe key is valid but lacks the scope the route needs. The message names that scope.
403Publishable API keys cannot use this scopeA publishable key was used on a route that needs a write scope or copilot:use.

Repeated attempts with a wrong key from one address are throttled; see Rate limits. All status codes are listed under Errors.

Revoke a key

  • In Settings → Developer access → API Keys, switch the key off in the Revoke column and confirm.
  • A revoked key stops working on its next request and cannot be turned back on. Anything still using it starts getting 401.
  • A revoked key no longer counts toward the limit of 10, so you can create its replacement.
  • If a workspace is suspended or deleted, all of its keys are revoked and its webhooks are switched off automatically.

The key list shows each key's name, a shortened form of the key and when it was created. Name keys after the integration that uses them so you know which one to revoke.

Keys and the rest of the platform

  • Webhooks are not created with a key. Subscribe in Settings → Developer access → Webhooks; see Webhooks.
  • Request history. The Developer logs tab lists recent API requests per key, with their status codes, so you can see what a key is doing.
  • MCP. The local MCP reads its key from DHVANEE_API_KEY.
Authentication · Dhvanee Docs