Skip to main content
PUT
/
v0
/
billing
/
auto-recharge
curl --request PUT \
  --url 'https://api.unify.ai/v0/billing/auto-recharge' \
  --header "Authorization: Bearer $UNIFY_KEY" \
  --header 'Content-Type: application/json' \
  --data '{}'
{
    "enabled": "boolean",
    "threshold": "number",
    "qty": "number",
    "min_recharge_amount": "number",
    "eligible": "boolean",
    "total_spending": "number",
    "minimum_spend_required": "number",
    "remaining_spend_needed": "number",
    "has_payment_method": "boolean",
    "blocked_reason": "string | null"
}
Update auto-recharge settings atomically.
  • enabled (required) – enable or disable auto-recharge.
  • threshold (optional) – the credit balance that triggers a top-up.
  • qty (optional) – the amount of credits to add per top-up.
When enabling, the account must have met the minimum spending threshold (fraud-prevention measure). qty must be ≥ $25. Context (personal vs org) is derived from the API key. Returns the updated settings + eligibility (same shape as GET).

Authorizations

Authorization
string
required
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

enabled
boolean
required
threshold
number | null
qty
number | null
curl --request PUT \
  --url 'https://api.unify.ai/v0/billing/auto-recharge' \
  --header "Authorization: Bearer $UNIFY_KEY" \
  --header 'Content-Type: application/json' \
  --data '{}'
{
    "enabled": "boolean",
    "threshold": "number",
    "qty": "number",
    "min_recharge_amount": "number",
    "eligible": "boolean",
    "total_spending": "number",
    "minimum_spend_required": "number",
    "remaining_spend_needed": "number",
    "has_payment_method": "boolean",
    "blocked_reason": "string | null"
}