Skip to navigation

Update CreditLimit

Beta

Change the monthly limit of an existing credit limit. The group of a limit cannot be changed; to move a limit to a different group, delete it and create a new one.

Notes

  • Requires tenant admin permission.
  • monthlyLimit must be a positive integer.
  • An unknown credit limit ID returns a 404.
  • Returns 403 if credit limits are not enabled for the tenant. Updating a team- or organization-scoped limit requires group credit limits to be enabled as well.
  • Use POST /credit-limit:preview-changes first to preview which users a lower limit would block.
  • When the limit changes, the change is recorded in the audit log and affected users’ effective limits are recomputed asynchronously.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

credit_limit_idstringRequired
ID of the CreditLimit.

Headers

EARLY-ACCESSstringOptional

Set to true to access beta operations via /api/v3.

Request

This endpoint expects an object.
monthlyLimitintegerRequired
The new maximum number of AI credits each user in the group may consume per month. Must be a positive integer.

Response

OK
__typenamestringOptional
createdAtstringOptionalformat: "datetime"
groupTypeenumOptional
Allowed values:
idstringOptional
modifiedAtstringOptionalformat: "datetime"
monthlyLimitintegerOptional
organizationobject or nullOptional
teamobject or nullOptional

Errors

400
Bad Request Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
429
Too Many Requests Error
500
Internal Server Error