---
title: "Set the team spend cap"
method: PUT
path: "/billing/team/{team_id}/spend-limits"
tags: ["billing"]
---

# Set the team spend cap

`PUT /billing/team/{team_id}/spend-limits`

Create or replace the team-wide spend cap. Requires MANAGE_BILLING.

Args:
    team_id: Billed team.
    request: Window and cap.
    auth: Caller.

Returns:
    The stored cap.

## Path parameters

- `team_id` string, required

## Request body

- UpsertSpendLimitRequest — Set or replace the one spend cap at a team or project identity.
  - `window_kind` 'daily' | 'monthly', required — One window per identity. Setting monthly replaces a daily row.
  - `cap_usd` union, required — Positive spend ceiling in dollars. Not teams.max_monthly_spend.
    - number
    - string

## Response `200`

Successful Response

- SpendLimitResponse — Live spend-limit config at one identity. Unset when configured is false.
  - `configured` boolean, required
  - `scope` 'team' | 'project', required
  - `team_id` string, required
  - `project_id` string, nullable
  - `window_kind` 'daily' | 'monthly', nullable
  - `cap_usd` string, nullable
  - `set_by` string, nullable
  - `updated_at` string, date-time, nullable

## Other responses

- `422` — Validation Error

## Changes

- **2026-09-24** `1cffaad2a921` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/pioneer/apis/brain-api/changes/billing/team/:team_id/spend-limits/put.md)

---

[API](https://skmtc.dev/pioneer/apis/brain-api.md) · [All operations](https://skmtc.dev/pioneer/apis/brain-api/llms.txt) · [OpenAPI document](https://skmtc.dev/pioneer/apis/brain-api/revisions/1cffaad2a921?raw)
