---
title: "Set the credit warning level"
method: PATCH
path: "/accounts/credit-warning"
tags: ["Usage and Billing"]
---

# Set the credit warning level

`PATCH /accounts/credit-warning`

## Request

- Base URL: `https://api.quiva.ai`
- URL: `https://api.quiva.ai/accounts/credit-warning`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/quivaworks/apis/quiva-ai-gateway/docs/accounts/credit-warning/patch.ts> (a function with typed inputs; its response is checked against the schema)

Sets the remaining-credit level at which the account is warned. Zero restores the platform default; values between 0 and 1 are refused. Admin, root or billing role.

## Request body

- object
  - `threshold` number, required: Whole number of credits, or 0 for the default

## Response `200`

Success

- object
  - `data` object

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: Role not allowed

## Changes

- **2026-11-12** `700eb1ace61a`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway/changes/accounts/credit-warning/patch.md)

---

[API](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway.md) - [All operations](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway/llms.txt) - [OpenAPI document](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway/revisions/700eb1ace61a?raw)
