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

# Update Org Budget Settings



## OpenAPI

````yaml /openapi/openhands-cloud.json patch /api/organizations/{org_id}/budgets
openapi: 3.1.0
info:
  title: OpenHands
  description: 'OpenHands: Code Less, Make More'
  version: 0.0.1
servers: []
security: []
paths:
  /api/organizations/{org_id}/budgets:
    patch:
      tags:
        - Orgs
      summary: Update Org Budget Settings
      operationId: update_org_budget_settings_api_organizations__org_id__budgets_patch
      parameters:
        - name: org_id
          in: path
          required: true
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Org Id
        - name: users_page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
            title: Users Page
        - name: users_per_page
          in: query
          required: false
          schema:
            type: integer
            maximum: 1000
            minimum: 1
            default: 50
            title: Users Per Page
        - name: users_search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                maxLength: 200
              - type: 'null'
            title: Users Search
        - name: users_status
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Users Status
        - name: X-Org-Id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Org-Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrgBudgetSettingsUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgBudgetSettingsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    OrgBudgetSettingsUpdate:
      properties:
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Enabled
        monthly_limit:
          anyOf:
            - type: number
              exclusiveMinimum: 0
            - type: 'null'
          title: Monthly Limit
        reset_day:
          anyOf:
            - type: integer
            - type: 'null'
          title: Reset Day
        default_user_monthly_limit:
          anyOf:
            - type: number
              exclusiveMinimum: 0
            - type: 'null'
          title: Default User Monthly Limit
        slack_channel:
          anyOf:
            - type: string
            - type: 'null'
          title: Slack Channel
        slack_team_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Slack Team Id
        thresholds:
          anyOf:
            - items:
                $ref: '#/components/schemas/OrgBudgetThresholdUpdate'
              type: array
            - type: 'null'
          title: Thresholds
      type: object
      title: OrgBudgetSettingsUpdate
    OrgBudgetSettingsResponse:
      properties:
        enabled:
          type: boolean
          title: Enabled
        monthly_limit:
          anyOf:
            - type: number
            - type: 'null'
          title: Monthly Limit
        litellm_last_sync_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Litellm Last Sync At
        litellm_last_sync_status:
          anyOf:
            - type: string
            - type: 'null'
          title: Litellm Last Sync Status
        litellm_last_sync_error:
          anyOf:
            - type: string
            - type: 'null'
          title: Litellm Last Sync Error
        reset_day:
          type: integer
          title: Reset Day
        slack_channel:
          anyOf:
            - type: string
            - type: 'null'
          title: Slack Channel
        slack_team_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Slack Team Id
        default_user_monthly_limit:
          anyOf:
            - type: number
            - type: 'null'
          title: Default User Monthly Limit
        cycle_start_at:
          type: string
          format: date-time
          title: Cycle Start At
        cycle_end_at:
          type: string
          format: date-time
          title: Cycle End At
        current_spend:
          type: number
          title: Current Spend
          default: 0
        current_spend_percentage:
          type: number
          title: Current Spend Percentage
          default: 0
        thresholds:
          items:
            $ref: '#/components/schemas/OrgBudgetThresholdResponse'
          type: array
          title: Thresholds
        users:
          items:
            $ref: '#/components/schemas/OrgBudgetUserResponse'
          type: array
          title: Users
        users_total:
          type: integer
          title: Users Total
          default: 0
        users_page:
          type: integer
          title: Users Page
          default: 1
        users_per_page:
          type: integer
          title: Users Per Page
          default: 50
      type: object
      required:
        - enabled
        - reset_day
        - cycle_start_at
        - cycle_end_at
      title: OrgBudgetSettingsResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    OrgBudgetThresholdUpdate:
      properties:
        percentage:
          type: integer
          maximum: 100
          exclusiveMinimum: 0
          title: Percentage
        email_enabled:
          type: boolean
          title: Email Enabled
          default: true
        slack_enabled:
          type: boolean
          title: Slack Enabled
          default: false
      type: object
      required:
        - percentage
      title: OrgBudgetThresholdUpdate
    OrgBudgetThresholdResponse:
      properties:
        id:
          type: integer
          title: Id
        percentage:
          type: integer
          title: Percentage
        email_enabled:
          type: boolean
          title: Email Enabled
        slack_enabled:
          type: boolean
          title: Slack Enabled
      type: object
      required:
        - id
        - percentage
        - email_enabled
        - slack_enabled
      title: OrgBudgetThresholdResponse
    OrgBudgetUserResponse:
      properties:
        user_id:
          type: string
          title: User Id
        user_email:
          anyOf:
            - type: string
            - type: 'null'
          title: User Email
        user_name:
          anyOf:
            - type: string
            - type: 'null'
          title: User Name
        current_spend:
          type: number
          title: Current Spend
          default: 0
        monthly_limit:
          anyOf:
            - type: number
            - type: 'null'
          title: Monthly Limit
        effective_monthly_limit:
          anyOf:
            - type: number
            - type: 'null'
          title: Effective Monthly Limit
        is_disabled:
          type: boolean
          title: Is Disabled
          default: false
        is_override:
          type: boolean
          title: Is Override
          default: false
      type: object
      required:
        - user_id
      title: OrgBudgetUserResponse
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-Access-Token

````