Skip to main content
PUT
The PUT /billing/autorecharge/regular endpoint turns regular auto-recharge on or off on your Bright Data account, and sets the payment method and amount it charges. The dataset auto-recharge settings do not change.
Paste your API key into the authorization field. To get an API key, create an account and learn how to generate an API key.

Which API key permission does this endpoint need?

PUT /billing/autorecharge/regular requires the billing.write.pay.settings permission. API keys with the Admin or Finance permission level have it. Without it, the endpoint returns HTTP 403 with a plain-text message. Manage API key permissions in Account settings.

How do I turn on regular auto-recharge?

Send enabled: true with a pmethod_id and an amount:
  1. Get a payment method ID where autorecharge_supported is true from GET /billing/pmethods.
  2. Get the allowed amount range from regular.limits in GET /billing/autorecharge.
  3. Send the request:
The response returns the new regular auto-recharge settings, including threshold.

How much does regular auto-recharge charge?

A charge starts when the available balance drops below ceil(amount / 4). Regular auto-recharge never tops the balance up to a target level. The charge depends on the balance at that moment:
  • Balance above zero: the charge is exactly amount
  • Balance at zero or below: the charge is amount × ceil(debt / amount), at most 10 × amount
For example, with amount set to 200, a charge starts when the available balance drops below $50:

What are the rules for the amount?

amount is in USD and must be:
  • A whole number of dollars. Otherwise the endpoint returns amount_not_whole
  • At least limits.min_amount, which is $50 for all accounts. Otherwise the endpoint returns amount_too_low
  • At most limits.max_amount, which depends on the company type and can be changed per account. Otherwise the endpoint returns amount_too_high
Read limits.min_amount and limits.max_amount for your account from GET /billing/autorecharge.

How do I turn off regular auto-recharge?

Send enabled: false and no other field:
Turning auto-recharge off is always allowed, also when available is false. Turning off regular auto-recharge does not turn off dataset auto-recharge. Sending pmethod_id or amount with enabled: false returns invalid_param.

How does PUT update the settings?

The request body holds all the settings for the regular section, and the request is idempotent. Sending the same body twice leaves the same settings. To change only the amount, send enabled: true with the current pmethod_id and the new amount.

Which errors can this endpoint return?

HTTP 400 and the not_eligible HTTP 403 return JSON with error and error_code: HTTP 401, the permission HTTP 403 and HTTP 429 return plain text. The billing endpoints allow 1,000 requests per minute and 5,000 requests per hour.

Authorizations

Authorization
string
header
required

Use your Bright Data API Key as a Bearer token in the Authorization header.

How to authenticate:

  1. Obtain your API Key from the Bright Data account settings at https://brightdata.com/cp/setting/users
  2. Include the API Key in the Authorization header of your requests
  3. Format: Authorization: Bearer YOUR_API_KEY

Example:

Learn how to get your Bright Data API key: https://docs.brightdata.com/api-reference/authentication

Body

application/json
enabled
enum<boolean>
required
Available options:
true
pmethod_id
string
required

Payment method ID from GET /billing/pmethods.

Example:

"64f0c2a1e4b0a1b2c3d4e5f6"

amount
integer
required

Charge amount in USD, whole dollars, between limits.min_amount and limits.max_amount.

Example:

200

Response

New regular auto-recharge settings

available
boolean
required

true when regular auto-recharge is available for the account and the account has a payment method that supports auto-recharge. false for AWS Marketplace organic accounts, IBM accounts and accounts with no payment method that supports auto-recharge or with all such payment methods blocked.

enabled
boolean
required

true when auto-recharge is enabled for this section.

pmethod_id
string | null
required

Payment method used for auto-recharge. null if disabled.

amount
integer | null
required

Charge amount, in USD. null if disabled.

threshold
number | null
required
read-only

Balance level that starts a charge: a charge starts when the available balance drops below ceil(amount / 4). null if disabled. Read-only.

limits
object
required

Amount limits of the account.