curl --request POST \
--url https://api.brightdata.com/dca/auto_self_healing/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"collector": "c_abc123",
"enabled": true,
"sr_threshold": 50,
"trigger_frequency": "per_day"
}
'{
"id": "ash_lz3k9qw1"
}{
"validation_errors": [
"Collector must be active"
]
}"collector_not_found"Enable Auto Self-Healing
Use the Bright Data Scraper Studio AI Flow API to enable Auto Self-Healing on a scraper and set its success rate, frequency, cooldown and daily job limits.
curl --request POST \
--url https://api.brightdata.com/dca/auto_self_healing/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"collector": "c_abc123",
"enabled": true,
"sr_threshold": 50,
"trigger_frequency": "per_day"
}
'{
"id": "ash_lz3k9qw1"
}{
"validation_errors": [
"Collector must be active"
]
}"collector_not_found"ash_lz3k9qw1, not the settings themselves.
- Send
collector,enabled,sr_thresholdandtrigger_frequencyon every request. Addmin_inputs_thresholdwhentrigger_frequencyisper_job. - Send whole numbers. Decimals are rejected.
- The scraper must be active. An inactive one returns HTTP 400 with
Collector must be active. - Every address in
notification_emailsmust belong to a user on the scraper’s account.
notification_emails when auto_save is false. The healing job runs but does not save its code, and the notification email is the only way a person sees the suggested fix.Authorizations
Use your Bright Data API Key as a Bearer token in the Authorization header.
How to authenticate:
- Obtain your API Key from the Bright Data account settings at https://brightdata.com/cp/setting/users
- Include the API Key in the Authorization header of your requests
- Format:
Authorization: Bearer YOUR_API_KEY
Example:
Authorization: Bearer b5648e1096c6442f60a6c4bbbe73f8d2234d3d8324554bd6a7ec8f3f251f07df
Learn how to get your Bright Data API key: https://docs.brightdata.com/api-reference/authentication
Body
Minimum number of job inputs required before Auto Self-Healing triggers, 10 or higher. A job with fewer inputs does not start a healing job. Required with trigger_frequency: per_job. Optional with per_day, which does not use it: the server stores 10 when the field is omitted, and null is accepted.
x >= 10100
Maximum number of Auto Self-Healing jobs allowed for the scraper in one day, from 1 to 24. Send null for no daily limit. Defaults to 8. A failed healing job still counts toward this limit and still starts the cooldown period.
1 <= x <= 243
Was this page helpful?