post__bucket

POST /bucket

Create Bucket

Create a new storage bucket for cloud storage management.

This endpoint allows you to configure storage buckets from various cloud providers. The system supports:

  • AWS S3: Amazon Web Services Simple Storage Service

  • GCS: Google Cloud Storage

  • Azure: Microsoft Azure Blob Storage

  • S3-Compatible: Services like StorJ, Akave, and other S3-compatible providers

Supported Providers:

  • S3: AWS S3 and S3-compatible services

  • GCS: Google Cloud Storage

  • AZURE: Azure Blob Storage

Validation:

  • Bucket name must be unique within your organization

  • Storage credentials are validated before creation

  • Quota limits are checked (organization bucket limit)

Security:

  • Access keys and secrets are encrypted before storage

  • Credentials are never returned in API responses

Quota Limits:

  • Maximum buckets per organization based on subscription

  • Free trial typically includes 10 buckets

  • Quota exceeded returns 429 status code

TypeScript Client Library

public createStorageBucket = async (data: CreateBucketRequest): Promise<CreateBucketResponse> => {
  return this.makeRequest<CreateBucketResponse>('bucket', 'POST', data);
};

Code Samples

# You can also use wget
curl -X POST https://backend.flashback.tech/bucket \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

Body parameter

{
  "name": "My Backup Bucket",
  "bucket": "my-backup-bucket-2024",
  "storageType": "S3",
  "key": "AKIAIOSFODNN7EXAMPLE",
  "secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
  "region": "us-east-1",
  "endpoint": "https://gateway.storjshare.io",
  "workspaceId": "workspace-123"
}

Parameters

Name
In
Type
Required
Description

body

body

object

true

none

» name

body

string

true

Human-readable name for the bucket

» bucket

body

string

true

Actual bucket name in cloud storage

» storageType

body

string

true

Cloud storage provider type

» key

body

string

true

Access key for the storage provider

» secret

body

string

true

Secret key for the storage provider

» region

body

string

true

Storage region (e.g., us-east-1, eu-west-1)

» endpoint

body

string

false

Custom endpoint URL for S3-compatible services

» workspaceId

body

string

true

Workspace ID the bucket belongs to

Enumerated Values

Parameter
Value

» storageType

S3

» storageType

GCS

» storageType

AZURE

Example responses

200 Response

{
  "success": true,
  "bucketId": "550e8400-e29b-41d4-a716-446655440000"
}

Responses

Status
Meaning
Description
Schema

200

Bucket created successfully

Inline

400

Validation error

Inline

429

Quota exceeded

Inline

Response Schema

Status Code 200

Name
Type
Required
Restrictions
Description

» success

boolean

false

none

none

» bucketId

string

false

none

Unique identifier for the created bucket

Status Code 400

Name
Type
Required
Restrictions
Description

» success

boolean

false

none

none

» message

string

false

none

none

Status Code 429

Name
Type
Required
Restrictions
Description

» success

boolean

false

none

none

» bucketId

string

false

none

none

Last updated

Was this helpful?