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

# Set credit alert

> Create or replace the organization's credit-balance alert. An email is sent to the organization's billing email when the credit balance drops below the threshold.



## OpenAPI

````yaml https://api.thundercompute.com:8443/openapi.json put /credit-alert
openapi: 3.1.0
info:
  contact:
    email: support@thundercompute.com
    name: Thunder Compute API Support
    url: https://thundercompute.com/support
  description: Retrieve current GPU availability using mode-less spec keys
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  termsOfService: http://swagger.io/terms/
  title: Thunder Compute API
  version: '1.0'
servers:
  - description: Production server
    url: https://api.thundercompute.com:8443/v1
security: []
externalDocs:
  description: ''
  url: ''
paths:
  /credit-alert:
    put:
      tags:
        - Billing
      summary: Set credit alert
      description: >-
        Create or replace the organization's credit-balance alert. An email is
        sent to the organization's billing email when the credit balance drops
        below the threshold.
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - type: object
                - $ref: '#/components/schemas/thundertypes.CreditAlertSetRequest'
                  summary: request
                  description: Alert threshold in cents
        description: Alert threshold in cents
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/thundertypes.CreditAlertSetResponse'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/thundertypes.ErrorResponse'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/thundertypes.ErrorResponse'
          description: Unauthorized
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/thundertypes.ErrorResponse'
          description: Internal Server Error
      security:
        - ApiKeyAuth: []
components:
  schemas:
    thundertypes.CreditAlertSetRequest:
      properties:
        amount_cents:
          minimum: 1
          type: integer
      required:
        - amount_cents
      type: object
    thundertypes.CreditAlertSetResponse:
      properties:
        alert:
          $ref: '#/components/schemas/thundertypes.CreditAlert'
      type: object
    thundertypes.ErrorResponse:
      properties:
        code:
          example: 400
          type: integer
        error:
          example: invalid_request
          type: string
        message:
          example: The request is malformed
          type: string
      type: object
    thundertypes.CreditAlert:
      properties:
        amount_cents:
          type: integer
        armed:
          type: boolean
        created_at:
          type: integer
      type: object
  securitySchemes:
    ApiKeyAuth:
      description: >-
        Bearer token authentication. Provide your API token prefixed with
        "Bearer ", e.g. "Bearer your-api-token".
      in: header
      name: Authorization
      type: apiKey

````