Skip to main content
POST
Error

Authorizations

X-API-Key
string
header
required

Body

application/json
policy_type
string
subject_matcher_key
string
subject_matcher_values
string[]

Response

OK

action
string
config
object
created_at
string
created_by
string
current_spend_usd
number

CurrentSpendUSD is the spend in the policy's current window. Set for any spend_cap policy regardless of enabled state — disabled policies still surface usage so users can see what would have been counted. Nil for non-spend_cap policies or when the spend lookup failed.

current_usage
object[]

CurrentUsage is the consumed units in each configured limit's current window. Set for any rate_limit policy regardless of enabled state, one entry per limit in the config. Nil for non-rate_limit policies or when the usage lookup failed.

description
string
enabled
boolean
id
string
is_system_generated
boolean
name
string
organization_id
string
parent_policy_id
string

ParentPolicyID is set on materialized children of a default_spend_cap to the default's id. An explicit Update or a Create with the same matchers clears the link and takes ownership of the materialized row. Delete on the parent cascade-soft-deletes children still attached.

policy_type
string
priority
integer
subject_matchers
object[]
updated_at
string