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

# Set Spend Cap

> Set budget protection for the org. Admin only.



## OpenAPI

````yaml https://api.getfloo.com/openapi.json post /v1/billing/spend-cap
openapi: 3.1.0
info:
  title: floo API
  version: 0.1.0
servers:
  - url: https://api.getfloo.com
security: []
paths:
  /v1/billing/spend-cap:
    post:
      tags:
        - billing
      summary: Set Spend Cap
      description: Set budget protection for the org. Admin only.
      operationId: billing_set_spend_cap
      parameters:
        - $ref: '#/components/parameters/X-Floo-Org-Id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SpendCapRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpendCapResponse'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  parameters:
    X-Floo-Org-Id:
      name: X-Floo-Org-Id
      in: header
      required: false
      schema:
        type: string
        format: uuid
      description: Organization to act in; defaults to the one joined most recently.
  schemas:
    SpendCapRequest:
      properties:
        spend_cap:
          type: integer
          maximum: 2147483647
          minimum: 0
          title: Spend Cap
          description: Monthly spend cap in cents. 0 = no cap.
        policy:
          anyOf:
            - $ref: '#/components/schemas/SpendCapPolicy'
            - type: 'null'
      type: object
      required:
        - spend_cap
      title: SpendCapRequest
      description: Request to set the org spend cap.
    SpendCapResponse:
      properties:
        spend_cap:
          anyOf:
            - type: integer
            - type: 'null'
          title: Spend Cap
        policy:
          $ref: '#/components/schemas/SpendCapPolicy'
      type: object
      required:
        - spend_cap
        - policy
      title: SpendCapResponse
      description: Response for spend cap. None means no cap has been configured.
    ErrorResponse:
      properties:
        detail:
          $ref: '#/components/schemas/ErrorDetail'
      type: object
      required:
        - detail
      title: ErrorResponse
      description: Body of every error response except request validation (422).
    SpendCapPolicy:
      type: string
      enum:
        - 'off'
        - alerts_only
        - freeze_new_spend
        - hard_stop
      title: SpendCapPolicy
      description: How floo should react when an org reaches its spend cap.
    ErrorDetail:
      properties:
        code:
          type: string
          title: Code
        message:
          type: string
          title: Message
      additionalProperties: true
      type: object
      required:
        - code
        - message
      title: ErrorDetail
      description: Standard error envelope with operation-specific JSON context.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: A `floo_` API key.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.