Skip to main content
POST
/
v1
/
rules
/
{id}
/
reset-budget
Reset a rule budget
curl --request POST \
  --url https://api.scrip.dev/v1/rules/{id}/reset-budget \
  --header 'X-API-Key: <api-key>'
{
  "asset_id": "550e8400-e29b-41d4-a716-446655440000",
  "consumed": "4500.00",
  "cron_expression": "0 0 1 * *",
  "interval": "720h",
  "limit": "10000.00",
  "next_reset_at": "2026-03-01T00:00:00Z",
  "schedule_type": "CRON"
}
Resets a rule’s budget for a specific asset. The consumed amount is set back to zero and the next_reset_at timestamp advances to the next scheduled reset period. For lifetime budgets (those without a recurring reset interval), the consumed amount resets but no future next_reset_at is scheduled. This is useful when you need to manually refill a budget mid-cycle or correct a budget that was consumed by erroneous events.
For usage patterns and examples, see the Writing Rules guide.

Authorizations

X-API-Key
string
header
required

API key passed in the X-API-Key header.

Path Parameters

id
string<uuid>
required

Rule ID

Query Parameters

asset_id
string<uuid>
required

Asset ID to reset budget for

Response

Budget reset

asset_id
string<uuid>

Asset this budget constrains

Example:

"550e8400-e29b-41d4-a716-446655440000"

consumed
string

Amount consumed so far in the current period

Example:

"4500.00"

cron_expression
string

Cron expression for CRON-based resets (e.g., first of every month)

Example:

"0 0 1 * *"

interval
string

Duration for INTERVAL-based resets

Example:

"720h"

limit
string

Maximum allowed spend for this budget period

Example:

"10000.00"

next_reset_at
string<date-time>

When the budget next resets (null for lifetime budgets)

Example:

"2026-03-01T00:00:00Z"

schedule_type
string

Reset schedule type: CRON or INTERVAL (null for lifetime budgets)

Example:

"CRON"