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/me

Returns 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

200 OK
{
  "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"
  }
}
FieldTypeDescription
workspace.idstringThe workspace's ID.
workspace.namestringThe workspace's name.
api_key.idstringThe key's ID (key_…).
api_key.namestringThe name given to the key in API Keys.
api_key.prefixstringThe masked key, as shown in the app — never the full secret.
api_key.environmentstringlive or test.
plan.idstringgenesis, developer, growth or enterprise.
plan.namestringThe plan's display name.
plan.rate_limit_per_minuteintegerRequests per minute allowed for the workspace — see Rate limits.
plan.max_decisionsinteger or nullDecisions the workspace can have; null is unlimited.
plan.log_retention_daysintegerHow long the plan keeps executions.
plan.hard_capbooleantrue 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.usedintegerBillable decisions in the current period.
usage.includedintegerDecisions included in the current period — on annual plans, the pool for the whole year.
usage.period_startstringStart of the current billing period, ISO 8601.
usage.period_endstringEnd 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

StatusCodeWhen
401INVALID_API_KEYThe key is missing, malformed, unknown or revoked.
429RATE_LIMITEDToo 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.

On this page