> **For AI agents:** this page is a focused, LLM-optimized view of a
> single Fiber AI operation. Before calling it, fetch the routing
> instructions at [`https://api.fiber.ai/llms.txt`](https://api.fiber.ai/llms.txt) and the full operation
> index at [`https://api.fiber.ai/ai-docs/index.md`](https://api.fiber.ai/ai-docs/index.md).

# updateAutoTopupSettings

`POST /v1/auto-topup/configure`

**Tags:** `Account`

Update auto top-up settings

**Endpoint:** `https://api.fiber.ai/v1/auto-topup/configure`

## Description

Update the organization's auto top-up configuration. Enabling auto top-up will automatically charge your organization's saved payment method via Stripe when your credit balance falls below the configured threshold. AI agents should confirm with a human operator before enabling this feature.

⚡ Rate limit: 10 requests per 1 minute

💰 Cost: FREE! No credits are charged for this API. ⓘ

## Request body (JSON Schema)

```json
{
  "type": "object",
  "properties": {
    "apiKey": {
      "type": "string",
      "description": "Your Fiber API key"
    },
    "subscriptionId": {
      "type": "string",
      "minLength": 1,
      "description": "The subscription to configure auto top-up for. An organization can have multiple subscriptions, each with its own auto top-up settings."
    },
    "isEnabled": {
      "type": "boolean",
      "description": "Whether auto top-up is enabled"
    },
    "creditThreshold": {
      "type": [
        "integer",
        "null"
      ],
      "exclusiveMinimum": 0,
      "description": "Credit balance threshold below which auto top-up triggers. Required when isEnabled is true."
    },
    "creditsToBuy": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 1000,
      "maximum": 1000000,
      "description": "Number of credits to purchase when auto top-up triggers. Required when isEnabled is true."
    },
    "maxPerDay": {
      "type": [
        "integer",
        "null"
      ],
      "exclusiveMinimum": 0,
      "description": "Maximum number of auto top-ups allowed in a rolling 24-hour window. Set to null to remove the daily limit."
    },
    "maxPerMonth": {
      "type": [
        "integer",
        "null"
      ],
      "exclusiveMinimum": 0,
      "description": "Maximum number of auto top-ups allowed per calendar month (UTC). When reached, auto top-up pauses until the next calendar month. Set to null to remove the monthly limit."
    }
  },
  "required": [
    "apiKey",
    "subscriptionId",
    "isEnabled"
  ]
}
```

## Response — success (JSON Schema)

```json
{
  "type": "object",
  "properties": {
    "output": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "configured": {
              "type": "boolean",
              "enum": [
                true
              ]
            },
            "subscriptionId": {
              "type": "string",
              "description": "The subscription these auto top-up settings belong to"
            },
            "isEnabled": {
              "type": "boolean",
              "description": "Whether auto top-up is currently enabled for this organization"
            },
            "creditThreshold": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "description": "Credit balance threshold below which auto top-up triggers"
            },
            "creditsToBuy": {
              "type": "integer",
              "minimum": 1000,
              "maximum": 1000000,
              "description": "Number of credits purchased when auto top-up triggers"
            },
            "maxPerDay": {
              "type": [
                "integer",
                "null"
              ],
              "exclusiveMinimum": 0,
              "description": "Maximum number of auto top-ups allowed in a rolling 24-hour window. When reached, auto top-up pauses until the window passes. Leave as null to not enforce daily limit."
            },
            "maxPerMonth": {
              "type": [
                "integer",
                "null"
              ],
              "exclusiveMinimum": 0,
              "description": "Maximum number of auto top-ups allowed per calendar month (UTC). When reached, auto top-up pauses until the next calendar month. Leave as null to not enforce monthly limit."
            }
          },
          "required": [
            "configured",
            "subscriptionId",
            "isEnabled",
            "creditThreshold",
            "creditsToBuy"
          ]
        },
        {
          "type": "object",
          "properties": {
            "configured": {
              "type": "boolean",
              "enum": [
                false
              ]
            },
            "subscriptionId": {
              "type": "string",
              "description": "The subscription these auto top-up settings belong to"
            }
          },
          "required": [
            "configured",
            "subscriptionId"
          ]
        }
      ]
    },
    "chargeInfo": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "method": {
              "type": "string",
              "enum": [
                "charged-now"
              ]
            },
            "creditsCharged": {
              "type": "number"
            },
            "lowCreditAlert": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "getMoreCreditsUrl": {
                  "type": "string",
                  "format": "uri",
                  "description": "URL to top up credits or restart billing cycle to get fresh credits."
                },
                "message": {
                  "type": "string",
                  "description": "Human-readable credits warning."
                },
                "availableCredits": {
                  "type": "number",
                  "description": "Number of credits remaining in the current billing period."
                }
              },
              "required": [
                "getMoreCreditsUrl",
                "message",
                "availableCredits"
              ],
              "description": "Contains a link to get more credits, a warning message, and the remaining credit count."
            }
          },
          "required": [
            "method",
            "creditsCharged"
          ],
          "description": "Credits were charged immediately for this operation"
        },
        {
          "type": "object",
          "properties": {
            "method": {
              "type": "string",
              "enum": [
                "charging-later"
              ]
            },
            "message": {
              "type": "string"
            },
            "lowCreditAlert": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "getMoreCreditsUrl": {
                  "type": "string",
                  "format": "uri",
                  "description": "URL to top up credits or restart billing cycle to get fresh credits."
                },
                "message": {
                  "type": "string",
                  "description": "Human-readable credits warning."
                },
                "availableCredits": {
                  "type": "number",
                  "description": "Number of credits remaining in the current billing period."
                }
              },
              "required": [
                "getMoreCreditsUrl",
                "message",
                "availableCredits"
              ],
              "description": "Contains a link to get more credits, a warning message, and the remaining credit count."
            }
          },
          "required": [
            "method",
            "message"
          ],
          "description": "Credits will be charged after the operation completes"
        },
        {
          "type": "object",
          "properties": {
            "method": {
              "type": "string",
              "enum": [
                "charged-for-async-process"
              ]
            },
            "creditsCharged": {
              "type": "number"
            },
            "message": {
              "type": "string"
            },
            "lowCreditAlert": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "getMoreCreditsUrl": {
                  "type": "string",
                  "format": "uri",
                  "description": "URL to top up credits or restart billing cycle to get fresh credits."
                },
                "message": {
                  "type": "string",
                  "description": "Human-readable credits warning."
                },
                "availableCredits": {
                  "type": "number",
                  "description": "Number of credits remaining in the current billing period."
                }
              },
              "required": [
                "getMoreCreditsUrl",
                "message",
                "availableCredits"
              ],
              "description": "Contains a link to get more credits, a warning message, and the remaining credit count."
            }
          },
          "required": [
            "method",
            "creditsCharged",
            "message"
          ],
          "description": "Credits that were charged for an asynchronous operation"
        },
        {
          "type": "object",
          "properties": {
            "method": {
              "type": "string",
              "enum": [
                "free"
              ]
            },
            "message": {
              "type": "string"
            },
            "lowCreditAlert": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "getMoreCreditsUrl": {
                  "type": "string",
                  "format": "uri",
                  "description": "URL to top up credits or restart billing cycle to get fresh credits."
                },
                "message": {
                  "type": "string",
                  "description": "Human-readable credits warning."
                },
                "availableCredits": {
                  "type": "number",
                  "description": "Number of credits remaining in the current billing period."
                }
              },
              "required": [
                "getMoreCreditsUrl",
                "message",
                "availableCredits"
              ],
              "description": "Contains a link to get more credits, a warning message, and the remaining credit count."
            }
          },
          "required": [
            "method",
            "message"
          ],
          "description": "No credits were charged for this operation"
        },
        {
          "type": "object",
          "properties": {
            "method": {
              "type": "string",
              "enum": [
                "credits-refunded"
              ]
            },
            "creditsRefunded": {
              "type": "number"
            },
            "message": {
              "type": "string"
            },
            "lowCreditAlert": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "getMoreCreditsUrl": {
                  "type": "string",
                  "format": "uri",
                  "description": "URL to top up credits or restart billing cycle to get fresh credits."
                },
                "message": {
                  "type": "string",
                  "description": "Human-readable credits warning."
                },
                "availableCredits": {
                  "type": "number",
                  "description": "Number of credits remaining in the current billing period."
                }
              },
              "required": [
                "getMoreCreditsUrl",
                "message",
                "availableCredits"
              ],
              "description": "Contains a link to get more credits, a warning message, and the remaining credit count."
            }
          },
          "required": [
            "method",
            "creditsRefunded",
            "message"
          ],
          "description": "Credits were refunded for this operation"
        }
      ]
    },
    "warnings": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string",
            "description": "Full path to extraneous field (e.g., 'searchParams.ExtraField')"
          },
          "message": {
            "type": "string",
            "description": "Warning message"
          }
        },
        "required": [
          "field",
          "message"
        ]
      },
      "description": "Warnings about extraneous fields in request"
    },
    "advice": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      },
      "description": "Tips, recommendations, and suggestions for using this API effectively."
    }
  },
  "required": [
    "output",
    "chargeInfo"
  ],
  "additionalProperties": false
}
```

---

Canonical JSON: [`https://api.fiber.ai/openapi.json`](https://api.fiber.ai/openapi.json)
Operation index: [`https://api.fiber.ai/ai-docs/index.md`](https://api.fiber.ai/ai-docs/index.md)
