PUT
/api/agent-network/budget-rules/{ruleId}Replace an Agent Network budget rule
Replaces an existing account-level budget rule. Supply the required name and limits, including both token and budget limits, and set target_groups or target_users to define the rule's scope. A 200 response returns the updated rule with its targets, limits, enforcement state, and timestamps.
ruleIdstringrequired
The unique identifier of the budget rule to replace.
Budget rule configuration. name and limits are required.
enabledbooleanoptional
Whether the rule is enforced. Defaults to true on create.
limitsobjectrequired
Token and budget caps attached directly to the policy. These compose with any guardrail-level checks.
namestringrequired
Display name for the budget rule.
target_groupsarray<string>optional
NetBird group ids the rule binds. Empty plus empty target_users means account-wide.
target_usersarray<string>optional
NetBird user ids the rule binds directly.
200Returns the updated budget rule, including its ID, name, enforcement state, targets, limits, and creation and update timestamps.
created_atstringrequired
enabledbooleanrequired
Whether the rule is enforced.
idstringrequired
Budget rule ID.
limitsobjectrequired
Token and budget caps attached directly to the policy. These compose with any guardrail-level checks.
namestringrequired
Display name for the budget rule.
target_groupsarray<string>required
NetBird group ids the rule binds. Empty plus empty target_users means account-wide.
target_usersarray<string>required
NetBird user ids the rule binds directly.
updated_atstringrequired
400Returned when the request is malformed or a required field or value fails validation.
401Returned when authentication is missing or invalid.
403Returned when the authenticated user is not permitted to update the budget rule.
404Returned when the budget rule does not exist.
500Returned when an internal server error occurs.
Error handling
A 400 is returned when the request is malformed or invalid. A 401 is returned when authentication is missing or invalid; a 403 is returned when access is forbidden; a 404 is returned when the ruleId path parameter does not identify an existing budget rule; a 500 is returned for an internal server error. name and limits are required, and limits must include both token_limit and budget_limit.