---
title: "Create a department budget"
method: POST
path: "/department-budgets"
tags: ["Gateway"]
---

# Create a department budget

`POST /department-budgets`

## Request

- Base URL: `https://api.phaseo.app/v1`
- URL: `https://api.phaseo.app/v1/department-budgets`
- Auth: HTTP bearer

Creates a daily, weekly, or monthly spend budget for one department. Once the department has used it, API-key requests that count toward the department return 429 key_limit_exceeded until the budget resets. Batch jobs, realtime sessions and OAuth requests are not blocked. If the budget check is briefly unavailable, requests are allowed rather than refused. Owners and admins get a mobile push at about 80% and at 100%.

## Request body

- DepartmentBudgetInput
  - `department_id` string, uuid, required
  - `interval` 'daily' | 'weekly' | 'monthly', required
  - `limit` number, double, required

## Response `201`

Department budget created

- DepartmentBudgetResponse
  - `data` DepartmentBudget, required: A department's spend budget. A department's spend is what the API keys linked to it cost, plus the keys its members created and their OAuth requests when those keys are not linked to a department. A member in several departments counts toward each.
    - `id` string, uuid, required
    - `workspace_id` string, uuid, required
    - `department_id` string, uuid, required
    - `department_name` string, nullable, required
    - `interval` 'daily' | 'weekly' | 'monthly', required
    - `limit` number, double, required
    - `limit_nanos` integer, required
    - `usage` number, double, required
    - `usage_nanos` integer, required
    - `remaining` number, double, required
    - `remaining_nanos` integer, required
    - `exceeded` boolean, required
    - `window_start` string, date-time, nullable
    - `reset_at` string, date-time, nullable
    - `created_by` string, uuid, nullable
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required

## Other responses

- `default`: Request failed

## Changes

- **2026-10-22** `dfb10c507ea9`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/phaseo/apis/phaseo-gateway-api/changes/department-budgets/post.md)

---

[API](https://skmtc.dev/phaseo/apis/phaseo-gateway-api.md) - [All operations](https://skmtc.dev/phaseo/apis/phaseo-gateway-api/llms.txt) - [OpenAPI document](https://skmtc.dev/phaseo/apis/phaseo-gateway-api/revisions/5ca9bb220d25?raw)
