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

# Update Auto Top-Up Setting

> Enable or disable automatic top-up for the account.



## OpenAPI

````yaml api-reference/openapi/accounts.json PATCH /api/accounts/{id}/auto-recharge
openapi: 3.1.0
info:
  title: Recoup API - Accounts
  description: >-
    API documentation for the Recoup platform - an AI agent platform for the
    music industry
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.recoupable.dev
security: []
paths:
  /api/accounts/{id}/auto-recharge:
    patch:
      description: Enable or disable automatic top-up for the account.
      parameters:
        - name: id
          in: path
          description: >-
            The unique identifier (UUID) of the account. Must be the
            authenticated account or another accessible via organization
            membership.
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountAutoRechargeUpdateRequest'
      responses:
        '200':
          description: Auto top-up setting returned successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountAutoRechargeResponse'
        '400':
          description: Invalid request body - `enabled` must be a boolean
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountAutoRechargeErrorResponse'
              example:
                error: enabled must be a boolean
        '401':
          description: Unauthorized - invalid or missing authentication
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountAutoRechargeErrorResponse'
              example:
                error: Unauthorized
        '403':
          description: Forbidden - account not accessible to the authenticated account
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountAutoRechargeErrorResponse'
        '404':
          description: Account not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountAutoRechargeErrorResponse'
      security:
        - apiKeyAuth: []
        - bearerAuth: []
components:
  schemas:
    AccountAutoRechargeUpdateRequest:
      type: object
      required:
        - enabled
      properties:
        enabled:
          type: boolean
          description: Set `false` to opt out of automatic top-up, `true` to opt back in.
    AccountAutoRechargeResponse:
      type: object
      required:
        - account_id
        - enabled
      properties:
        account_id:
          type: string
          format: uuid
          description: The unique identifier of the account this setting belongs to.
          example: 550e8400-e29b-41d4-a716-446655440000
        enabled:
          type: boolean
          description: >-
            Whether automatic top-up is enabled. `false` means the account has
            opted out and only explicit checkout top-ups can charge it.
          example: true
    AccountAutoRechargeErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Human-readable error message.
          example: Unauthorized
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Your Recoup API key. [Learn more](/quickstart#api-keys).
    bearerAuth:
      type: http
      scheme: bearer

````