Set Usage Configuration
Usage API
Set Usage Configuration
Set or clear per-user add-on credit caps, with the ability to apply them across a team, group, or individual user for enterprise billing management.
POST
Set Usage Configuration
Documentation Index
Fetch the complete documentation index at: https://docs.windsurf.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Set or clear per-user usage caps on add-on credits for your organization. Caps are always applied on a per-user basis. When you specify a team or group scope, the cap is applied individually to each user within that team or group—it does not set a shared cap for the entire team or group.Request
Your service key with “Billing Write” permissions
Credit Cap Configuration (Choose One)
Set to
true to clear the existing add-on credit capSet a new add-on credit cap (integer value)
You must provide either
clear_add_on_credit_cap or set_add_on_credit_cap, but not both.Scope Configuration (Choose One)
Set to
true to apply the per-user cap to every user on the teamApply the per-user cap to every user in a specific group by providing the group ID
Apply the configuration to a specific user by providing their email address
You must provide one of
team_level, group_id, or user_email to define the scope.Example Request - Set Per-User Credit Cap for All Users on Team
Example Request - Set Per-User Credit Cap for All Users in a Group
Example Request - Set Credit Cap for User
Example Request - Clear Credit Cap
Response
The response body is empty. A200 status code indicates the operation was successful.
Error Responses
Common error scenarios:- Invalid service key or insufficient permissions
- Both
clear_add_on_credit_capandset_add_on_credit_capprovided - Neither
clear_add_on_credit_capnorset_add_on_credit_capprovided - Multiple scope parameters provided
- No scope parameter provided
- Invalid group ID or user email
- Rate limit exceeded