Skip to main content
PATCH
Update Bandwidth Rule

Update Bandwidth Rule

Changes the threshold, volume, duration or label of a rule, or pauses and resumes it. Send only the fields you want to change; the others stay as they are. Changes apply from the next check. Requires the buy_bandwidth scope. The address of a rule cannot be changed. To move a rule to another address, delete it and create a new one.

Path parameters

number
required
Rule ID — the id from Create or List Bandwidth Rules

Request body

number
New threshold. From 1 to 1,000,000.
number
New bandwidth amount per refill. From 350 to 100,000.
string
New rental duration for future refills: "1h" or "1d". Rentals already bought keep their duration.
string
New label, up to 100 characters. An empty string removes the label.
string
"paused" to pause the rule, "active" to resume it. Resuming also clears stopped_reason and resets consecutive_failures to 0. A rule stopped for balance resumes on its own after a deposit, so you do not have to; if you resume it while the balance is still short, it stops again at the next check. stopped_insufficient_balance cannot be set directly.

Response

The updated rule, with the same fields as in List Bandwidth Rules.

Example

Response

Errors