---
title: "Set the spending cap."
method: POST
path: "/v1/billing/spending-cap/{tenant_id}"
tags: ["Billing"]
---

# Set the spending cap.

`POST /v1/billing/spending-cap/{tenant_id}`

## Request

- Base URL: `https://api.scalix.world`
- URL: `https://api.scalix.world/v1/billing/spending-cap/{tenant_id}`
- Auth: HTTP bearer

Accepts PUT, PATCH and POST on the same path; the body is the cap
configuration.

## Path parameters

- `tenant_id` string, required

## Request body

- SpendingCapRequest: Spending cap configuration.
  - `monthly_cap_cents` integer, required: Monthly spend cap, in cents.
  - `alert_threshold_pct` integer, nullable: Alert threshold as a percentage of the cap (e.g. 80 = alert at 80%).
  - `hard_limit` boolean, nullable: Hard-limit the org when the cap is reached (vs alert only).

## Response `200`

Spending cap set

## Other responses

- `400`: Invalid request
- `401`: Missing or invalid API key
- `403`: Not your org
- `500`: Internal error

---

[API](https://skmtc.dev/scalix/apis/scalix-cloud-api.md) · [All operations](https://skmtc.dev/scalix/apis/scalix-cloud-api/llms.txt) · [OpenAPI document](https://skmtc.dev/scalix/apis/scalix-cloud-api/revisions/2c04ca0a90bb?raw)
