Skip to content
Start here

Audit

List Spend Policy Audit Entries
GET/accounts/{account_id}/billing/spend-policies/{policy_id}/audit
ModelsExpand Collapse
AuditListResponse object { action, balance_cents, billing_period_end, 7 more }

A state transition recorded when the policy was evaluated against the account’s balance.

action: "notification" or "usage_block"

The action taken when the threshold is reached. notification sends an email to notification_email. usage_block blocks further usage of the product until the end of the billing period. Raising the threshold above the current balance, disabling the policy, or deleting it lifts the block early.

One of the following:
"notification"
"usage_block"
balance_cents: number

The account’s balance for the product at evaluation time, in US cents.

formatint64
billing_period_end: string

Exclusive end of the billing period that was evaluated.

formatdate-time
billing_period_start: string

Inclusive start of the billing period that was evaluated.

formatdate-time
created_at: string

When the entry was recorded.

formatdate-time
policy_version: number

The policy version that was evaluated.

formatint64
reason: string

A human-readable explanation of the trigger.

source: "kafka" or "policy_revision"

What caused the evaluation. kafka means a balance update. policy_revision means a change to the policy.

One of the following:
"kafka"
"policy_revision"
threshold_cents: number

The policy threshold at evaluation time, in US cents.

formatint64
trigger: string

The trigger recorded at evaluation time. New evaluations record limit_reached when the balance reaches or exceeds the configured threshold. Earlier entries retain their recorded trigger.