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.
What you can do
Authentication
Secret and publishable keys, headers and scopes.
Errors
Every status code and the exact detail shapes.
Rate limits
60 requests per key and 300 per workspace each minute.
Credits
When the API answers 402 and how to check your balance.
Contacts
List, create, update and delete contacts.
Calls
Place, read and stop outbound calls.
Campaigns
Create and control outbound campaigns.
Agents
Agents, workflows, publish and versions.
Knowledge
Documents and agent attachments.
Automations
Workflows, activate and runs.
Copilot
One turn of the workspace copilot.
Account
Read plan balances for the key's workspace.
Phone numbers
List, import, attach and detach owned numbers.
Webhooks
Contact and call events, signed so you can trust them.
Local MCP
Use the API from Cursor or Claude Desktop.
Base URL
https://api.stage.dhvanee.comEvery 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
Authorizationheader, 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}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
429withRetry-After. - 4. The route runs. Anything that spends plan capacity, such as calls, knowledge storage, automation runs and copilot turns, can answer
402when 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
| Resource | Read | Write |
|---|---|---|
| Contacts | contacts:read | contacts:write |
| Calls | calls:read | calls:write |
| Campaigns | campaigns:read | campaigns:write |
| Agents | agents:read | agents:write |
| Knowledge | knowledge:read | knowledge:write |
| Automations | automations:read | automations:write |
| Phone numbers | numbers:read | numbers:write |
| Account | account:read | none |
| Copilot | none | copilot:use |
Conventions
- Paging.
GET /v1/contactsandGET /v1/callstakelimit(1 to 200, default 50) andoffset(0 or more). Other lists return everything and do not page. - Safe retries.
POST /v1/calls,POST /v1/campaigns/{id}/start,POST /v1/automationsandPOST /v1/automations/{id}/runsneed anIdempotency-Keyheader: 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 answers409. - Failures. Failed calls return JSON with a
detailfield. 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.