---
title: Spend Policies
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/typescript)

[Billing](https://developers.cloudflare.com/api/typescript/resources/billing)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Spend Policies

##### [List Spend Policies](https://developers.cloudflare.com/api/typescript/resources/billing/subresources/spend_policies/methods/list)

client.billing.spendPolicies.list(SpendPolicyListParams {account\_id } params, RequestOptionsoptions?): SinglePage< [SpendPolicyListResponse](<https://developers.cloudflare.com/api/typescript/resources/billing#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_list_response%20%3E%20(schema)>) {id, account\_id, action, 7 more } >

GET/accounts/{account\_id}/billing/spend-policies

##### [Create Spend Policy](https://developers.cloudflare.com/api/typescript/resources/billing/subresources/spend_policies/methods/create)

client.billing.spendPolicies.create(SpendPolicyCreateParams {account\_id, action, enabled, 4 more } params, RequestOptionsoptions?): [SpendPolicyCreateResponse](<https://developers.cloudflare.com/api/typescript/resources/billing#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_create_response%20%3E%20(schema)>) {id, account\_id, action, 7 more }

POST/accounts/{account\_id}/billing/spend-policies

##### [Get Spend Policy](https://developers.cloudflare.com/api/typescript/resources/billing/subresources/spend_policies/methods/get)

client.billing.spendPolicies.get(stringpolicyID, SpendPolicyGetParams {account\_id } params, RequestOptionsoptions?): [SpendPolicyGetResponse](<https://developers.cloudflare.com/api/typescript/resources/billing#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_get_response%20%3E%20(schema)>) {id, account\_id, action, 7 more }

GET/accounts/{account\_id}/billing/spend-policies/{policy\_id}

##### [Update Spend Policy](https://developers.cloudflare.com/api/typescript/resources/billing/subresources/spend_policies/methods/update)

client.billing.spendPolicies.update(stringpolicyID, SpendPolicyUpdateParams {account\_id, action, enabled, 5 more } params, RequestOptionsoptions?): [SpendPolicyUpdateResponse](<https://developers.cloudflare.com/api/typescript/resources/billing#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_update_response%20%3E%20(schema)>) {id, account\_id, action, 7 more }

PUT/accounts/{account\_id}/billing/spend-policies/{policy\_id}

##### [Delete Spend Policy](https://developers.cloudflare.com/api/typescript/resources/billing/subresources/spend_policies/methods/delete)

client.billing.spendPolicies.delete(stringpolicyID, SpendPolicyDeleteParams {account\_id, ifMatch } params, RequestOptionsoptions?): [SpendPolicyDeleteResponse](<https://developers.cloudflare.com/api/typescript/resources/billing#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_delete_response%20%3E%20(schema)>) {id }

DELETE/accounts/{account\_id}/billing/spend-policies/{policy\_id}

##### ModelsExpand Collapse

<details>

<summary>

SpendPolicyListResponse {id, account\_id, action, 7 more }

A spend policy.

</summary>

id: string

The unique identifier of the spend policy.

formatuuid

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_list_response%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

account\_id: number

Internal numeric ID of the account that owns the policy. This is not the account tag used in the path.

formatint64

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_list_response%20%3E%20(schema)%20%3E%20(property)%20account_id">Link to this property</a>

<details>

<summary>

action: "notification"| "usage\_block"

The action taken when the threshold is reached. <code>notification</code> sends an email to <code>notification_email</code>. <code>usage_block</code> 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.

</summary>

One of the following:

"notification"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_list_response%20%3E%20(schema)%20%3E%20(property)%20action%20%3E%20(member)%200">Link to this property</a>

"usage\_block"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_list_response%20%3E%20(schema)%20%3E%20(property)%20action%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_list_response%20%3E%20(schema)%20%3E%20(property)%20action">Link to this property</a>

enabled: boolean

Whether the policy is evaluated.

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_list_response%20%3E%20(schema)%20%3E%20(property)%20enabled">Link to this property</a>

name: string

Display name of the policy.

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_list_response%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

notification\_email: string

Email address that receives notifications. An empty string when none is set.

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_list_response%20%3E%20(schema)%20%3E%20(property)%20notification_email">Link to this property</a>

<details>

<summary>

product\_id: "workers"| "durable\_objects"

The product the policy applies to: <code>workers</code> or <code>durable_objects</code>. Each product’s balance and policies are separate. Both products support <code>notification</code> and <code>usage_block</code> policies on create and update.

</summary>

One of the following:

"workers"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_list_response%20%3E%20(schema)%20%3E%20(property)%20product_id%20%3E%20(member)%200">Link to this property</a>

"durable\_objects"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_list_response%20%3E%20(schema)%20%3E%20(property)%20product_id%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_list_response%20%3E%20(schema)%20%3E%20(property)%20product_id">Link to this property</a>

threshold\_cents: number

The spend threshold for the current billing period, in US cents.

formatint64

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_list_response%20%3E%20(schema)%20%3E%20(property)%20threshold_cents">Link to this property</a>

version: number

Optimistic-concurrency version. It starts at 1 and goes up by one on every update or delete. This value is also returned in <code>ETag</code>.

formatint64

minimum1

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_list_response%20%3E%20(schema)%20%3E%20(property)%20version">Link to this property</a>

<details>

<summary>

current\_state?: CurrentState {balance\_cents, billing\_period\_end, billing\_period\_start, 3 more }

Read-only state on list/get responses, evaluated from the latest owning projector snapshot at request time, independently of the API replica. Configuration enabled/version/ETag do not change when a cycle rolls over. Audit history remains unchanged. Missing during a rolling upgrade or on mutation responses; clients must treat missing state as unavailable. Balances are asynchronous estimates, not a synchronous usage read.

</summary>

balance\_cents: number| null

formatint64

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_list_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20balance_cents">Link to this property</a>

billing\_period\_end: string| null

formatdate-time

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_list_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20billing_period_end">Link to this property</a>

billing\_period\_start: string| null

formatdate-time

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_list_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20billing_period_start">Link to this property</a>

<details>

<summary>

enforcement: Enforcement| null

Durable desired cap and delivery bookkeeping for this policy, or null if no owned effect exists. Separate from threshold evaluation: pending/leased/retry can lag the new billing period. Succeeded with equal generations means delivery completed, not an EWC readback.

</summary>

applied\_generation: number

formatint64

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_list_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20applied_generation">Link to this property</a>

<details>

<summary>

delivery\_status: "pending"| "leased"| "retry"| "succeeded"

</summary>

One of the following:

"pending"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_list_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20delivery_status%20%3E%20(member)%200">Link to this property</a>

"leased"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_list_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20delivery_status%20%3E%20(member)%201">Link to this property</a>

"retry"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_list_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20delivery_status%20%3E%20(member)%202">Link to this property</a>

"succeeded"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_list_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20delivery_status%20%3E%20(member)%203">Link to this property</a>

</details>

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_list_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20delivery_status">Link to this property</a>

desired\_generation: number

formatint64

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_list_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20desired_generation">Link to this property</a>

<details>

<summary>

desired\_state: "active"| "inactive"

</summary>

One of the following:

"active"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_list_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20desired_state%20%3E%20(member)%200">Link to this property</a>

"inactive"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_list_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20desired_state%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_list_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20desired_state">Link to this property</a>

expires\_at: string| null

formatdate-time

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_list_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20expires_at">Link to this property</a>

</details>

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_list_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement">Link to this property</a>

evaluated\_at: string

Evaluation time; not the timestamp of the latest usage event.

formatdate-time

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_list_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20evaluated_at">Link to this property</a>

<details>

<summary>

status: "disabled"| "no\_current\_period"| "unavailable"| 2 more

Threshold evaluation, not proof of an edge cap. No current active period yields no\_current\_period for enabled policies; failed aggregate reads yield unavailable for enabled policies. Disabled policies report disabled. Neither no\_current\_period nor unavailable implies a zero balance or below-limit state. Operators may disable current-state reads, in which case current\_state is omitted.

</summary>

One of the following:

"disabled"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_list_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20status%20%3E%20(member)%200">Link to this property</a>

"no\_current\_period"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_list_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20status%20%3E%20(member)%201">Link to this property</a>

"unavailable"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_list_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20status%20%3E%20(member)%202">Link to this property</a>

"below\_limit"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_list_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20status%20%3E%20(member)%203">Link to this property</a>

"limit\_reached"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_list_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20status%20%3E%20(member)%204">Link to this property</a>

</details>

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_list_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20status">Link to this property</a>

</details>

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_list_response%20%3E%20(schema)%20%3E%20(property)%20current_state">Link to this property</a>

</details>

[Link to this property](<#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_list_response%20%3E%20(schema)>)

<details>

<summary>

SpendPolicyCreateResponse {id, account\_id, action, 7 more }

A spend policy.

</summary>

id: string

The unique identifier of the spend policy.

formatuuid

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_create_response%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

account\_id: number

Internal numeric ID of the account that owns the policy. This is not the account tag used in the path.

formatint64

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_create_response%20%3E%20(schema)%20%3E%20(property)%20account_id">Link to this property</a>

<details>

<summary>

action: "notification"| "usage\_block"

The action taken when the threshold is reached. <code>notification</code> sends an email to <code>notification_email</code>. <code>usage_block</code> 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.

</summary>

One of the following:

"notification"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_create_response%20%3E%20(schema)%20%3E%20(property)%20action%20%3E%20(member)%200">Link to this property</a>

"usage\_block"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_create_response%20%3E%20(schema)%20%3E%20(property)%20action%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_create_response%20%3E%20(schema)%20%3E%20(property)%20action">Link to this property</a>

enabled: boolean

Whether the policy is evaluated.

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_create_response%20%3E%20(schema)%20%3E%20(property)%20enabled">Link to this property</a>

name: string

Display name of the policy.

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_create_response%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

notification\_email: string

Email address that receives notifications. An empty string when none is set.

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_create_response%20%3E%20(schema)%20%3E%20(property)%20notification_email">Link to this property</a>

<details>

<summary>

product\_id: "workers"| "durable\_objects"

The product the policy applies to: <code>workers</code> or <code>durable_objects</code>. Each product’s balance and policies are separate. Both products support <code>notification</code> and <code>usage_block</code> policies on create and update.

</summary>

One of the following:

"workers"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_create_response%20%3E%20(schema)%20%3E%20(property)%20product_id%20%3E%20(member)%200">Link to this property</a>

"durable\_objects"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_create_response%20%3E%20(schema)%20%3E%20(property)%20product_id%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_create_response%20%3E%20(schema)%20%3E%20(property)%20product_id">Link to this property</a>

threshold\_cents: number

The spend threshold for the current billing period, in US cents.

formatint64

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_create_response%20%3E%20(schema)%20%3E%20(property)%20threshold_cents">Link to this property</a>

version: number

Optimistic-concurrency version. It starts at 1 and goes up by one on every update or delete. This value is also returned in <code>ETag</code>.

formatint64

minimum1

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_create_response%20%3E%20(schema)%20%3E%20(property)%20version">Link to this property</a>

<details>

<summary>

current\_state?: CurrentState {balance\_cents, billing\_period\_end, billing\_period\_start, 3 more }

Read-only state on list/get responses, evaluated from the latest owning projector snapshot at request time, independently of the API replica. Configuration enabled/version/ETag do not change when a cycle rolls over. Audit history remains unchanged. Missing during a rolling upgrade or on mutation responses; clients must treat missing state as unavailable. Balances are asynchronous estimates, not a synchronous usage read.

</summary>

balance\_cents: number| null

formatint64

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_create_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20balance_cents">Link to this property</a>

billing\_period\_end: string| null

formatdate-time

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_create_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20billing_period_end">Link to this property</a>

billing\_period\_start: string| null

formatdate-time

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_create_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20billing_period_start">Link to this property</a>

<details>

<summary>

enforcement: Enforcement| null

Durable desired cap and delivery bookkeeping for this policy, or null if no owned effect exists. Separate from threshold evaluation: pending/leased/retry can lag the new billing period. Succeeded with equal generations means delivery completed, not an EWC readback.

</summary>

applied\_generation: number

formatint64

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_create_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20applied_generation">Link to this property</a>

<details>

<summary>

delivery\_status: "pending"| "leased"| "retry"| "succeeded"

</summary>

One of the following:

"pending"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_create_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20delivery_status%20%3E%20(member)%200">Link to this property</a>

"leased"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_create_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20delivery_status%20%3E%20(member)%201">Link to this property</a>

"retry"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_create_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20delivery_status%20%3E%20(member)%202">Link to this property</a>

"succeeded"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_create_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20delivery_status%20%3E%20(member)%203">Link to this property</a>

</details>

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_create_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20delivery_status">Link to this property</a>

desired\_generation: number

formatint64

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_create_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20desired_generation">Link to this property</a>

<details>

<summary>

desired\_state: "active"| "inactive"

</summary>

One of the following:

"active"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_create_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20desired_state%20%3E%20(member)%200">Link to this property</a>

"inactive"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_create_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20desired_state%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_create_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20desired_state">Link to this property</a>

expires\_at: string| null

formatdate-time

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_create_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20expires_at">Link to this property</a>

</details>

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_create_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement">Link to this property</a>

evaluated\_at: string

Evaluation time; not the timestamp of the latest usage event.

formatdate-time

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_create_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20evaluated_at">Link to this property</a>

<details>

<summary>

status: "disabled"| "no\_current\_period"| "unavailable"| 2 more

Threshold evaluation, not proof of an edge cap. No current active period yields no\_current\_period for enabled policies; failed aggregate reads yield unavailable for enabled policies. Disabled policies report disabled. Neither no\_current\_period nor unavailable implies a zero balance or below-limit state. Operators may disable current-state reads, in which case current\_state is omitted.

</summary>

One of the following:

"disabled"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_create_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20status%20%3E%20(member)%200">Link to this property</a>

"no\_current\_period"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_create_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20status%20%3E%20(member)%201">Link to this property</a>

"unavailable"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_create_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20status%20%3E%20(member)%202">Link to this property</a>

"below\_limit"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_create_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20status%20%3E%20(member)%203">Link to this property</a>

"limit\_reached"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_create_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20status%20%3E%20(member)%204">Link to this property</a>

</details>

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_create_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20status">Link to this property</a>

</details>

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_create_response%20%3E%20(schema)%20%3E%20(property)%20current_state">Link to this property</a>

</details>

[Link to this property](<#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_create_response%20%3E%20(schema)>)

<details>

<summary>

SpendPolicyGetResponse {id, account\_id, action, 7 more }

A spend policy.

</summary>

id: string

The unique identifier of the spend policy.

formatuuid

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_get_response%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

account\_id: number

Internal numeric ID of the account that owns the policy. This is not the account tag used in the path.

formatint64

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_get_response%20%3E%20(schema)%20%3E%20(property)%20account_id">Link to this property</a>

<details>

<summary>

action: "notification"| "usage\_block"

The action taken when the threshold is reached. <code>notification</code> sends an email to <code>notification_email</code>. <code>usage_block</code> 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.

</summary>

One of the following:

"notification"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_get_response%20%3E%20(schema)%20%3E%20(property)%20action%20%3E%20(member)%200">Link to this property</a>

"usage\_block"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_get_response%20%3E%20(schema)%20%3E%20(property)%20action%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_get_response%20%3E%20(schema)%20%3E%20(property)%20action">Link to this property</a>

enabled: boolean

Whether the policy is evaluated.

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_get_response%20%3E%20(schema)%20%3E%20(property)%20enabled">Link to this property</a>

name: string

Display name of the policy.

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_get_response%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

notification\_email: string

Email address that receives notifications. An empty string when none is set.

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_get_response%20%3E%20(schema)%20%3E%20(property)%20notification_email">Link to this property</a>

<details>

<summary>

product\_id: "workers"| "durable\_objects"

The product the policy applies to: <code>workers</code> or <code>durable_objects</code>. Each product’s balance and policies are separate. Both products support <code>notification</code> and <code>usage_block</code> policies on create and update.

</summary>

One of the following:

"workers"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_get_response%20%3E%20(schema)%20%3E%20(property)%20product_id%20%3E%20(member)%200">Link to this property</a>

"durable\_objects"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_get_response%20%3E%20(schema)%20%3E%20(property)%20product_id%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_get_response%20%3E%20(schema)%20%3E%20(property)%20product_id">Link to this property</a>

threshold\_cents: number

The spend threshold for the current billing period, in US cents.

formatint64

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_get_response%20%3E%20(schema)%20%3E%20(property)%20threshold_cents">Link to this property</a>

version: number

Optimistic-concurrency version. It starts at 1 and goes up by one on every update or delete. This value is also returned in <code>ETag</code>.

formatint64

minimum1

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_get_response%20%3E%20(schema)%20%3E%20(property)%20version">Link to this property</a>

<details>

<summary>

current\_state?: CurrentState {balance\_cents, billing\_period\_end, billing\_period\_start, 3 more }

Read-only state on list/get responses, evaluated from the latest owning projector snapshot at request time, independently of the API replica. Configuration enabled/version/ETag do not change when a cycle rolls over. Audit history remains unchanged. Missing during a rolling upgrade or on mutation responses; clients must treat missing state as unavailable. Balances are asynchronous estimates, not a synchronous usage read.

</summary>

balance\_cents: number| null

formatint64

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_get_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20balance_cents">Link to this property</a>

billing\_period\_end: string| null

formatdate-time

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_get_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20billing_period_end">Link to this property</a>

billing\_period\_start: string| null

formatdate-time

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_get_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20billing_period_start">Link to this property</a>

<details>

<summary>

enforcement: Enforcement| null

Durable desired cap and delivery bookkeeping for this policy, or null if no owned effect exists. Separate from threshold evaluation: pending/leased/retry can lag the new billing period. Succeeded with equal generations means delivery completed, not an EWC readback.

</summary>

applied\_generation: number

formatint64

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_get_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20applied_generation">Link to this property</a>

<details>

<summary>

delivery\_status: "pending"| "leased"| "retry"| "succeeded"

</summary>

One of the following:

"pending"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_get_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20delivery_status%20%3E%20(member)%200">Link to this property</a>

"leased"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_get_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20delivery_status%20%3E%20(member)%201">Link to this property</a>

"retry"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_get_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20delivery_status%20%3E%20(member)%202">Link to this property</a>

"succeeded"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_get_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20delivery_status%20%3E%20(member)%203">Link to this property</a>

</details>

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_get_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20delivery_status">Link to this property</a>

desired\_generation: number

formatint64

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_get_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20desired_generation">Link to this property</a>

<details>

<summary>

desired\_state: "active"| "inactive"

</summary>

One of the following:

"active"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_get_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20desired_state%20%3E%20(member)%200">Link to this property</a>

"inactive"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_get_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20desired_state%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_get_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20desired_state">Link to this property</a>

expires\_at: string| null

formatdate-time

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_get_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20expires_at">Link to this property</a>

</details>

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_get_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement">Link to this property</a>

evaluated\_at: string

Evaluation time; not the timestamp of the latest usage event.

formatdate-time

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_get_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20evaluated_at">Link to this property</a>

<details>

<summary>

status: "disabled"| "no\_current\_period"| "unavailable"| 2 more

Threshold evaluation, not proof of an edge cap. No current active period yields no\_current\_period for enabled policies; failed aggregate reads yield unavailable for enabled policies. Disabled policies report disabled. Neither no\_current\_period nor unavailable implies a zero balance or below-limit state. Operators may disable current-state reads, in which case current\_state is omitted.

</summary>

One of the following:

"disabled"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_get_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20status%20%3E%20(member)%200">Link to this property</a>

"no\_current\_period"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_get_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20status%20%3E%20(member)%201">Link to this property</a>

"unavailable"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_get_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20status%20%3E%20(member)%202">Link to this property</a>

"below\_limit"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_get_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20status%20%3E%20(member)%203">Link to this property</a>

"limit\_reached"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_get_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20status%20%3E%20(member)%204">Link to this property</a>

</details>

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_get_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20status">Link to this property</a>

</details>

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_get_response%20%3E%20(schema)%20%3E%20(property)%20current_state">Link to this property</a>

</details>

[Link to this property](<#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_get_response%20%3E%20(schema)>)

<details>

<summary>

SpendPolicyUpdateResponse {id, account\_id, action, 7 more }

A spend policy.

</summary>

id: string

The unique identifier of the spend policy.

formatuuid

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_update_response%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

account\_id: number

Internal numeric ID of the account that owns the policy. This is not the account tag used in the path.

formatint64

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_update_response%20%3E%20(schema)%20%3E%20(property)%20account_id">Link to this property</a>

<details>

<summary>

action: "notification"| "usage\_block"

The action taken when the threshold is reached. <code>notification</code> sends an email to <code>notification_email</code>. <code>usage_block</code> 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.

</summary>

One of the following:

"notification"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_update_response%20%3E%20(schema)%20%3E%20(property)%20action%20%3E%20(member)%200">Link to this property</a>

"usage\_block"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_update_response%20%3E%20(schema)%20%3E%20(property)%20action%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_update_response%20%3E%20(schema)%20%3E%20(property)%20action">Link to this property</a>

enabled: boolean

Whether the policy is evaluated.

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_update_response%20%3E%20(schema)%20%3E%20(property)%20enabled">Link to this property</a>

name: string

Display name of the policy.

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_update_response%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

notification\_email: string

Email address that receives notifications. An empty string when none is set.

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_update_response%20%3E%20(schema)%20%3E%20(property)%20notification_email">Link to this property</a>

<details>

<summary>

product\_id: "workers"| "durable\_objects"

The product the policy applies to: <code>workers</code> or <code>durable_objects</code>. Each product’s balance and policies are separate. Both products support <code>notification</code> and <code>usage_block</code> policies on create and update.

</summary>

One of the following:

"workers"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_update_response%20%3E%20(schema)%20%3E%20(property)%20product_id%20%3E%20(member)%200">Link to this property</a>

"durable\_objects"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_update_response%20%3E%20(schema)%20%3E%20(property)%20product_id%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_update_response%20%3E%20(schema)%20%3E%20(property)%20product_id">Link to this property</a>

threshold\_cents: number

The spend threshold for the current billing period, in US cents.

formatint64

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_update_response%20%3E%20(schema)%20%3E%20(property)%20threshold_cents">Link to this property</a>

version: number

Optimistic-concurrency version. It starts at 1 and goes up by one on every update or delete. This value is also returned in <code>ETag</code>.

formatint64

minimum1

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_update_response%20%3E%20(schema)%20%3E%20(property)%20version">Link to this property</a>

<details>

<summary>

current\_state?: CurrentState {balance\_cents, billing\_period\_end, billing\_period\_start, 3 more }

Read-only state on list/get responses, evaluated from the latest owning projector snapshot at request time, independently of the API replica. Configuration enabled/version/ETag do not change when a cycle rolls over. Audit history remains unchanged. Missing during a rolling upgrade or on mutation responses; clients must treat missing state as unavailable. Balances are asynchronous estimates, not a synchronous usage read.

</summary>

balance\_cents: number| null

formatint64

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_update_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20balance_cents">Link to this property</a>

billing\_period\_end: string| null

formatdate-time

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_update_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20billing_period_end">Link to this property</a>

billing\_period\_start: string| null

formatdate-time

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_update_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20billing_period_start">Link to this property</a>

<details>

<summary>

enforcement: Enforcement| null

Durable desired cap and delivery bookkeeping for this policy, or null if no owned effect exists. Separate from threshold evaluation: pending/leased/retry can lag the new billing period. Succeeded with equal generations means delivery completed, not an EWC readback.

</summary>

applied\_generation: number

formatint64

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_update_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20applied_generation">Link to this property</a>

<details>

<summary>

delivery\_status: "pending"| "leased"| "retry"| "succeeded"

</summary>

One of the following:

"pending"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_update_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20delivery_status%20%3E%20(member)%200">Link to this property</a>

"leased"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_update_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20delivery_status%20%3E%20(member)%201">Link to this property</a>

"retry"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_update_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20delivery_status%20%3E%20(member)%202">Link to this property</a>

"succeeded"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_update_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20delivery_status%20%3E%20(member)%203">Link to this property</a>

</details>

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_update_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20delivery_status">Link to this property</a>

desired\_generation: number

formatint64

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_update_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20desired_generation">Link to this property</a>

<details>

<summary>

desired\_state: "active"| "inactive"

</summary>

One of the following:

"active"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_update_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20desired_state%20%3E%20(member)%200">Link to this property</a>

"inactive"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_update_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20desired_state%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_update_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20desired_state">Link to this property</a>

expires\_at: string| null

formatdate-time

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_update_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20expires_at">Link to this property</a>

</details>

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_update_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement">Link to this property</a>

evaluated\_at: string

Evaluation time; not the timestamp of the latest usage event.

formatdate-time

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_update_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20evaluated_at">Link to this property</a>

<details>

<summary>

status: "disabled"| "no\_current\_period"| "unavailable"| 2 more

Threshold evaluation, not proof of an edge cap. No current active period yields no\_current\_period for enabled policies; failed aggregate reads yield unavailable for enabled policies. Disabled policies report disabled. Neither no\_current\_period nor unavailable implies a zero balance or below-limit state. Operators may disable current-state reads, in which case current\_state is omitted.

</summary>

One of the following:

"disabled"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_update_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20status%20%3E%20(member)%200">Link to this property</a>

"no\_current\_period"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_update_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20status%20%3E%20(member)%201">Link to this property</a>

"unavailable"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_update_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20status%20%3E%20(member)%202">Link to this property</a>

"below\_limit"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_update_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20status%20%3E%20(member)%203">Link to this property</a>

"limit\_reached"

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_update_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20status%20%3E%20(member)%204">Link to this property</a>

</details>

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_update_response%20%3E%20(schema)%20%3E%20(property)%20current_state%20%3E%20(property)%20status">Link to this property</a>

</details>

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_update_response%20%3E%20(schema)%20%3E%20(property)%20current_state">Link to this property</a>

</details>

[Link to this property](<#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_update_response%20%3E%20(schema)>)

<details>

<summary>

SpendPolicyDeleteResponse {id }

</summary>

id: string

The unique identifier of the spend policy.

formatuuid

<a href="#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_delete_response%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

</details>

[Link to this property](<#(resource)%20billing.spend_policies%20%3E%20(model)%20spend_policy_delete_response%20%3E%20(schema)>)

#### Spend PoliciesAudit

##### [List Spend Policy Audit Entries](https://developers.cloudflare.com/api/typescript/resources/billing/subresources/spend_policies/subresources/audit/methods/list)

client.billing.spendPolicies.audit.list(stringpolicyID, AuditListParams {account\_id, limit, period } params, RequestOptionsoptions?): SinglePage< [AuditListResponse](<https://developers.cloudflare.com/api/typescript/resources/billing#(resource)%20billing.spend_policies.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)>) {action, balance\_cents, billing\_period\_end, 7 more } >

GET/accounts/{account\_id}/billing/spend-policies/{policy\_id}/audit

##### ModelsExpand Collapse

<details>

<summary>

AuditListResponse {action, balance\_cents, billing\_period\_end, 7 more }

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

</summary>

<details>

<summary>

action: "notification"| "usage\_block"

The action taken when the threshold is reached. <code>notification</code> sends an email to <code>notification_email</code>. <code>usage_block</code> 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.

</summary>

One of the following:

"notification"

<a href="#(resource)%20billing.spend_policies.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20action%20%3E%20(member)%200">Link to this property</a>

"usage\_block"

<a href="#(resource)%20billing.spend_policies.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20action%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20billing.spend_policies.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20action">Link to this property</a>

balance\_cents: number

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

formatint64

<a href="#(resource)%20billing.spend_policies.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20balance_cents">Link to this property</a>

billing\_period\_end: string

Exclusive end of the billing period that was evaluated.

formatdate-time

<a href="#(resource)%20billing.spend_policies.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20billing_period_end">Link to this property</a>

billing\_period\_start: string

Inclusive start of the billing period that was evaluated.

formatdate-time

<a href="#(resource)%20billing.spend_policies.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20billing_period_start">Link to this property</a>

created\_at: string

When the entry was recorded.

formatdate-time

<a href="#(resource)%20billing.spend_policies.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20created_at">Link to this property</a>

policy\_version: number

The policy <code>version</code> that was evaluated.

formatint64

<a href="#(resource)%20billing.spend_policies.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20policy_version">Link to this property</a>

reason: string

A human-readable explanation of the trigger.

<a href="#(resource)%20billing.spend_policies.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20reason">Link to this property</a>

<details>

<summary>

source: "kafka"| "policy\_revision"

What caused the evaluation. <code>kafka</code> means a balance update. <code>policy_revision</code> means a change to the policy.

</summary>

One of the following:

"kafka"

<a href="#(resource)%20billing.spend_policies.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20source%20%3E%20(member)%200">Link to this property</a>

"policy\_revision"

<a href="#(resource)%20billing.spend_policies.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20source%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20billing.spend_policies.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20source">Link to this property</a>

threshold\_cents: number

The policy threshold at evaluation time, in US cents.

formatint64

<a href="#(resource)%20billing.spend_policies.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20threshold_cents">Link to this property</a>

trigger: string

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

<a href="#(resource)%20billing.spend_policies.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)%20%3E%20(property)%20trigger">Link to this property</a>

</details>

[Link to this property](<#(resource)%20billing.spend_policies.audit%20%3E%20(model)%20audit_list_response%20%3E%20(schema)>)

#### Spend PoliciesActivity

##### [List Spend Policy Activity](https://developers.cloudflare.com/api/typescript/resources/billing/subresources/spend_policies/subresources/activity/methods/list)

client.billing.spendPolicies.activity.list(ActivityListParams {account\_id, cursor, limit, period } params, RequestOptionsoptions?): CursorPaginationAfter< [ActivityListResponse](<https://developers.cloudflare.com/api/typescript/resources/billing#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)>) {id, action, actor, 5 more } >

GET/accounts/{account\_id}/billing/spend-policies/activity

##### ModelsExpand Collapse

<details>

<summary>

ActivityListResponse {id, action, actor, 5 more }

</summary>

id: string

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

<details>

<summary>

action: "created"| "updated"| "enabled"| 2 more

</summary>

One of the following:

"created"

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20action%20%3E%20(member)%200">Link to this property</a>

"updated"

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20action%20%3E%20(member)%201">Link to this property</a>

"enabled"

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20action%20%3E%20(member)%202">Link to this property</a>

"disabled"

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20action%20%3E%20(member)%203">Link to this property</a>

"deleted"

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20action%20%3E%20(member)%204">Link to this property</a>

</details>

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20action">Link to this property</a>

actor: string

Verified actor identifier, unknown when absent, or trusted internal actor.

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20actor">Link to this property</a>

<details>

<summary>

details: Details {after, before }

</summary>

<details>

<summary>

after?: After {id, account\_id, action, 7 more }

A spend policy.

</summary>

id: string

The unique identifier of the spend policy.

formatuuid

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20after%20%3E%20(property)%20id">Link to this property</a>

account\_id: number

Internal numeric ID of the account that owns the policy. This is not the account tag used in the path.

formatint64

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20after%20%3E%20(property)%20account_id">Link to this property</a>

<details>

<summary>

action: "notification"| "usage\_block"

The action taken when the threshold is reached. <code>notification</code> sends an email to <code>notification_email</code>. <code>usage_block</code> 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.

</summary>

One of the following:

"notification"

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20after%20%3E%20(property)%20action%20%3E%20(member)%200">Link to this property</a>

"usage\_block"

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20after%20%3E%20(property)%20action%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20after%20%3E%20(property)%20action">Link to this property</a>

enabled: boolean

Whether the policy is evaluated.

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20after%20%3E%20(property)%20enabled">Link to this property</a>

name: string

Display name of the policy.

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20after%20%3E%20(property)%20name">Link to this property</a>

notification\_email: string

Email address that receives notifications. An empty string when none is set.

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20after%20%3E%20(property)%20notification_email">Link to this property</a>

<details>

<summary>

product\_id: "workers"| "durable\_objects"

The product the policy applies to: <code>workers</code> or <code>durable_objects</code>. Each product’s balance and policies are separate. Both products support <code>notification</code> and <code>usage_block</code> policies on create and update.

</summary>

One of the following:

"workers"

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20after%20%3E%20(property)%20product_id%20%3E%20(member)%200">Link to this property</a>

"durable\_objects"

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20after%20%3E%20(property)%20product_id%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20after%20%3E%20(property)%20product_id">Link to this property</a>

threshold\_cents: number

The spend threshold for the current billing period, in US cents.

formatint64

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20after%20%3E%20(property)%20threshold_cents">Link to this property</a>

version: number

Optimistic-concurrency version. It starts at 1 and goes up by one on every update or delete. This value is also returned in <code>ETag</code>.

formatint64

minimum1

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20after%20%3E%20(property)%20version">Link to this property</a>

<details>

<summary>

current\_state?: CurrentState {balance\_cents, billing\_period\_end, billing\_period\_start, 3 more }

Read-only state on list/get responses, evaluated from the latest owning projector snapshot at request time, independently of the API replica. Configuration enabled/version/ETag do not change when a cycle rolls over. Audit history remains unchanged. Missing during a rolling upgrade or on mutation responses; clients must treat missing state as unavailable. Balances are asynchronous estimates, not a synchronous usage read.

</summary>

balance\_cents: number| null

formatint64

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20after%20%3E%20(property)%20current_state%20%3E%20(property)%20balance_cents">Link to this property</a>

billing\_period\_end: string| null

formatdate-time

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20after%20%3E%20(property)%20current_state%20%3E%20(property)%20billing_period_end">Link to this property</a>

billing\_period\_start: string| null

formatdate-time

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20after%20%3E%20(property)%20current_state%20%3E%20(property)%20billing_period_start">Link to this property</a>

<details>

<summary>

enforcement: Enforcement| null

Durable desired cap and delivery bookkeeping for this policy, or null if no owned effect exists. Separate from threshold evaluation: pending/leased/retry can lag the new billing period. Succeeded with equal generations means delivery completed, not an EWC readback.

</summary>

applied\_generation: number

formatint64

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20after%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20applied_generation">Link to this property</a>

<details>

<summary>

delivery\_status: "pending"| "leased"| "retry"| "succeeded"

</summary>

One of the following:

"pending"

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20after%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20delivery_status%20%3E%20(member)%200">Link to this property</a>

"leased"

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20after%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20delivery_status%20%3E%20(member)%201">Link to this property</a>

"retry"

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20after%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20delivery_status%20%3E%20(member)%202">Link to this property</a>

"succeeded"

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20after%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20delivery_status%20%3E%20(member)%203">Link to this property</a>

</details>

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20after%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20delivery_status">Link to this property</a>

desired\_generation: number

formatint64

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20after%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20desired_generation">Link to this property</a>

<details>

<summary>

desired\_state: "active"| "inactive"

</summary>

One of the following:

"active"

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20after%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20desired_state%20%3E%20(member)%200">Link to this property</a>

"inactive"

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20after%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20desired_state%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20after%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20desired_state">Link to this property</a>

expires\_at: string| null

formatdate-time

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20after%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20expires_at">Link to this property</a>

</details>

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20after%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement">Link to this property</a>

evaluated\_at: string

Evaluation time; not the timestamp of the latest usage event.

formatdate-time

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20after%20%3E%20(property)%20current_state%20%3E%20(property)%20evaluated_at">Link to this property</a>

<details>

<summary>

status: "disabled"| "no\_current\_period"| "unavailable"| 2 more

Threshold evaluation, not proof of an edge cap. No current active period yields no\_current\_period for enabled policies; failed aggregate reads yield unavailable for enabled policies. Disabled policies report disabled. Neither no\_current\_period nor unavailable implies a zero balance or below-limit state. Operators may disable current-state reads, in which case current\_state is omitted.

</summary>

One of the following:

"disabled"

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20after%20%3E%20(property)%20current_state%20%3E%20(property)%20status%20%3E%20(member)%200">Link to this property</a>

"no\_current\_period"

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20after%20%3E%20(property)%20current_state%20%3E%20(property)%20status%20%3E%20(member)%201">Link to this property</a>

"unavailable"

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20after%20%3E%20(property)%20current_state%20%3E%20(property)%20status%20%3E%20(member)%202">Link to this property</a>

"below\_limit"

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20after%20%3E%20(property)%20current_state%20%3E%20(property)%20status%20%3E%20(member)%203">Link to this property</a>

"limit\_reached"

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20after%20%3E%20(property)%20current_state%20%3E%20(property)%20status%20%3E%20(member)%204">Link to this property</a>

</details>

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20after%20%3E%20(property)%20current_state%20%3E%20(property)%20status">Link to this property</a>

</details>

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20after%20%3E%20(property)%20current_state">Link to this property</a>

</details>

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20after">Link to this property</a>

<details>

<summary>

before?: Before| null

Prior configuration; null on creation or if a previous revision is unavailable.

</summary>

id: string

The unique identifier of the spend policy.

formatuuid

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20before%20%3E%20(property)%20id">Link to this property</a>

account\_id: number

Internal numeric ID of the account that owns the policy. This is not the account tag used in the path.

formatint64

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20before%20%3E%20(property)%20account_id">Link to this property</a>

<details>

<summary>

action: "notification"| "usage\_block"

The action taken when the threshold is reached. <code>notification</code> sends an email to <code>notification_email</code>. <code>usage_block</code> 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.

</summary>

One of the following:

"notification"

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20before%20%3E%20(property)%20action%20%3E%20(member)%200">Link to this property</a>

"usage\_block"

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20before%20%3E%20(property)%20action%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20before%20%3E%20(property)%20action">Link to this property</a>

enabled: boolean

Whether the policy is evaluated.

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20before%20%3E%20(property)%20enabled">Link to this property</a>

name: string

Display name of the policy.

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20before%20%3E%20(property)%20name">Link to this property</a>

notification\_email: string

Email address that receives notifications. An empty string when none is set.

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20before%20%3E%20(property)%20notification_email">Link to this property</a>

<details>

<summary>

product\_id: "workers"| "durable\_objects"

The product the policy applies to: <code>workers</code> or <code>durable_objects</code>. Each product’s balance and policies are separate. Both products support <code>notification</code> and <code>usage_block</code> policies on create and update.

</summary>

One of the following:

"workers"

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20before%20%3E%20(property)%20product_id%20%3E%20(member)%200">Link to this property</a>

"durable\_objects"

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20before%20%3E%20(property)%20product_id%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20before%20%3E%20(property)%20product_id">Link to this property</a>

threshold\_cents: number

The spend threshold for the current billing period, in US cents.

formatint64

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20before%20%3E%20(property)%20threshold_cents">Link to this property</a>

version: number

Optimistic-concurrency version. It starts at 1 and goes up by one on every update or delete. This value is also returned in <code>ETag</code>.

formatint64

minimum1

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20before%20%3E%20(property)%20version">Link to this property</a>

<details>

<summary>

current\_state?: CurrentState {balance\_cents, billing\_period\_end, billing\_period\_start, 3 more }

Read-only state on list/get responses, evaluated from the latest owning projector snapshot at request time, independently of the API replica. Configuration enabled/version/ETag do not change when a cycle rolls over. Audit history remains unchanged. Missing during a rolling upgrade or on mutation responses; clients must treat missing state as unavailable. Balances are asynchronous estimates, not a synchronous usage read.

</summary>

balance\_cents: number| null

formatint64

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20before%20%3E%20(property)%20current_state%20%3E%20(property)%20balance_cents">Link to this property</a>

billing\_period\_end: string| null

formatdate-time

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20before%20%3E%20(property)%20current_state%20%3E%20(property)%20billing_period_end">Link to this property</a>

billing\_period\_start: string| null

formatdate-time

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20before%20%3E%20(property)%20current_state%20%3E%20(property)%20billing_period_start">Link to this property</a>

<details>

<summary>

enforcement: Enforcement| null

Durable desired cap and delivery bookkeeping for this policy, or null if no owned effect exists. Separate from threshold evaluation: pending/leased/retry can lag the new billing period. Succeeded with equal generations means delivery completed, not an EWC readback.

</summary>

applied\_generation: number

formatint64

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20before%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20applied_generation">Link to this property</a>

<details>

<summary>

delivery\_status: "pending"| "leased"| "retry"| "succeeded"

</summary>

One of the following:

"pending"

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20before%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20delivery_status%20%3E%20(member)%200">Link to this property</a>

"leased"

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20before%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20delivery_status%20%3E%20(member)%201">Link to this property</a>

"retry"

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20before%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20delivery_status%20%3E%20(member)%202">Link to this property</a>

"succeeded"

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20before%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20delivery_status%20%3E%20(member)%203">Link to this property</a>

</details>

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20before%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20delivery_status">Link to this property</a>

desired\_generation: number

formatint64

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20before%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20desired_generation">Link to this property</a>

<details>

<summary>

desired\_state: "active"| "inactive"

</summary>

One of the following:

"active"

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20before%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20desired_state%20%3E%20(member)%200">Link to this property</a>

"inactive"

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20before%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20desired_state%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20before%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20desired_state">Link to this property</a>

expires\_at: string| null

formatdate-time

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20before%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement%20%3E%20(property)%20expires_at">Link to this property</a>

</details>

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20before%20%3E%20(property)%20current_state%20%3E%20(property)%20enforcement">Link to this property</a>

evaluated\_at: string

Evaluation time; not the timestamp of the latest usage event.

formatdate-time

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20before%20%3E%20(property)%20current_state%20%3E%20(property)%20evaluated_at">Link to this property</a>

<details>

<summary>

status: "disabled"| "no\_current\_period"| "unavailable"| 2 more

Threshold evaluation, not proof of an edge cap. No current active period yields no\_current\_period for enabled policies; failed aggregate reads yield unavailable for enabled policies. Disabled policies report disabled. Neither no\_current\_period nor unavailable implies a zero balance or below-limit state. Operators may disable current-state reads, in which case current\_state is omitted.

</summary>

One of the following:

"disabled"

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20before%20%3E%20(property)%20current_state%20%3E%20(property)%20status%20%3E%20(member)%200">Link to this property</a>

"no\_current\_period"

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20before%20%3E%20(property)%20current_state%20%3E%20(property)%20status%20%3E%20(member)%201">Link to this property</a>

"unavailable"

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20before%20%3E%20(property)%20current_state%20%3E%20(property)%20status%20%3E%20(member)%202">Link to this property</a>

"below\_limit"

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20before%20%3E%20(property)%20current_state%20%3E%20(property)%20status%20%3E%20(member)%203">Link to this property</a>

"limit\_reached"

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20before%20%3E%20(property)%20current_state%20%3E%20(property)%20status%20%3E%20(member)%204">Link to this property</a>

</details>

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20before%20%3E%20(property)%20current_state%20%3E%20(property)%20status">Link to this property</a>

</details>

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20before%20%3E%20(property)%20current_state">Link to this property</a>

</details>

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details%20%3E%20(property)%20before">Link to this property</a>

</details>

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20details">Link to this property</a>

occurred\_at: string

formatdate-time

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20occurred_at">Link to this property</a>

policy\_id: string

The unique identifier of the spend policy.

formatuuid

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20policy_id">Link to this property</a>

policy\_version: number

formatint64

minimum1

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20policy_version">Link to this property</a>

product\_id: string

<a href="#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)%20%3E%20(property)%20product_id">Link to this property</a>

</details>

[Link to this property](<#(resource)%20billing.spend_policies.activity%20%3E%20(model)%20activity_list_response%20%3E%20(schema)>)