Skip to main content
POST
/
user
/
bucket
Update Bucket Config
curl --request POST \
  --url https://api.example.com/user/bucket \
  --header 'Content-Type: application/json' \
  --data '
{
  "endpoint": "<string>",
  "bucket": "<string>",
  "region": "<string>",
  "access_key": "<string>",
  "secret_key": "<string>"
}
'
{
  "error": "Verification failed: Access Denied"
}

Overview

Configure a custom S3-compatible storage bucket for your downloads. Credentials are verified before saving.

Request

endpoint
string
required
S3 endpoint URL (e.g., https://s3.us-east-1.amazonaws.com)
bucket
string
required
Bucket name
region
string
required
AWS region (e.g., us-east-1, auto for R2)
access_key
string
required
AWS Access Key ID or equivalent
secret_key
string
required
AWS Secret Access Key or equivalent

Response

message
string
Success confirmation message

Example

curl -X POST "https://tornado.velys.software/user/bucket" \
  -H "x-api-key: sk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "endpoint": "https://s3.us-east-1.amazonaws.com",
    "bucket": "my-tornado-downloads",
    "region": "us-east-1",
    "access_key": "AKIAIOSFODNN7EXAMPLE",
    "secret_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
  }'

Error Responses

{
  "error": "Verification failed: Access Denied"
}

Verification Process

When you submit bucket configuration, Tornado:
  1. Creates an S3 client with your credentials
  2. Attempts to list the bucket (verifies read access)
  3. If successful, saves the configuration
Ensure your credentials have both read and write permissions before configuring.

Required IAM Permissions

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "s3:PutObject",
        "s3:GetObject",
        "s3:ListBucket"
      ],
      "Resource": [
        "arn:aws:s3:::your-bucket-name",
        "arn:aws:s3:::your-bucket-name/*"
      ]
    }
  ]
}

Supported Providers

ProviderEndpoint FormatRegion
AWS S3https://s3.{region}.amazonaws.comYour region
Cloudflare R2https://{account_id}.r2.cloudflarestorage.comauto
MinIOYour MinIO URLYour region
DigitalOcean Spaceshttps://{region}.digitaloceanspaces.comYour region
Backblaze B2https://s3.{region}.backblazeb2.comYour region