> ## 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 a usage alert

> Changes a usage alert's trigger or recipients, or turns it on or off.

> [accordion] Details
>
> An absent field stays, even when another change lands at the same time; recipients replaces both its lists, and only recipients you send are checked. The change is recorded in your team's audit log.
>
> * Owners and Admins only. An API key needs team:manage.
>
> * **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), [`not_found`](https://docs.pomerado.ai/errors#not_found), and the [errors any request can get](https://docs.pomerado.ai/errors.md).


## OpenAPI

````yaml /api-reference/openapi.json patch /v1/usage/alerts/{alert_id}
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/alerts/{alert_id}:
    patch:
      tags:
        - usage_alerts
      summary: Change a usage alert
      description: Changes a usage alert's trigger or recipients, or turns it on or off.
      operationId: usage_alerts.update
      parameters:
        - name: alert_id
          in: path
          required: true
          description: 'a usage alert ID: ual_ and 32 lowercase hex digits'
          schema:
            type: string
            examples:
              - ual_0f8e2d1c4b3a49e8a7f6e5d4c3b2a190
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UsageAlertChange'
      responses:
        '200':
          description: The alert
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsageAlert'
        '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'
        '404':
          description: not_found
          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:
    UsageAlertChange:
      type: object
      required: []
      properties:
        trigger:
          $ref: '#/components/schemas/UsageAlertTrigger'
        recipients:
          type: object
          required: []
          properties:
            roles:
              type: array
              items:
                type: string
                enum:
                  - owner
                  - admin
                  - member
                  - tool_user
              description: Everyone in these roles when it sends
              maxItems: 4
            member_ids:
              type: array
              items:
                $ref: '#/components/schemas/user_id'
              description: >-
                Verified members of your team, each by user ID: members who have
                joined it
              maxItems: 100
          additionalProperties: false
          description: Replaces both lists; an absent list is emptied
        'on':
          type: boolean
      additionalProperties: false
    UsageAlert:
      type: object
      required:
        - id
        - trigger
        - window
        - 'on'
        - recipients
        - on_changed_at
        - last_sent_at
      properties:
        id:
          type: string
        trigger:
          $ref: '#/components/schemas/UsageAlertTrigger'
        window:
          type: string
          enum:
            - day
            - billing_period
          description: 'It is emailed at most once in each: a UTC day, or a billing period'
        'on':
          type: boolean
        recipients:
          type: object
          required:
            - roles
            - members
          properties:
            roles:
              type: array
              items:
                type: string
                enum:
                  - owner
                  - admin
                  - member
                  - tool_user
              description: Everyone in these roles when it sends
            members:
              type: array
              items:
                $ref: '#/components/schemas/SpendControlPerson'
          additionalProperties: false
        on_changed_at:
          type: string
          description: When it was created, or last turned on or off
        last_sent_at:
          anyOf:
            - type: string
              description: ISO 8601 UTC
            - type: 'null'
      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
    UsageAlertTrigger:
      anyOf:
        - type: object
          required:
            - kind
            - calls
          properties:
            kind:
              type: string
              enum:
                - calls
            calls:
              type: integer
              description: Tool calls in a UTC day
              minimum: 1
              maximum: 1000000000
          additionalProperties: false
        - type: object
          required:
            - kind
            - percent
          properties:
            kind:
              type: string
              enum:
                - included_calls_percent
            percent:
              type: integer
              description: Of the UTC day's included calls, 1 to 1000
              minimum: 1
              maximum: 1000
          additionalProperties: false
        - type: object
          required:
            - kind
            - overage_cents
          properties:
            kind:
              type: string
              enum:
                - overage
            overage_cents:
              type: integer
              description: Overage in the billing period, in US cents
              minimum: 1
              maximum: 100000000000
          additionalProperties: false
        - type: object
          required:
            - kind
            - percent
          properties:
            kind:
              type: string
              enum:
                - budget_percent
            percent:
              type: integer
              description: Of the overage budget in the billing period, 1 to 1000
              minimum: 1
              maximum: 1000
          additionalProperties: false
        - type: object
          required:
            - kind
          properties:
            kind:
              type: string
              enum:
                - cap_reached
          additionalProperties: false
      description: >-
        What sets it off: calls or included_calls_percent each UTC day, overage
        or budget_percent (dollars, Owners and Admins only) each billing period,
        or cap_reached when the daily cap refuses runs
    user_id:
      type: string
      description: >-
        a team member ID: the user_id GET /v1/team/members gives: user_ and up
        to 100 letters or digits
      examples:
        - user_01K6QZ8V3N4M5P6R7S8T9W0XYZ
    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.