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

# Change your team's daily cap or overage budget

> Sets your Business team's daily cap or overage budget, or turns either on or off.

> [accordion] Details
>
> An absent field stays, and each keeps its value while off. Each change is recorded in your team's audit log. A change holds from the next run: at the cap, new runs are refused with quota\_exceeded until the UTC day resets, and runs already started finish.
>
> * Owners and Admins only. An API key needs team:manage.
>
> * daily\_cap: calls a UTC day, or overage\_cents, overage dollars a UTC day in US cents. Dollars stay as set; each UTC day they come to that day's included calls plus the dollars over that day's overage price, rounded down. A cap in dollars needs billing terms with an overage price. A cap may be below the included calls. Only runs count; builds never do.
>
> * overage\_budget: cents of overage each billing period, at least 1, which budget alerts measure against. It never stops runs.
>
> * **Callers:** an API key, an MCP OAuth token or a Dashboard session.
>
> * **Permission:** `team:manage`; an API key also needs `team:manage`.
>
> * **Effect:** Creates or changes something.
>
> * **Errors:** [`business_account_required`](https://docs.pomerado.ai/errors#business_account_required), [`role_permission_missing`](https://docs.pomerado.ai/errors#role_permission_missing), and the [errors any request can get](https://docs.pomerado.ai/errors.md).


## OpenAPI

````yaml /api-reference/openapi.json patch /v1/usage/spend-controls
openapi: 3.1.0
info:
  title: Pomerado API
  version: '1'
  description: >-
    Run and build website tools, follow their jobs, and manage logins, API keys
    and webhooks. Authenticate with a Pomerado API key (pom_…), an MCP OAuth
    token or a Dashboard session as a Bearer token.
servers:
  - url: https://api.pomerado.ai
security: []
tags:
  - name: account
    x-group: Account
  - name: api_keys
    x-group: API keys
  - name: connected_apps
    x-group: Connected apps
  - name: usage
    x-group: Usage
  - name: quota
    x-group: Quota
  - name: spend_controls
    x-group: Spend controls
  - name: usage_alerts
    x-group: Usage alerts
  - name: usage_summary
    x-group: Usage summary
  - name: billing
    x-group: Billing
  - name: integrations
    x-group: Integrations
  - name: connect
    x-group: Connect
  - name: code
    x-group: Code
  - name: logins
    x-group: Saved logins
  - name: two_factor
    x-group: 2FA
  - name: login_access
    x-group: Login access
  - name: tools
    x-group: Tools
  - name: shapes
    x-group: Shapes
  - name: webhooks
    x-group: Webhooks
  - name: payer_profiles
    x-group: Payer profiles
  - name: payer_addresses
    x-group: Payer addresses
  - name: payment_methods
    x-group: Payment methods
  - name: runs
    x-group: Runs
  - name: builds
    x-group: Builds
  - name: jobs
    x-group: Jobs
  - name: suggestions
    x-group: Suggestions
  - name: audit
    x-group: Audit
  - name: files
    x-group: Files
  - name: team
    x-group: Team
  - name: sso
    x-group: Single sign-on
  - name: issue_reports
    x-group: Problem reports
paths:
  /v1/usage/spend-controls:
    patch:
      tags:
        - spend_controls
      summary: Change your team's daily cap or overage budget
      description: >-
        Sets your Business team's daily cap or overage budget, or turns either
        on or off.
      operationId: spend_controls.update
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SpendControlsChange'
      responses:
        '200':
          description: Your team's spend controls
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpendControls'
        '400':
          description: invalid_request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: unauthorized, reauthentication_required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: business_account_required, role_permission_missing, forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '413':
          description: request_too_large
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: internal_error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: temporarily_unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearer: []
components:
  schemas:
    SpendControlsChange:
      type: object
      required: []
      properties:
        daily_cap:
          type: object
          required: []
          properties:
            'on':
              type: boolean
            calls:
              type: integer
              description: Sets the cap in tool calls a UTC day
              minimum: 1
              maximum: 1000000000
            overage_cents:
              type: integer
              description: >-
                Sets the cap in overage dollars a UTC day, in US cents. Each UTC
                day it comes to that day's included calls plus these dollars
                over that day's overage price, rounded down
              minimum: 1
              maximum: 100000000000
          additionalProperties: false
        overage_budget:
          type: object
          required: []
          properties:
            'on':
              type: boolean
            cents:
              type: integer
              description: Overage each billing period, in US cents
              minimum: 1
              maximum: 100000000000
          additionalProperties: false
      additionalProperties: false
    SpendControls:
      type: object
      required:
        - daily_cap
      properties:
        daily_cap:
          type: object
          required:
            - 'on'
            - basis
            - calls
            - effective_calls
            - changed_by
            - changed_at
          properties:
            'on':
              type: boolean
            basis:
              anyOf:
                - type: string
                  enum:
                    - calls
                    - overage_cents
                - type: 'null'
              description: >-
                What the cap was set in: calls, or overage_cents (overage
                dollars). Null until first set
            calls:
              anyOf:
                - type: integer
                  description: a non-negative number
                  minimum: 0
                - type: 'null'
              description: The calls a UTC day it was set to; null unless basis is calls
            overage_cents:
              anyOf:
                - type: integer
                  description: a non-negative number
                  minimum: 0
                - type: 'null'
              description: >-
                Owners and Admins only. The overage dollars a UTC day it was set
                to, in US cents; null unless basis is overage_cents. They stay
                the same dollars when the price or the included calls change
            effective_calls:
              anyOf:
                - type: integer
                  description: a non-negative number
                  minimum: 0
                - type: 'null'
              description: >-
                Tool calls today, the UTC day, the cap stands at; only runs
                count, never builds. While the cap is on, new runs past it are
                refused with quota_exceeded (details.limit_source team_cap)
                until the UTC day resets; runs already started finish. A cap in
                dollars comes to today's included calls plus its dollars over
                today's overage price, rounded down, so it follows the terms
                each day. Null until first set, and for a cap in dollars while
                the team has no billing terms or free overage, when it refuses
                no runs
            changed_by:
              anyOf:
                - $ref: '#/components/schemas/SpendControlPerson'
                - type: 'null'
              description: Who changed it last; null until first set
            changed_at:
              anyOf:
                - type: string
                  description: ISO 8601 UTC
                - type: 'null'
              description: When it was last changed; null until first set
          additionalProperties: false
          description: Kept while off
        overage_budget:
          type: object
          required:
            - 'on'
            - cents
            - changed_by
            - changed_at
          properties:
            'on':
              type: boolean
            cents:
              anyOf:
                - type: integer
                  description: a non-negative number
                  minimum: 0
                - type: 'null'
              description: >-
                Expected overage each billing period, in US cents, which budget
                alerts measure against. It never stops runs. Null until first
                set
            changed_by:
              anyOf:
                - $ref: '#/components/schemas/SpendControlPerson'
                - type: 'null'
              description: Who changed it last; null until first set
            changed_at:
              anyOf:
                - type: string
                  description: ISO 8601 UTC
                - type: 'null'
              description: When it was last changed; null until first set
          additionalProperties: false
          description: Owners and Admins only. Kept while off
        today:
          type: object
          required:
            - refused_runs
            - first_refused_at
          properties:
            refused_runs:
              type: integer
              description: >-
                New runs refused today, the UTC day, for being over the day's
                tool call limit: the cap while on, or a limit Pomerado set,
                whichever is lower. Each request counts once, however often it
                was retried with its idempotency key
              minimum: 0
            first_refused_at:
              anyOf:
                - type: string
                  description: ISO 8601 UTC
                - type: 'null'
              description: When the first of them was refused; null when none was
            limit_source:
              anyOf:
                - type: string
                  enum:
                    - team_cap
                    - pomerado
                - type: 'null'
              description: >-
                Which limit holds today: team_cap, the team's own cap, lower
                than any limit Pomerado set; pomerado, a limit Pomerado set,
                lower than the cap or equal to it, or with the cap off; null
                when neither limits the day. Absent while it can't be read
          additionalProperties: false
          description: Absent while they can't be counted
      additionalProperties: false
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - retryable
            - docs_url
          properties:
            code:
              type: string
            message:
              type: string
            retryable:
              type: boolean
            docs_url:
              type: string
            details:
              type: object
              required: []
              properties: {}
              additionalProperties:
                $id: /schemas/unknown
          additionalProperties: false
      additionalProperties: false
    SpendControlPerson:
      type: object
      required:
        - member_id
        - name
        - email
      properties:
        member_id:
          type: string
          description: The member's user ID
        name:
          anyOf:
            - type: string
            - type: 'null'
        email:
          anyOf:
            - type: string
            - type: 'null'
      additionalProperties: false
      description: >-
        A member. name and email are null once your team no longer knows them,
        and to an API key without team:manage for anyone but its own member
  securitySchemes:
    bearer:
      type: http
      scheme: bearer

````

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