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

# Set emergency credit

> Sets the emergency credit amount for an account.
- Allows users with appropriate permissions (root, admin, or billing roles) to configure a maximum monthly emergency budget.
- For accounts with fixed resource allocations, emergency credit funds the provisioning of additional resources when regular allocations are exhausted.



## OpenAPI

````yaml /api-reference/endpoint/accounts/openapi.json patch /accounts/set-emergency-credit
openapi: 3.0.3
info:
  title: quiva.ai Gateway
  description: >-
    API for managing accounts, users, authentication, and payments in the
    quiva.ai platform
  version: 1.0.0
  contact:
    name: quiva.ai Support
    url: https://app.quiva.ai
servers:
  - url: https://api.quiva.ai
    description: Production API server
security:
  - bearerAuth: []
  - apiKeyAuth: []
tags:
  - name: Account Management
    description: Operations related to account creation, updating, and deletion
  - name: User Management
    description: Operations related to user creation, updating, and deletion
  - name: Authentication
    description: Operations related to authentication and session management
  - name: API Keys
    description: Operations related to API key management
  - name: Multi-Factor Authentication
    description: Operations related to MFA setup and verification
  - name: Payment
    description: Operations related to subscription and payment management
  - name: Mesh Nodes
    description: Operations related to mesh node management
paths:
  /accounts/set-emergency-credit:
    patch:
      tags:
        - Account Management
      summary: Set emergency credit
      description: >-
        Sets the emergency credit amount for an account.

        - Allows users with appropriate permissions (root, admin, or billing
        roles) to configure a maximum monthly emergency budget.

        - For accounts with fixed resource allocations, emergency credit funds
        the provisioning of additional resources when regular allocations are
        exhausted.
      operationId: setEmergencyCredit
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                emergency_credit:
                  type: number
                  format: float
                  description: Emergency credit amount
              required:
                - emergency_credit
            example:
              emergency_credit: 100
      responses:
        '200':
          description: Emergency credit set successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    SuccessResponse:
      type: object
      properties:
        message:
          type: string
    Error:
      type: object
      properties:
        error:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key

````