---
title: "Create or update a workspace budget"
method: PUT
path: "/workspaces/{id}/budgets/{interval}"
tags: ["Workspaces"]
---

# Create or update a workspace budget

`PUT /workspaces/{id}/budgets/{interval}`

Create or update the budget for a given interval. Budget limits must strictly decrease as the interval narrows (lifetime > monthly > weekly > daily). [Management key](/docs/guides/overview/auth/management-api-keys) required.

## Path parameters

- `id` string, required — The workspace ID (UUID) or slug
- `interval` 'daily' | 'weekly' | 'monthly' | 'lifetime', required — Budget reset interval. Use "lifetime" for a one-time budget that never resets.

## Request body

- UpsertWorkspaceBudgetRequest
  - `limit_usd` number, double, required — Spending limit in USD. Must be greater than 0.

## Response `200`

Budget created or updated successfully

- UpsertWorkspaceBudgetResponse
  - `data` object, required — The created or updated budget
    - `created_at` string, required — ISO 8601 timestamp of when the budget was created
    - `id` string, uuid, required — Unique identifier for the budget
    - `limit_usd` number, double, required — Spending limit in USD for this interval
    - `reset_interval` 'daily' | 'weekly' | 'monthly' | 'null', nullable, required — Interval at which spend resets. Null means a lifetime (one-time) budget.
    - `updated_at` string, required — ISO 8601 timestamp of when the budget was last updated
    - `workspace_id` string, uuid, required — ID of the workspace the budget belongs to

## Other responses

- `400` — Bad Request - Invalid request parameters or malformed input
- `401` — Unauthorized - Authentication required or invalid credentials
- `404` — Not Found - Resource does not exist
- `500` — Internal Server Error - Unexpected server error

## Changes

- **2026-06-16** `bf763ee035d0` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/openrouterteam/apis/openrouter-api/changes/workspaces/:id/budgets/:interval/put.md)

---

[API](https://skmtc.dev/openrouterteam/apis/openrouter-api.md) · [All operations](https://skmtc.dev/openrouterteam/apis/openrouter-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/openrouterteam/openrouter-api/revisions/619a2678ecee/schema)
