curl --request POST \
--url https://api.brightdata.com/webarchive/destinations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "archive snapshots",
"bucket": "my-bucket",
"prefix": "brightdata/archive",
"credentials": {
"access_key_id": "AKIA...",
"secret_access_key": "..."
}
}
'{
"id": "dst_0123456789abcdef0123456789abcdef",
"customer_id": "YOUR_ACCOUNT_ID",
"name": "archive snapshots",
"target": {
"provider": "s3",
"auth_mode": "access_keys",
"bucket": "my-bucket",
"prefix": "brightdata/archive"
},
"validation": {
"status": "valid",
"checks": {
"location": true,
"multipart_abort": true,
"multipart_write": true,
"list": true,
"read": true
},
"probe_key": "brightdata/archive/.brd-destination-probe/...",
"probe_deleted": true,
"location": {
"provider": "s3",
"regions": [
"eu-west-1"
],
"type": "single",
"source": "GetBucketLocation",
"checked_at": "2026-11-20T10:00:00.000Z"
},
"checked_at": "2026-11-20T10:00:00.000Z",
"expires_at": "2026-11-21T10:00:00.000Z"
},
"target_revision": 1,
"auth_revision": 1,
"next_validation_at": "2026-11-20T10:05:00.000Z",
"created_at": "2026-11-20T10:00:00.000Z",
"updated_at": "2026-11-20T10:00:00.000Z"
}Destinations
Create a Web Archive destination
Save an S3, GCS, Azure Blob, OCI or Alibaba OSS bucket as a Web Archive destination. POST /webarchive/destinations validates it with a test upload.
POST
/
webarchive
/
destinations
curl --request POST \
--url https://api.brightdata.com/webarchive/destinations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "archive snapshots",
"bucket": "my-bucket",
"prefix": "brightdata/archive",
"credentials": {
"access_key_id": "AKIA...",
"secret_access_key": "..."
}
}
'{
"id": "dst_0123456789abcdef0123456789abcdef",
"customer_id": "YOUR_ACCOUNT_ID",
"name": "archive snapshots",
"target": {
"provider": "s3",
"auth_mode": "access_keys",
"bucket": "my-bucket",
"prefix": "brightdata/archive"
},
"validation": {
"status": "valid",
"checks": {
"location": true,
"multipart_abort": true,
"multipart_write": true,
"list": true,
"read": true
},
"probe_key": "brightdata/archive/.brd-destination-probe/...",
"probe_deleted": true,
"location": {
"provider": "s3",
"regions": [
"eu-west-1"
],
"type": "single",
"source": "GetBucketLocation",
"checked_at": "2026-11-20T10:00:00.000Z"
},
"checked_at": "2026-11-20T10:00:00.000Z",
"expires_at": "2026-11-21T10:00:00.000Z"
},
"target_revision": 1,
"auth_revision": 1,
"next_validation_at": "2026-11-20T10:05:00.000Z",
"created_at": "2026-11-20T10:00:00.000Z",
"updated_at": "2026-11-20T10:00:00.000Z"
}POST /webarchive/destinations saves a bucket, an optional prefix and the credentials to write to it, validates the bucket with a real test upload and returns the destination with its id.
What create does depends on
auth_mode:access_keys,service_account_key,shared_key,sas_token: validated before it is stored. On failure nothing is stored:422 destination_validation_failed,503 destination_validation_unavailableor429 destination_validation_busy.assume_role: stored first, then validated in the same request (up to about 75 seconds). Always200; checkvalidation.status.
Each create makes a new destination, even with an identical body. Don’t retry a create blindly after a timeout: list your destinations first.
To use an IAM role, allow The role needs
arn:aws:iam::422310177405:role/brd.ec2.zs-dca-delivery to call sts:AssumeRole in the trust policy of the role, and require your Bright Data Account ID from Account Settings as the external ID:{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Principal": {"AWS": "arn:aws:iam::422310177405:role/brd.ec2.zs-dca-delivery"},
"Action": "sts:AssumeRole",
"Condition": {"StringEquals": {"sts:ExternalId": "YOUR_ACCOUNT_ID"}}
}]
}
s3:PutObject and s3:AbortMultipartUpload on the bucket.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
application/json
Response
Destination created. For assume_role, a 200 response does not mean the bucket is valid: check validation.status.
Was this page helpful?