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

# Set Auto Top Up

> Change the org's auto top-up switch and audit it atomically. Admin only.



## OpenAPI

````yaml https://api.getfloo.com/openapi.json post /v1/billing/paygo/auto-top-up
openapi: 3.1.0
info:
  title: floo API
  version: 0.1.0
servers:
  - url: https://api.getfloo.com
security: []
paths:
  /v1/billing/paygo/auto-top-up:
    post:
      tags:
        - billing
      summary: Set Auto Top Up
      description: Change the org's auto top-up switch and audit it atomically. Admin only.
      operationId: billing_set_auto_top_up
      parameters:
        - $ref: '#/components/parameters/X-Floo-Org-Id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AutoTopUpRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutoTopUpResponse'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  parameters:
    X-Floo-Org-Id:
      name: X-Floo-Org-Id
      in: header
      required: false
      schema:
        type: string
        format: uuid
      description: Organization to act in; defaults to the one joined most recently.
  schemas:
    AutoTopUpRequest:
      properties:
        enabled:
          type: boolean
          title: Enabled
      type: object
      required:
        - enabled
      title: AutoTopUpRequest
      description: Enable or disable auto top-up without granting saved-card consent.
    AutoTopUpResponse:
      properties:
        enabled:
          type: boolean
          title: Enabled
        off_reason:
          anyOf:
            - $ref: '#/components/schemas/AutoTopUpOffReason'
            - type: string
              const: needs_purchase
            - type: 'null'
          title: Off Reason
        threshold_cents:
          type: integer
          title: Threshold Cents
        amount_cents:
          anyOf:
            - type: integer
            - type: 'null'
          title: Amount Cents
      type: object
      required:
        - enabled
        - off_reason
        - threshold_cents
        - amount_cents
      title: AutoTopUpResponse
      description: >-
        Current switch state and refill terms derived from settled consent
        evidence.
    ErrorResponse:
      properties:
        detail:
          $ref: '#/components/schemas/ErrorDetail'
      type: object
      required:
        - detail
      title: ErrorResponse
      description: Body of every error response except request validation (422).
    AutoTopUpOffReason:
      type: string
      enum:
        - customer
        - charge_failed
      title: AutoTopUpOffReason
      description: Why an organization has disabled prepaid auto top-up.
    ErrorDetail:
      properties:
        code:
          type: string
          title: Code
        message:
          type: string
          title: Message
      additionalProperties: true
      type: object
      required:
        - code
        - message
      title: ErrorDetail
      description: Standard error envelope with operation-specific JSON context.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: A `floo_` API key.

````

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