Skip to main content
PUT
The PUT /billing/autorecharge/dataset endpoint turns dataset auto-recharge on or off on your Bright Data account, and sets the payment method it charges. The regular 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/dataset 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 dataset auto-recharge?

Send enabled: true with a pmethod_id. Dataset auto-recharge takes no amount:
  1. Get a payment method ID where autorecharge_supported is true from GET /billing/pmethods.
  2. Send the request:
The response returns the new dataset auto-recharge settings: available, enabled and pmethod_id. Dataset auto-recharge is available when regular auto-recharge is available and the account has a dataset zone. Check dataset.available in GET /billing/autorecharge.

How much does dataset auto-recharge charge?

Dataset auto-recharge charges only when a dataset snapshot build starts and the balance cannot cover the snapshot cost. The charge happens at the start of the snapshot build and is the larger of $50 and the amount the balance is short for that snapshot:

How do I turn off dataset auto-recharge?

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

How does PUT update the settings?

The request body holds all the settings for the dataset section, and the request is idempotent. Sending the same body twice leaves the same settings.

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"

Response

New dataset auto-recharge settings

available
boolean
required

true when regular auto-recharge is available and the account has a dataset zone.

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.