---
title: "Set auto top-up"
method: PATCH
path: "/accounts/auto-topup"
tags: ["Usage and Billing"]
---

# Set auto top-up

`PATCH /accounts/auto-topup`

## Request

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

Sets the credit level that triggers an automatic top-up and the pack to buy. A zero `threshold` turns it off. Admin, root or billing role.

## Request body

- object
  - `threshold` number, required: Credit level that triggers a top-up; 0 disables
  - `pack` string: Credit pack key; required when threshold is above 0

## 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/auto-topup/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)
