v4
latestOpenAPI 3.1.02026-08-01207318738.7 KBAI
Set individual users' AI credit limits
Set individual users' AI credit limits in bulk. Each entry names a user (userId) and either sets an individual limit (creditLimit: a non-negative number, or null for unlimited) or removes one (useDefaultLimit: true) so the user follows the org default. Each userId may appear at most once and must be a member of the organization. All updates are applied in one transaction, so either every entry takes effect or none do — an invalid userId fails the whole request with a 404 naming it. Requires the same manage-user-attributes permission as the AI credit limit settings pages.
patch/api/v1/ai/credit-controls/users
Request body
Example request
{
"users": [
{
"creditLimit": 50,
"userId": "f4a2b3c8-0d1e-4f5a-9b6c-7d8e9f0a1b2c"
}
]
}Response
All entries applied. Returns each user's effective limit, in request order.
Example response
{
"users": [
{
"creditLimit": 50,
"userId": "f4a2b3c8-0d1e-4f5a-9b6c-7d8e9f0a1b2c"
}
]
}