Get account and usage
GET /v1/me — the workspace, API key and plan behind a key, plus this billing period's usage. Verify a key in CI and watch your quota from code.
GET https://api.dcision.io/v1/meReturns who an API key belongs to — its workspace, the key itself and the plan — and the billable decisions used in the current billing period. Use it to verify a key in CI or at boot, and to show or alert on quota from your own code.
Request
No parameters and no body. Authenticate with the same API keys as decisions:
curl https://api.dcision.io/v1/me \
-H "Authorization: Bearer $DCISION_API_KEY"Response
{
"workspace": { "id": "4c8f2a91-6d3b-4e7a-9f15-2b0c7d8e6a43", "name": "Acme" },
"api_key": {
"id": "key_7Hq2Lm9Xc4Rv1Tz8Wn3B",
"name": "Production",
"prefix": "dcs_live_9fK2…0Ad2",
"environment": "live"
},
"plan": {
"id": "growth",
"name": "Growth",
"rate_limit_per_minute": 2000,
"max_decisions": null,
"log_retention_days": 30,
"hard_cap": false
},
"usage": {
"used": 1284311,
"included": 10000000,
"period_start": "2026-10-01T00:00:00.000Z",
"period_end": "2026-11-01T00:00:00.000Z"
}
}| Field | Type | Description |
|---|---|---|
workspace.id | string | The workspace's ID. |
workspace.name | string | The workspace's name. |
api_key.id | string | The key's ID (key_…). |
api_key.name | string | The name given to the key in API Keys. |
api_key.prefix | string | The masked key, as shown in the app — never the full secret. |
api_key.environment | string | live or test. |
plan.id | string | genesis, developer, growth or enterprise. |
plan.name | string | The plan's display name. |
plan.rate_limit_per_minute | integer | Requests per minute allowed for the workspace — see Rate limits. |
plan.max_decisions | integer or null | Decisions the workspace can have; null is unlimited. |
plan.log_retention_days | integer | How long the plan keeps executions. |
plan.hard_cap | boolean | true when the plan can't continue with credits: calls are blocked with 402 QUOTA_EXCEEDED once the included volume is used up. false on Genesis, Developer and Growth — past the included volume they use credits. |
usage.used | integer | Billable decisions in the current period. |
usage.included | integer | Decisions included in the current period — on annual plans, the pool for the whole year. |
usage.period_start | string | Start of the current billing period, ISO 8601. |
usage.period_end | string | End of the current billing period, ISO 8601. |
The billing period is the subscription cycle on paid plans and the calendar month in UTC on Genesis — see Plans, quotas and billing.
Examples
Fail a CI job early when the key is wrong:
dcision_me=$(curl -sf https://api.dcision.io/v1/me -H "Authorization: Bearer $DCISION_API_KEY") \
|| { echo "Invalid Dcision API key" >&2; exit 1; }
echo "$dcision_me" | jq -r '"\(.workspace.name) · \(.api_key.environment) · \(.plan.name)"'Warn before the included volume runs out — past it, decisions use credits:
const me = await fetch("https://api.dcision.io/v1/me", {
headers: { Authorization: `Bearer ${process.env.DCISION_API_KEY}` },
}).then((response) => response.json());
const share = me.usage.used / me.usage.included;
if (share >= 0.9) alert(`Dcision: ${Math.round(share * 100)}% of the included volume used`);Errors
| Status | Code | When |
|---|---|---|
| 401 | INVALID_API_KEY | The key is missing, malformed, unknown or revoked. |
| 429 | RATE_LIMITED | Too many read requests in the current minute. |
Read endpoints — GET /v1/me and GET /v1/executions — share a rate-limit window of their own, with your plan's per-minute limit, so polling them never slows down your decisions. Reads are not billed.
List and get decisions
GET /v1/decisions and GET /v1/decisions/{slug} — the decisions of an API key's workspace and the contract of each one's active version, with an example state.
List executions
GET /v1/executions — recent runs of your decisions with answers, action, reason and metrics, filtered by decision and status and paginated with a cursor. Inputs are never returned.