> ## Documentation Index
> Fetch the complete documentation index at: https://docs.korve.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Set

> Create or replace the project's budget. Omitted optional fields reset to defaults.



## OpenAPI

````yaml /openapi.json put /v1/orgs/{orgId}/projects/{projectId}/budget
openapi: 3.1.0
info:
  title: Korve API
  version: 0.1.0
  description: >-
    Typed control plane for deploying applications and explicitly provisioning
    their managed infrastructure.
servers:
  - url: https://api.korve.dev
security: []
paths:
  /v1/orgs/{orgId}/projects/{projectId}/budget:
    put:
      tags:
        - budgets
      summary: Set
      description: >-
        Create or replace the project's budget. Omitted optional fields reset to
        defaults.
      operationId: budgets.set
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
          description: The organization's id (UUID) or slug — either form is accepted.
        - name: projectId
          in: path
          required: true
          schema:
            type: string
          description: The project's id (UUID) or slug — either form is accepted.
      requestBody:
        required: true
        x-korve-max-bytes: 1048576
        content:
          application/json:
            schema:
              type: object
              properties:
                monthlyCapUsd:
                  type: number
                  description: Monthly cap in USD. Must be > 0.
                hardStop:
                  type: boolean
                  description: Defaults to false.
                alertAtPercent:
                  type: integer
                  description: 1-100. Defaults to 80.
              required:
                - monthlyCapUsd
      responses:
        '200':
          description: Budget stored.
          content:
            application/json:
              schema:
                type: object
                properties:
                  monthlyCapUsd:
                    type: number
                  hardStop:
                    type: boolean
                    description: >-
                      Whether spend past the cap suspends the project's paid
                      activity.
                  alertAtPercent:
                    type: integer
                    description: Alert threshold as a percent of the cap.
                  currentSpendUsd:
                    type: number
                    description: Month-to-date spend at rate-card prices.
                required:
                  - monthlyCapUsd
                  - hardStop
                  - alertAtPercent
                  - currentSpendUsd
        '402':
          description: Organization billing is not active.
        '404':
          description: No such project in this organization.
        '422':
          description: Invalid cap, hard stop flag, or alert threshold.
      security:
        - apiKey: []
        - session: []
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: korve_api_key
    session:
      type: apiKey
      in: cookie
      name: korve.session_token

````