Create an object cache bucket

Add a bucket to an object cache. We first check that we can reach the bucket at the origin with its keys. The new bucket gets its own access keys. An object cache serves at most 20 buckets.

POST https://{availability_zone}.betterstackcloud.com/v1/object-proxies/{object_proxy_id}/buckets
object_proxy_id string required

The ID of the object cache.

Authorization string required

Bearer $TOKEN

Content-Type string

application/json

origin_endpoint string required

The HTTPS URL of the origin's storage service, such as https://s3.us-east-1.amazonaws.com. Must use a hostname, not an IP address, and have no credentials, path, query or fragment. Can't be changed after the bucket is added.

origin_bucket string required

The name of the bucket at the origin, at most 255 characters. Can't be changed after the bucket is added.

origin_access_key_id string required

The access key ID for the origin. We store it encrypted and never return it. An update changes only the origin keys you send.

origin_secret_access_key string required

The secret key for the origin. We store it encrypted and never return it.

name string

The bucket name clients use with the object cache, 3–63 lowercase letters, digits, dots and hyphens, starting and ending with a letter or digit. Must be unique in the object cache. Defaults to origin_bucket. Can't be changed after the bucket is added.

origin_prefix string

A folder in the bucket at the origin to serve as the whole bucket, such as tenant-a/. Clients see only the objects under it. Leave it out to serve the whole bucket. Can't be changed after the bucket is added.

origin_region string default: us-east-1

The origin's region, such as us-east-1 or auto. Defaults to us-east-1.

origin_force_path_style boolean default: true

Whether we send the bucket name in the URL path to the origin, instead of in the hostname. Defaults to true.

201 Created
{
  "id": "example",
  "name": "Example object cache bucket",
  "origin_endpoint": "https://s3.us-west-2.amazonaws.com",
  "origin_bucket": "my-bucket",
  "origin_prefix": "example",
  "origin_region": "us-east-1",
  "origin_force_path_style": true,
  "origin_creation_date": "2026-07-01T12:00:00.000Z",
  "scoped_credentials": false,
  "created_at": "2026-07-01T12:00:00.000Z"
}

Returns the newly created object cache bucket.

id string

The bucket's ID, a UUID.

name string

The bucket name clients use with the object cache, 3–63 lowercase letters, digits, dots and hyphens, starting and ending with a letter or digit.

origin_endpoint string

The HTTPS URL of the origin's storage service, such as https://s3.us-east-1.amazonaws.com.

origin_bucket string

The name of the bucket at the origin, at most 255 characters.

origin_prefix string

A folder in the bucket at the origin to serve as the whole bucket, such as tenant-a/. Clients see only the objects under it.

origin_region string

The origin's region, such as us-east-1 or auto. Defaults to us-east-1.

origin_force_path_style boolean

Whether we send the bucket name in the URL path to the origin, instead of in the hostname. Defaults to true.

origin_creation_date datetime or null

When the bucket at the origin was created, as the origin reports it. In ISO 8601 format, such as 2026-07-01T12:00:00Z.

scoped_credentials boolean

Whether the bucket has its own access keys. When it's false, rotate the bucket's keys to create them.

created_at datetime

When the bucket was added. In ISO 8601 format, such as 2026-07-01T12:00:00Z.