Skip to content

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.

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_billed counts 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 incomplete or non_compliant Decision counts as well.

Your agreement with Dockt sets how Persons used are priced and which credits cover them.

Use a credential with account:read on your backend. The commands use curl; set the API base URL and token:

Terminal window
export DOCKT_API_BASE_URL='https://api.dockt.com'
export DOCKT_API_TOKEN='REPLACE_WITH_BEARER_TOKEN'

GET /v1/usage counts Persons used between two dates, both included:

Terminal window
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.
  • to must not be before from.

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.

GET /v1/account/credits returns your allowances and the current month’s charges that allowances don’t cover:

Terminal window
curl --fail-with-body --silent --show-error \
-H "Authorization: Bearer $DOCKT_API_TOKEN" \
"$DOCKT_API_BASE_URL/v1/account/credits?limit=25"
  • data.allowances is 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_more is true, pass data.allowances.next_cursor as the cursor of the next request. Keep limit the same. limit is 1 to 25 and defaults to 25.
  • A null remaining amount or unit means unavailable, not zero. Don’t add up amounts with different units.
  • data.overage lists 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_at says 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.

Errors use application/problem+json. Branch on type:

Billing errors never stop evaluation. Include x-request-id when you contact hello@dockt.com.