Skip to content
DhvaneeDocs
Dashboard
On this page

Public API overview

The workspace REST API: what it covers, how a request is authenticated, limited and retried, and where each part is documented.

The public API is the supported way to automate a workspace from your own systems. Send requests to https://api.stage.dhvanee.com with a key from Settings → Developer access. Every key belongs to one workspace and only ever sees that workspace's data.

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

What you can do

Base URL

https://api.stage.dhvanee.com

Every route starts with /v1. Requests and responses are JSON, and ids are UUIDs.

Quick start

  • 1. In the dashboard open Settings → Developer access → API Keys, choose Secrets, and create a key with the scope contacts:read. Copy it now: a secret key is shown only once.
  • 2. Send it in the Authorization header, as below.
curl -sS -X GET "https://api.stage.dhvanee.com/v1/contacts?limit=5" \
  -H "Authorization: Bearer dhvanee_live_YOUR_KEY"
{"items": [{"id": "6f1c...", "phone": "+919876543210", "first_name": "Asha", "last_name": "Patel", "email": "asha@example.com", "company": null, "job_title": null}], "limit": 5, "offset": 0}
Create each key with only the scopes the integration needs, and one key per integration so you can revoke one without stopping the others.

How a request is handled

  • 1. Your key is checked. A missing, unknown or revoked key gets 401.
  • 2. The key's scopes are checked against the route. A missing scope gets 403.
  • 3. Your rate-limit budget is checked. Over it gets 429 with Retry-After.
  • 4. The route runs. Anything that spends plan capacity, such as calls, knowledge storage, automation runs and copilot turns, can answer 402 when the plan allowance is used up.

Every response carries an X-Request-Id header. Quote it when you ask support about a request.

Scopes by resource

ResourceReadWrite
Contactscontacts:readcontacts:write
Callscalls:readcalls:write
Campaignscampaigns:readcampaigns:write
Agentsagents:readagents:write
Knowledgeknowledge:readknowledge:write
Automationsautomations:readautomations:write
Phone numbersnumbers:readnumbers:write
Accountaccount:readnone
Copilotnonecopilot:use

Conventions

  • Paging. GET /v1/contacts and GET /v1/calls take limit (1 to 200, default 50) and offset (0 or more). Other lists return everything and do not page.
  • Safe retries. POST /v1/calls, POST /v1/campaigns/{id}/start, POST /v1/automations and POST /v1/automations/{id}/runs need an Idempotency-Key header: 1 to 128 printable ASCII characters. Repeat the same key and body within 24 hours and you get the original response instead of a second call or run. The same key with a different body answers 409.
  • Failures. Failed calls return JSON with a detail field. See Errors.
  • Limits. See Rate limits and Credits.
  • Events. To be told when something happens, use Webhooks instead of polling.

Not in this API

  • Buying or searching for a phone number. Import a number you already own, or buy one in the dashboard.
  • Wallet top-up, plan changes or checkout.
  • Reseller or credit transfer.
  • Storing CRM sign-in secrets. Connect CRMs in the dashboard.
  • Creating keys and webhook subscriptions. Both are done in Settings → Developer access, never with a data key.
Public API overview · Dhvanee Docs