API referenceBilling
Update Auto Topup
Authorization
bearerAuth AuthorizationBearer <token>
Use a project API key for sandbox and runtime routes, or an OpenMetal user access token for account management routes.
In: header
Path Parameters
organization_id*stringFormat
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
enabled*booleanthreshold_usd*stringMatch
^\d+(?:\.\d{1,2})?$refill_usd*stringMatch
^\d+(?:\.\d{1,2})?$monthly_cap_usd*stringMatch
^\d+(?:\.\d{1,2})?$Response Body
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/v1/organizations/497f6eca-6276-4993-bfeb-53cbbbba6f08/billing/auto-topup" \ -H "Content-Type: application/json" \ -d '{ "enabled": true, "threshold_usd": "string", "refill_usd": "string", "monthly_cap_usd": "string" }'{ "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6", "balance_microusd": "string", "balance_usd": "string", "can_manage": true, "payment_method": { "brand": "string", "last4": "string" }, "auto_topup": { "enabled": true, "status": "disabled", "threshold_usd": "string", "refill_usd": "string", "monthly_cap_usd": "string", "month_credited_usd": "string", "paused_reason": "string" }, "purchases": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "source": "checkout", "status": "pending", "credit_usd": "string", "fee_usd": "string", "total_usd": "string", "receipt_url": "http://example.com", "invoice_url": "http://example.com", "created_at": "2019-08-24T14:15:22Z", "paid_at": "2019-08-24T14:15:22Z" } ], "ledger": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "kind": "deposit", "amount_microusd": "string", "amount_usd": "string", "description": "string", "created_at": "2019-08-24T14:15:22Z" } ], "weekly_activity": [ { "date": "2019-08-24", "amount_microusd": "string" } ]}