---
title: "Set the credit alert thresholds, the soft-cap action and where alerts go"
method: PUT
path: "/api/orgs/{orgId}/credit-controls"
tags: ["credits"]
---

# Set the credit alert thresholds, the soft-cap action and where alerts go

`PUT /api/orgs/{orgId}/credit-controls`

## Request

- Base URL: `https://api.wizbi.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.wizbi.ai/api/orgs/{orgId}/credit-controls`
- Auth: none declared

`alertThresholdsPct` (up to 5, default 70/80/90/100) · `questionSoftAction`: `warn` (a note) or `ask` (a heavy question pauses at the soft cap and the person approves the rest) · `alertChannels`: e-mail on/off and a team room (one of `rooms`). WhatsApp alerts are the platform’s switch, not the org’s. `expectedVersion` refuses a write over a newer one (409). Needs the `budgets` component. Audited `credits.controls.put`.

## Path parameters

- `orgId` string, required

## Request body

- CreditControlsInput
  - `alertThresholdsPct` integer[]
  - `questionSoftAction` 'warn' | 'ask'
  - `alertChannels` object
    - `email` boolean
    - `room` string, nullable
  - `expectedVersion` integer

## Response `200`

OK.

- CreditControls
  - `alertThresholdsPct` integer[], required
  - `questionSoftAction` 'warn' | 'ask', required
  - `alertChannels` object, required
    - `email` boolean, required
    - `room` string, nullable, required
    - `whatsapp` boolean, required: Set by the platform only (owner approval).
  - `rooms` object[], required
    - `id` string, required
    - `label` string, nullable, required
  - `version` number, required

## Other responses

- `400`: A room that is not one of the org’s team rooms.
- `401`: No resolved context.
- `403`: Not an org admin (`forbidden`), or the component is off (`feature_disabled`).
- `409`: The settings changed since they were read (`version_conflict`).

---

[API](https://skmtc.dev/wizbi/apis/wizbi-core-api.md) · [All operations](https://skmtc.dev/wizbi/apis/wizbi-core-api/llms.txt) · [OpenAPI document](https://skmtc.dev/wizbi/apis/wizbi-core-api/revisions/5a47416c82ec?raw)
