Read credits and usage
Use this guide to check how much credit your Account has left, and to count usage per Workplace, for example to bill your own customers.
What counts as usage
Section titled “What counts as usage”Dockt counts Persons used: distinct Persons whose work Dockt evaluated in a period. A Person counts once, however many Assignments, Workplaces, documents and re-evaluations they have in that period. Monitoring while work is open is included.
- An Assignment’s evaluations count its Person for the day they ran, at the Workplace’s date. Evaluating work that ended before that day doesn’t count.
- A Person is billed once a year: on the first day they are used, and again on the first day they are used a year or more after that. Using them in between, anywhere in your Account, costs nothing more.
persons_billedcounts the Persons billed in a period: that is what your credits pay for. - Dry runs never count.
- Engagements, Policy changes, reads, imports and syncs don’t count by themselves.
- The result doesn’t matter. An
incompleteornon_compliantDecision counts as well.
Your agreement with Dockt sets how Persons used are priced and which credits cover them.
Before you start
Section titled “Before you start”Use a credential with account:read on your backend. The commands use curl; set the API base URL and token:
export DOCKT_API_BASE_URL='https://api.dockt.com'export DOCKT_API_TOKEN='REPLACE_WITH_BEARER_TOKEN'Count Persons used
Section titled “Count Persons used”GET /v1/usage counts Persons used between two dates, both included:
curl --fail-with-body --silent --show-error --get \ -H "Authorization: Bearer $DOCKT_API_TOKEN" \ --data-urlencode 'from=2026-11-01' \ --data-urlencode 'to=2026-11-30' \ --data-urlencode 'group_by=workplace' \ "$DOCKT_API_BASE_URL/v1/usage"For example, a response grouped by Workplace looks like this:
{ "object": "list", "data": [ { "object": "usage_row", "workplace": { "id": "wpl_8Tn1", "external_ref": "plant-antwerp", "namespace": "api" }, "persons_used": 42, "persons_billed": 5 }, { "object": "usage_row", "workplace": { "id": "wpl_2Gh7", "external_ref": "client-x-ghent", "namespace": "api" }, "persons_used": 17, "persons_billed": 2 } ], "has_more": false, "next_cursor": null}- With
group_by=workplace, each row counts the Persons used at one Workplace. A Person who worked at two Workplaces counts in both rows. - With
group_by=none, the default, one row counts each Person once for the whole Account. Use it for your Account total; don’t add up the per-Workplace rows. tomust not be beforefrom.
Use the per-Workplace rows to bill your own customers, with your own prices. The counts can still grow for a period that hasn’t ended, and late evaluations can add to the last day. Read a period again after it has ended before you bill it.
Read remaining credits
Section titled “Read remaining credits”GET /v1/account/credits returns your allowances and the current month’s charges that allowances don’t cover:
curl --fail-with-body --silent --show-error \ -H "Authorization: Bearer $DOCKT_API_TOKEN" \ "$DOCKT_API_BASE_URL/v1/account/credits?limit=25"data.allowancesis a page of allowances: prepaid credits, postpaid commitments or free credit. Each has its remaining amount, unit, priority, what it applies to, and a schedule of amounts and dates.- While
data.allowances.has_moreistrue, passdata.allowances.next_cursoras thecursorof the next request. Keeplimitthe same.limitis 1 to 25 and defaults to 25. - A
nullremaining amount or unit means unavailable, not zero. Don’t add up amounts with different units. data.overagelists charges for the current UTC calendar month that no allowance covers, each with its unit and invoice status. An exhausted allowance shows zero next to separate overage; it never goes negative.retrieved_atsays when Dockt read the balances. Recent usage may not be included yet.
Dockt keeps evaluating work when allowances run out. This endpoint is read-only: you can’t add credits with it.
Handle unavailable billing data
Section titled “Handle unavailable billing data”Errors use application/problem+json. Branch on type:
503billing-setup-pending: billing isn’t set up for your Account yet. Show the balance as unavailable, not zero.503billing-unavailable: retry with increasing delays. Show the data as unavailable.400invalid-billing-query: fix the cursor or limit, or restart from the first page.
Billing errors never stop evaluation. Include x-request-id when you contact hello@dockt.com.