AI

Set individual users' AI credit limits

Changed on

Set individual users' AI credit limits in bulk. Each entry names a user (userId) and sets their monthly limit (creditLimit: a non-negative number, or null for unlimited) or removes it (useDefaultLimit: true) so the user follows the org default; sets or removes their daily limit the same way (dailyCreditLimit / useDefaultDailyLimit: true, per UTC day, which requires per-user daily limits to be enabled); or both, never both keys of a pair. 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

  • Base URL
    https://omniapp.co (the document declares no server; this is the origin it was published from)
  • URL
    https://omniapp.co/api/v1/ai/credit-controls/users
  • Auth
    HTTP bearer

Request body

Example request

{
  "users": [
    {
      "creditLimit": 50,
      "dailyCreditLimit": 5,
      "userId": "f4a2b3c8-0d1e-4f5a-9b6c-7d8e9f0a1b2c"
    }
  ]
}

Response

All entries applied. Returns each user's effective limits, in request order.

Example response

{
  "users": [
    {
      "creditLimit": 50,
      "dailyCreditLimit": 5,
      "userId": "f4a2b3c8-0d1e-4f5a-9b6c-7d8e9f0a1b2c"
    }
  ]
}

Changes

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • breaking

      the // request property format changed from no format to uuid