Skip to content
DhvaneeDocs
Dashboard
On this page

Credits

Which API calls spend plan allowance, when they answer 402, what each code means and how to check your balance first.

Your plan comes with allowances: voice minutes, concurrent calls, knowledge storage, automation runs and copilot credits. Most of the API is free to use. A few actions spend an allowance, and when one has run out the API answers `402` and does not do the action.

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

What spends an allowance

ActionAllowance it needsChecked when
POST /v1/callsVoice minutes, concurrent calls, outbound callingThe call is requested. Calls already in progress are not cut off by the check.
POST /v1/campaigns/{id}/start and /resumeVoice minutes, concurrent calls, outbound callingThe campaign is started or resumed.
POST /v1/knowledge/documentsKnowledge storageA document is uploaded.
POST /v1/automations/{id}/runsAutomation runsA run is started.
POST /v1/copilotCopilot creditsA turn is sent, whenever the copilot is answering with its AI model.

Reading data, managing contacts, agents, phone numbers and campaigns (other than starting them) never answers 402. Creating an automation does not spend a run; running it does.

The 402 response

detail is an object with a code that says what ran out. Branch on code.

{"detail": {"code": "minutes_limit_reached"}}
`code`What it meansWhat to do
minutes_limit_reachedThe plan's voice minutes for this cycle are used up and the plan does not allow extra minutes.Upgrade the plan or wait for the next cycle.
concurrent_limit_reachedAs many calls are live as the plan allows at once.Wait for a call to end and try again.
outbound_disabledOutbound calling is not turned on for this plan or workspace.Ask a workspace admin or change plan in the dashboard.
kb_storage_limit_reachedThe document would take the workspace over its knowledge storage.Delete documents you no longer need, or upgrade.
automation_executions_limit_reachedThe plan's automation runs for this cycle are used up and extra runs are not allowed.Upgrade the plan or wait for the next cycle.
copilot_credits_exhaustedThe plan's copilot credits for this cycle are used up and extra credits are not allowed.Upgrade the plan or wait for the next cycle.
wallet_emptyThe plan lets you use more than its allowance and pays for the extra from your wallet, but the wallet has no funds left. Applies to voice minutes, automation runs and copilot credits.Add funds to the wallet in the dashboard.
workspace_inactiveThe workspace is not active.Contact your workspace admin or support.

The API only reports the problem. Topping up the wallet, changing plan and checkout are done in the dashboard; see Billing and plans.

Check before you act

GET /v1/account (scope account:read) shows what is left, so an integration can stop or warn before it hits a 402.

curl -sS -X GET "https://api.stage.dhvanee.com/v1/account" \
  -H "Authorization: Bearer dhvanee_live_YOUR_KEY"
{
  "plan": "Free",
  "plan_code": "free",
  "voice_minutes": {"limit": 60.0, "used": 6.0, "remaining": 54.0},
  "concurrency": {"in_use": 0, "cap": 5},
  "automation_executions": {"limit": 100.0, "used": 0.0, "remaining": 100.0},
  "knowledge_storage_mb": {"limit": 1.5, "used": 0.0, "remaining": 1.5},
  "copilot_credits": {"limit": 450.0, "used": 0.0, "remaining": 450.0, "extra_allowed": false},
  "wallet": {"balance": 5000.0, "available": 5000.0, "currency": "INR", "required": true},
  "cycle_start": "2026-11-27T11:52:25.861802+00:00",
  "cycle_end": "2026-12-27T11:52:25.861802+00:00"
}
FieldMeaning
voice_minutes, automation_executions, knowledge_storage_mblimit is the plan allowance for this cycle, used is what has been spent and remaining is what is left. A limit of null means no limit.
concurrencyin_use is calls live now and cap is the most the plan allows at once (null for no cap).
copilot_creditsSame as above, plus extra_allowed: whether the plan lets you keep going on wallet funds after the allowance.
walletbalance is the money in the wallet and available is what can still be used after charges not yet settled, in currency. required is true when extra usage is paid from the wallet and stops when it is empty.
cycle_start, cycle_endThe billing cycle. Allowances start again at cycle_end.
GET /v1/account shows balances only. It carries no card or payment details and cannot change anything.

A call that is refused

Placing a call needs an Idempotency-Key and a number you own in from. When voice minutes are used up it answers 402 and no call is made:

curl -sS -X POST "https://api.stage.dhvanee.com/v1/calls" \
  -H "Authorization: Bearer dhvanee_live_YOUR_KEY" \
  -H "Idempotency-Key: order-1042-call" \
  -H "Content-Type: application/json" \
  -d '{"agent_id":"AGENT_ID","to":"+919876543210","from":"PHONE_NUMBER_ID"}'
{"detail": {"code": "minutes_limit_reached"}}
  • The plan check comes first, before the agent and number are checked, so 402 can appear even if the rest of the request has a mistake.
  • A 402 is not remembered by the Idempotency-Key. Once you have added minutes you can send the same request again.

Good habits

  • Read GET /v1/account before a large batch and stop early when remaining is low.
  • Treat 402 as a business signal, not a fault. Do not retry in a loop; tell a person.
  • Keep an eye on concurrency.in_use against cap when you place many calls at once.
Credits · Dhvanee Docs