---
title: "Creates an S3 bucket in the project and returns the created bucket."
method: POST
path: "/projects/{project_id}/storage/s3/buckets"
tags: ["S3Buckets"]
---

# Creates an S3 bucket in the project and returns the created bucket.

`POST /projects/{project_id}/storage/s3/buckets`

## Path parameters

- `project_id` string, required

## Request body

- CreateS3BucketRequest
  - `location` string, required — Location to create the bucket in.
  - `name` string, required — Name for the new bucket. Must be DNS-compliant: 3-63 characters, using lowercase letters, numbers, and hyphens.
  - `object_lock_enabled` boolean — Whether to enable object lock on the new bucket. Requires versioning to be enabled and cannot be disabled once enabled.
  - `retention_period` integer — Length of the object lock retention period, in the unit given by retention_period_unit.
  - `retention_period_unit` string — enum: days,years
  - `tags` object — Tags to apply to the new bucket as key-value pairs.
  - `versioning_state` string — enum: disabled,enabled,suspended

## Response `200`

- S3Bucket — This is the REST-friendly model for the `BucketInfo` proto.
  - `archived_at` string — Archive timestamp of the bucket, in RFC3339 format.
  - `bucket_size` number, float — Size of the bucket, in GiB.
  - `created_at` string, required — Creation timestamp of the bucket, in RFC3339 format.
  - `location` string, required — Location where the bucket is hosted.
  - `name` string, required — Name of the bucket.
  - `object_lock_enabled` boolean, required — Whether object lock is enabled.
  - `project_id` string, required — ID of the project that owns the bucket.
  - `retention_mode` string — enum: governance,compliance
  - `retention_period` integer — Length of the object lock retention period, in the unit given by retention_period_unit.
  - `retention_period_unit` string — enum: days,years
  - `s3_url` string — Endpoint URL for accessing the bucket.
  - `tags` object — Tags applied to the bucket as key-value pairs.
  - `updated_at` string, required — Last update timestamp of the bucket, in RFC3339 format.
  - `user_id` string, required — ID of the S3 user that owns the bucket.
  - `versioning_state` string, required — enum: disabled,enabled,suspended

## Other responses

- `400` — Error Bad Request
- `401` — Error Authentication Failed
- `403` — Error Permissions
- `500` — Error Internal Server

---

[API](https://skmtc.net/crusoecloud/apis/crusoe-cloud-api-gateway.md) · [All operations](https://skmtc.net/crusoecloud/apis/crusoe-cloud-api-gateway/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/crusoecloud/crusoe-cloud-api-gateway/versions/a3fd2dedc72b/schema)
