Skip to main content

Entitlements API

Reference

Lookup material for the entitlements endpoints in Nirmata AIControls. One shows what the install may use, to every signed-in role. Another adds how much of each limit is used, to admins and viewers. A third lets an admin select the enforcement mode.

Endpoints​

The endpoints return JSON. The first two use GET; the enforcement endpoint takes GET and PUT.

EndpointWho can call itReturns
GET /api/v1/entitlementsAdmin, viewer, and developer tokensPlan, add-ons, feature states, and limit values. No usage and no customer name.
GET /api/v1/entitlements/usageAdmin and viewer tokensEach limit with its current count, plus seat and team counts and monthly Judge and Analyst calls.
GET, PUT /api/v1/admin/entitlements/enforcementAdmin tokensThe enforcement mode status; PUT selects the mode. See Enforcement mode.

A developer token receives 403 from the usage endpoint, and viewer and developer tokens receive 403 from the enforcement endpoint. A request with missing or invalid credentials receives 401 from all of them.

The admin-only /api/v1/admin/license endpoint adds resolvedPlan, source, addons (with the licensed agent count) and limits to the licence status. It also adds licenceRejection, the full reason a stored licence was refused, which can name tenant or cluster ids and so is not returned elsewhere.

Entitlements response​

FieldDescription
catalogueRevisionThe plan catalogue revision this build uses.
enforcementModecompat or catalogue. In compat, features[].enabled follows the gates that apply today.
planfree, team, business, or enterprise.
trialtrue when the licence is a trial.
sourceWhere the plan came from: licence, none, or legacy_ui_tier.
expiredPlanThe plan of an expired licence, so a page can say "Business licence expired, running on Free". Empty otherwise.
nextChangeAtRFC 3339 time at which the response next changes on its own: a licence or add-on expiry, the end of a grace period, or the start of the next monthly window. Empty when nothing is time-bound.
addonsActive add-ons: id, expiresAt (empty when it lasts as long as the licence), and inGrace.
featuresA map from feature key to its state. See Feature state.
limitsA map from limit name to its value. See Limit value.

Feature state​

FieldDescription
enabledWhether the feature is available.
requiredPlanThe lowest plan that includes the feature. Absent when none does.
requiredAddonThe add-on that includes the feature. Absent when none does.
reasonWhy the feature is on or off: plan, addon, addon_expired, addon_ineligible, exception, deployment_profile, roadmap, blocked, legacy, or compat (compat mode, no legacy gate covers the key so it is available).
titleThe display name of the feature.

Limit value​

The limits map is keyed by limit name: gateway_identities, gateway_requests, seats, teams, retention_raw_days, retention_trend_days, upstreams, full_capture_sessions_per_seat, and workload_agents. See Limits for each plan's values.

FieldDescription
valueThe cap. null when the limit is unlimited or blocked, never 0.
unlimitedtrue when nothing is capped.
blockedtrue when everything is refused, for example a hosted tenant with no licence.
atLimitWhat happens at the limit. block_new: new additions are refused. hard_402: requests are refused until the month resets. billing_review: nothing is refused and the install is flagged. clamp: retention is capped at the value. lock_range: history beyond the window is not returned. degrade: one optional behavior turns off.
windowmonth when the count resets each UTC calendar month, otherwise none.

Usage response​

FieldDescription
limitsThe limit values above, plus the fields in Limit usage.
monthThe UTC month the monthly counts cover, as YYYY-MM.
seats, teamsCurrent counts.
judgeCallsMonth, analystCallsMonthJudge and Analyst calls this month.
licenceRejectionPresent when the stored licence was refused: unknown_plan, upgrade_required, or invalid. The code only. The full reason is on the admin licence endpoint.

A count that cannot be read is null, not 0.

Each limit is counted as Plan limits describes. Seats and monthly counts use the UTC calendar month.

Limit usage​

In the usage response, atLimit is a boolean and the catalogue behaviour moves to behavior.

FieldDescription
currentThe current count. null when the limit has no count, such as retention, or the count could not be read.
warntrue at or above the warning threshold.
atLimittrue when current has reached value. Always false for billing_review limits: the condition is reported in billingReview.
overGracetrue when current has reached the value plus the grace allowance.
billingReviewtrue when a billing_review limit is exceeded. Nothing is refused.
behaviorThe behaviour at the limit, as atLimit on the entitlements endpoint.
capacityThe count allowed when the limit scales with seats, as full-capture sessions do. null otherwise.
resetsAtRFC 3339 start of the next window, for monthly limits.

Trend window​

When a plan's trend retention is shorter than the range a chart asks for, the cost dashboard and productivity overview return rows inside the window only, plus truncatedTo, the start of the window. On the cost dashboard it is an RFC 3339 string; on the productivity overview it is Unix seconds. A chart can show everything before it as locked. The response is 200, not 402. In compat mode no window applies and truncatedTo is absent.

Enforcement mode​

enforcementMode is the mode this replica applies. It is compat by default. In compat, gates and limits behave as in earlier releases, decided from the legacy ui.tier and proxy.mode settings. The catalogue-only limits (seats, teams, workload agents, retention caps and the full-capture allowance) do not apply. The Free-tier caps (5 identities for the life of the install, 1,000 requests a month), trial quotas and the 2-upstream limit still do, and an Enterprise license's monthly identity and request values still flag billing review. The limits values still report the plan's catalogue values.

In catalogue, features, limits and the trend window follow the resolved plan and add-ons, and a missing feature or a refusing limit returns 402. An Enterprise license enables every feature.

An admin selects the mode with PUT /api/v1/admin/entitlements/enforcement and the body {"mode": "catalogue"} or {"mode": "compat"}; viewers and developers receive 403. GET on the same path returns the status:

FieldDescription
selectedThe mode an admin selected.
appliedThe mode this replica enforces.
implementsThe highest mode this version supports.
waitingReplicasRunning replicas that do not support the selected mode yet.
messageWhy a selection has not applied yet, when it has not.

catalogue applies within two minutes of being selected, once every running replica supports it. compat applies at once. See Turn on plan-based enforcement.

The 402 response​

A request that needs a feature the plan doesn't include, or that would create something past a refusing limit, returns 402. Limits whose behavior is billing_review, clamp, lock_range or degrade don't refuse requests, so reaching them returns no 402.

{
"error": "Shadow MCP quarantine is on Business",
"upgrade": true,
"feature": "shadow_mcp_quarantine",
"required": "business",
"addon": null,
"limit": null
}

For a limit, feature is null and limit is {"name": "teams", "value": 3, "current": 3}. The body never includes the customer name or licence dates.