---
title: "Update project spend limit"
method: POST
path: "/organization/projects/{project_id}/spend_limit"
---

# Update project spend limit

`POST /organization/projects/{project_id}/spend_limit`

## Request

- Base URL: `https://api.openai.com/v1`
- URL: `https://api.openai.com/v1/organization/projects/{project_id}/spend_limit`
- Auth: HTTP bearer

Create or replace a project's hard spend limit.

## Path parameters

- `project_id` string, required

## Request body

- UpdateProjectSpendLimitBody: Parameters for the hard spend limit you want to create or replace.
  - `threshold_amount` integer, required: The hard spend limit amount, in cents.
  - `currency` 'USD', required: The currency for the threshold amount. Currently, only `USD` is supported.
  - `interval` 'month', required: The time interval for evaluating spend against the threshold. Currently, only `month` is supported.

## Response `200`

Hard spend limit created or replaced successfully.

- ProjectSpendLimitResource: Represents a hard spend limit configured at the project level.
  - `object` 'project.spend_limit', required: The object type, which is always `project.spend_limit`.
  - `threshold_amount` integer, required: The hard spend limit amount, in cents.
  - `currency` union, required
    - string
    - 'USD'
  - `interval` union, required
    - string
    - 'month'
  - `enforcement` SpendLimitEnforcement, required: The current enforcement state of a hard spend limit.
    - `status` union, required
      - string
      - 'inactive' | 'enforcing'

## Other responses

- `400`: The requested spend limit is invalid or cannot be applied.
- `403`: The caller does not have permission to perform this operation.
- `404`: The project was not found.

## Changes

- **2026-10-06** `487892d3954e`: 3 info
  - added the optional property `error/anyOf[#/components/schemas/Error]/misalignment/review_target` to the response with the `403` status
  - added the optional property `error/misalignment/review_target` to the response with the `400` status
  - added the optional property `error/misalignment/review_target` to the response with the `404` status
- **2026-10-05** `7f654af7f94f`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/omnistack-sh/apis/openai-api/changes/organization/projects/:project_id/spend_limit/post.md)

---

[API](https://skmtc.dev/omnistack-sh/apis/openai-api.md) - [All operations](https://skmtc.dev/omnistack-sh/apis/openai-api/llms.txt) - [OpenAPI document](https://skmtc.dev/omnistack-sh/apis/openai-api/revisions/0a26f104d35f?raw)
