Create object storage bucket
Create a new R2 object storage bucket. The bucket is provisioned immediately with S3-compatible API credentials returned in the response. Optionally enable a public CDN domain by setting public_access to true.
Authorizations
Body
Geographic hint for where most data access occurs. Defaults to enam (Eastern North America). apac - Asia-Pacific. eeur - Eastern Europe. enam - Eastern North America. oc - Oceania. weur - Western Europe. wnam - Western North America. Ignored when jurisdiction is eu or fedramp, because the jurisdiction decides where the data is stored.
apac, eeur, enam, oc, weur, wnam "enam"
Data residency jurisdiction. Defaults to default (no restriction). default - no jurisdiction restriction. eu - data stored exclusively in the EU. fedramp - FedRAMP-compliant storage. It cannot be changed after the bucket is created. Buckets in eu or fedramp are only reachable through the S3 endpoint of their jurisdiction, which the response returns in endpoint.
default, eu, fedramp "default"
Identifier of the project to group this bucket under. When omitted, the bucket is not assigned to any project.
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"fb5e5168-4281-4bec-94c5-0d1584e9e657"
Response
Default Response
Identifier of the project this object storage bucket is grouped under
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"fb5e5168-4281-4bec-94c5-0d1584e9e657"
Current lifecycle state of the bucket. active - bucket is available for use. deleting - deletion is in progress, the bucket is emptied and removed asynchronously. deletionFailed - the deletion job failed, contact support to retry.
active, deleting, deletionFailed "active"
Timestamp when the object storage bucket was created, in ISO 8601 format
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$"2025-01-30T00:00:00.000Z"
Timestamp when the object storage bucket was last modified, in ISO 8601 format
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$"2025-01-30T00:00:00.000Z"