billing

Set a project spend cap

Changed on

Create or replace the project spend cap. Requires MANAGE_BILLING.

Args: team_id: Billed team. project_id: Project on that team. request: Window and cap. auth: Caller.

Returns: The stored cap.

Raises: HTTPException: 404 when the project is missing, deleted, or not on the team.

put/v1/billing/team/{team_id}/projects/{project_id}/spend-limits

Request

Path parameters

team_idstring required
project_idstring required

Request body

window_kind'daily' | 'monthly' required

One window per identity. Setting monthly replaces a daily row.

Response

Successful Response

configuredboolean required
scope'team' | 'project' required
team_idstring required
project_idstring nullable
window_kind'daily' | 'monthly' nullable
cap_usdstring nullable
set_bystring nullable
updated_atstring date-time nullable

Changes