Usage tags API
GET /api/v1/admin/usage-tags
Section titled “GET /api/v1/admin/usage-tags”GET /api/v1/admin/usage-tags · operation getUsageTagPolicy
Global administrator only. Reads the finite allowed tag taxonomy with its consistent global configuration version and current YAML fingerprint. Requires usage_tags; no-store. Tag values are declarations or authenticated-team defaults, not authorization or financial evidence.
Authentication: adminSession
Responses
| Status | Description | Body |
|---|---|---|
200 |
Current policy snapshot | application/json: UsageTagPolicySnapshot |
401 |
Missing or invalid bearer key | application/json: Error |
403 |
Model not allowed | application/json: Error |
404 |
Feature disabled | application/json: Error |
503 |
Local concurrency limit reached | application/json: Error |
PUT /api/v1/admin/usage-tags
Section titled “PUT /api/v1/admin/usage-tags”PUT /api/v1/admin/usage-tags · operation replaceUsageTagPolicy
Replace the complete taxonomy. Global admin, usage_tag_management, same origin and CSRF required. Whole snapshot validation precedes versioned PostgreSQL commit. Policy max16KiB; request max32KiB, unique JSON keys and strings-only enum values. No retroactive relabeling.
Authentication: adminSession
Parameters
| Name | In | Type | Description |
|---|---|---|---|
X-CSRF-Token |
header | string, required | Token returned by admin login/session; required with the same-origin session cookie for writes. |
Request body (required)
application/json: objectversion(integer, required, min 0)expected_base_fingerprint(string, required)policy(UsageTagPolicy, required)
Responses
| Status | Description | Body |
|---|---|---|
200 |
Latest consistent policy snapshot after commit | application/json: UsageTagPolicySnapshot |
400 |
Invalid input | application/json: Error |
401 |
Missing or invalid bearer key | application/json: Error |
403 |
Model not allowed | application/json: Error |
404 |
Feature disabled | application/json: Error |
409 |
Global configuration version or current YAML base changed | — |
422 |
Invalid taxonomy or snapshot dependency | — |
503 |
Local concurrency limit reached | application/json: Error |
DELETE /api/v1/admin/usage-tags
Section titled “DELETE /api/v1/admin/usage-tags”DELETE /api/v1/admin/usage-tags · operation revertUsageTagPolicy
Revert the policy override to current YAML. Does not remove historical tags. Global admin, usage_tag_management, same origin and CSRF required.
Authentication: adminSession
Parameters
| Name | In | Type | Description |
|---|---|---|---|
X-CSRF-Token |
header | string, required | Token returned by admin login/session; required with the same-origin session cookie for writes. |
Request body (required)
application/json: objectversion(integer, required, min 0)expected_base_fingerprint(string, required)
Responses
| Status | Description | Body |
|---|---|---|
200 |
Latest consistent policy snapshot after commit | application/json: UsageTagPolicySnapshot |
400 |
Invalid input | application/json: Error |
401 |
Missing or invalid bearer key | application/json: Error |
403 |
Model not allowed | application/json: Error |
404 |
Feature disabled | application/json: Error |
409 |
Global configuration version or current YAML base changed | — |
503 |
Local concurrency limit reached | application/json: Error |