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

# Set the team spend cap

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

## Request

- Base URL: `https://api.pioneer.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.pioneer.ai/v1/billing/team/{team_id}/spend-limits`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/pioneer/apis/brain-api/docs/v1/billing/team/:team_id/spend-limits/put.ts> (a function with typed inputs; its response is checked against the schema)

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** `0e5e86e2bae5`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/pioneer/apis/brain-api/changes/v1/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/0e5e86e2bae5?raw)
