# Create and delete buckets

> Create a bucket in any region that offers Object Storage, follow the naming rules, and delete a bucket with or without its objects.

Source: https://www.coritan.com/docs/object-storage/buckets/

In the dashboard:

- /dashboard/storage/…/buckets: https://www.coritan.com/dashboard/storage

A *bucket* holds objects under one name. Each Object Storage service holds up to 25 buckets, and each bucket lives in one region. You create and delete buckets on the service's **Buckets** tab, or through the API. Access keys cannot create or delete buckets, so S3 commands such as `aws s3 mb` are refused.

## Before you begin

- Sign in to the [dashboard](https://www.coritan.com/dashboard/storage) and open the service.
- The service must be `active` to create or delete a bucket. While it waits for payment, while we set it up and while it is suspended, you can browse its buckets and download objects.

## Bucket names

Every bucket name on your account starts with your account namespace and a hyphen, such as `u7-`. The **Name** field shows this prefix in front of what you type, and every client uses the whole name. The **Bucket prefix** row on the **Overview** tab shows yours.

A bucket name must follow these rules:

- The whole name, prefix included, is 3–63 characters long. With the prefix `u7-`, the part you type can be up to 60 characters.
- It uses only lowercase letters, digits, hyphens (`-`) and dots (`.`).
- It starts and ends with a letter or a digit.
- A dot cannot sit next to another dot or next to a hyphen, so `u7-my..files` and `u7-my.-files` are refused. Two hyphens in a row are allowed.

We change uppercase letters to lowercase. When you type the prefix yourself, we do not add it a second time.

Names are unique across your account, so two of your services cannot both have a bucket called `u7-assets`. After you delete a bucket, its name stays taken for 7 days.

You cannot rename a bucket or move it to another region. To change either, create a new bucket and copy the objects into it with an S3 client.

## Create a bucket

1. Open the service and select the **Buckets** tab.
2. Select **Create bucket…**.
3. In **Name**, type the part after your prefix, such as `assets`. The hint shows the full name and its length, such as `Full name: u7-assets · 9/63`. When the name breaks a rule, the message under the field says which.
4. Under **Region**, choose where the bucket lives. The service's home region is selected at first. The list holds every region that can take a bucket right now.
5. Select **Create bucket**.

A message confirms it, such as `u7-assets created.`, and the bucket appears in the list.

## Read the bucket list

The **Buckets** card says how many buckets the service has out of its limit, such as `3 of 25 on this service.` The list is sorted by name, and each column heading sorts it another way.

**Bucket**
: The bucket's full name. Select it, or anywhere in its row, to browse its objects ([Upload, download and delete objects](/docs/object-storage/objects/)).

**Region**
: The code of the region the bucket lives in, such as `FRA`.

**Objects** and **Size**
: How many objects the bucket held, and their total size, at the last measurement. We measure every bucket once an hour.

**Measured**
: When we last measured the bucket. `Not yet` means we have not measured it since you created it.

**Created**
: The date you created the bucket.

The menu at the end of each row has **Browse objects** and, while the service is active, **Delete bucket…**.

## Delete a bucket

> [!CAUTION]
> Deleting a bucket with its contents destroys every object in it straight away. There is no undo and no copy.

1. On the **Buckets** tab, open the bucket's menu and select **Delete bucket…**.
2. Read the dialog. For an empty bucket, it says that you lose nothing. For a bucket that holds objects, it gives how many objects and how much data you would destroy.
3. For a bucket that holds objects, tick the box that offers to destroy them, such as `Destroy the 1,284 objects in it`. Without the tick, we refuse to delete the bucket.
4. Type the bucket's full name, such as `u7-assets`.
5. Select **Delete bucket**, or **Delete bucket and contents** for a bucket that holds objects.

A message confirms it, such as `u7-assets deleted.` or `u7-assets deleted with 1,284 objects.`

The dialog decides whether a bucket holds objects from the last hourly measurement. When you added objects to an empty bucket since then, the dialog shows no box, and we refuse the delete with `u7-assets is not empty. Delete it with force to destroy its contents as well.` Wait for the next measurement and try again, delete the objects first ([Delete objects and folders](/docs/object-storage/objects/#delete-objects-and-folders)), or delete the bucket through the API with `force=true`.

## Result

The bucket leaves the list at once, and:

- Its objects are destroyed. Clients that address the bucket get `NoSuchBucket`.
- Access keys whose scope is that one bucket stop working. They stay on the **Access keys** tab, marked **Inactive**, until we remove them with the bucket 7 days later.
- The bucket's name stays taken for 7 days.

A new bucket answers at its region's endpoint, such as `https://s3.fra.coritan.com:7337/u7-assets`, for every key whose scope covers it. A key whose scope is **All buckets on this account** covers it from the start.

## Troubleshooting

`A bucket named u7-assets already exists`
: Your account already has a bucket with that name, on this service or on another one. Choose another name.

`u7-assets was deleted recently and is still being removed. Pick another name, or wait for the removal to finish.`
: You deleted a bucket with that name in the last 7 days. Choose another name, or wait until 7 days have passed since the delete.

`This service already has 25 buckets, which is the most one service may hold`
: Delete a bucket you no longer need, or order another service. The **Create bucket…** button is greyed out while the service is at its limit.

An error under **Name**, such as `Dots and hyphens cannot be next to each other.`
: The name breaks one of the rules in [Bucket names](#bucket-names). Change it.

`No region is available right now`
: No region can take a bucket at the moment. Try again later, or [contact support](/docs/support/conversations/).

`That region does not offer object storage`
: The region stopped taking buckets after you opened the dialog. Choose another region.

`u7-assets is not empty. Delete it with force to destroy its contents as well.`
: The bucket holds objects that the last measurement did not count. [Delete a bucket](#delete-a-bucket) gives three ways forward.

`This service is suspended; it can be changed once it is active`
: You can create and delete buckets only while the service is `active`. Pay the overdue invoice ([Failed payments and suspended services](/docs/billing/failed-payments/)), then try again. The same message names the status `pending` while the service waits for payment.

**Create bucket…** is missing
: The service is not active. The tab says `Buckets can be created and deleted once the service is active; browsing works now.`

`Gateway refused the bucket:` followed by a reason
: The region's storage refused the request. Try again in a minute. If it keeps happening, [contact support](/docs/support/conversations/) with the whole message.

## Related

- [Upload, download and delete objects](/docs/object-storage/objects/)
- [Create and revoke access keys](/docs/object-storage/access-keys/)
- [Object Storage limits](/docs/object-storage/limits/)
- [Troubleshoot Object Storage](/docs/object-storage/troubleshooting/)

## With the API

Each request takes the service ID. A service that is not Object Storage on your account answers `404` with `Object storage service not found`.

### List buckets

[`GET /api/v1/client/object-storage/{service_id}/buckets`](/docs/api/reference/client/object-storage/#op-get-api-v1-client-object-storage-service-id-buckets) lists the service's buckets, sorted by name:

```bash
curl https://api.coritan.com/api/v1/client/object-storage/1207/buckets \
  -H "Authorization: Bearer $CORITAN_TOKEN"
```

```json
{
  "items": [
    {
      "id": 31,
      "name": "u7-assets",
      "region": "fra",
      "location_id": 1,
      "location_name": "Frankfurt",
      "quota_bytes": null,
      "used_bytes": 48318382080,
      "object_count": 1284,
      "usage_measured_at": "2026-09-26T09:00:00",
      "created_at": "2026-09-01T10:01:00",
      "deleted_at": null,
      "endpoint": "https://s3.fra.coritan.com:7337",
      "url": "https://s3.fra.coritan.com:7337/u7-assets"
    },
    {
      "id": 32,
      "name": "u7-backups",
      "region": "fra",
      "location_id": 1,
      "location_name": "Frankfurt",
      "quota_bytes": null,
      "used_bytes": 0,
      "object_count": 0,
      "usage_measured_at": null,
      "created_at": "2026-09-26T08:40:00",
      "deleted_at": null,
      "endpoint": "https://s3.fra.coritan.com:7337",
      "url": "https://s3.fra.coritan.com:7337/u7-backups"
    }
  ],
  "total": 2,
  "bucket_prefix": "u7-",
  "max_buckets": 25
}
```

Use `id` as the `bucket_id` in the other bucket and object requests, and `name` in S3 clients. `endpoint` is the regional endpoint the bucket answers at, and `url` is the bucket's address there. `used_bytes` and `object_count` come from the last hourly measurement at `usage_measured_at`, which is `null` until the first one. The list leaves out deleted buckets, so `deleted_at` is `null`.

[`GET /api/v1/client/object-storage/{service_id}/buckets/{bucket_id}`](/docs/api/reference/client/object-storage/#op-get-api-v1-client-object-storage-service-id-buckets-bucket-id) returns one bucket in the same shape. A bucket that is not on this service, or that you deleted, answers `404` with `Bucket not found`.

### Create a bucket through the API

[`POST /api/v1/client/object-storage/{service_id}/buckets`](/docs/api/reference/client/object-storage/#op-post-api-v1-client-object-storage-service-id-buckets) takes the name, with or without your prefix, and optionally a region's `location_id` from [`GET /api/v1/client/object-storage/regions`](/docs/api/reference/client/object-storage/#op-get-api-v1-client-object-storage-regions). Without `location_id`, the bucket goes in the service's home region.

```bash
curl -X POST https://api.coritan.com/api/v1/client/object-storage/1207/buckets \
  -H "Authorization: Bearer $CORITAN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "assets", "location_id": 1}'
```

It answers `201` with the new bucket in the shape above. The errors:

| Status | `detail` | Cause |
| --- | --- | --- |
| `409` | `This service is pending; it can be changed once it is active` | The service is not `active`. The message names its status. |
| `409` | `This service already has 25 buckets, which is the most one service may hold` | The service is at its limit. |
| `409` | `A bucket named u7-assets already exists` | Your account has a bucket with that name. |
| `409` | `u7-assets was deleted recently and is still being removed. Pick another name, or wait for the removal to finish.` | You deleted a bucket with that name in the last 7 days. |
| `422` | `Bucket name is required` | The name is empty, or holds only your prefix. |
| `422` | `Bucket names are 3 to 63 characters including the account prefix` | The full name is too long. |
| `422` | `Bucket names use lowercase letters, digits, hyphens and dots, and start and end with a letter or digit` | The name has another character, or starts or ends with a dot or hyphen. |
| `422` | `Bucket names cannot have a dot next to another dot or a hyphen` | The name holds `..`, `.-` or `-.`. |
| `422` | `That region does not offer object storage` | The location cannot take a bucket. |
| `502` | `Gateway refused the bucket:` and a reason | The region's storage refused the request. |

### Delete a bucket through the API

[`DELETE /api/v1/client/object-storage/{service_id}/buckets/{bucket_id}`](/docs/api/reference/client/object-storage/#op-delete-api-v1-client-object-storage-service-id-buckets-bucket-id) deletes an empty bucket. Add `force=true` to destroy its objects as well:

```bash
curl -X DELETE "https://api.coritan.com/api/v1/client/object-storage/1207/buckets/31?force=true" \
  -H "Authorization: Bearer $CORITAN_TOKEN"
```

```json
{"ok": true, "bucket": "u7-assets", "region": "fra", "objects_destroyed": 1284}
```

`objects_destroyed` counts the objects the request destroyed. Without `force`, a bucket that holds objects answers `409` with `u7-assets is not empty. Delete it with force to destroy its contents as well.`, and nothing is deleted. A service that is not `active` answers `409` as it does for a create.

## API

- `GET /api/v1/client/object-storage/{service_id}/buckets`: List buckets (https://www.coritan.com/docs/api/reference/client/object-storage/#op-get-api-v1-client-object-storage-service-id-buckets)
- `POST /api/v1/client/object-storage/{service_id}/buckets`: Make a bucket in the chosen region, or the service's home region (https://www.coritan.com/docs/api/reference/client/object-storage/#op-post-api-v1-client-object-storage-service-id-buckets)
- `GET /api/v1/client/object-storage/{service_id}/buckets/{bucket_id}`: Get bucket (https://www.coritan.com/docs/api/reference/client/object-storage/#op-get-api-v1-client-object-storage-service-id-buckets-bucket-id)
- `DELETE /api/v1/client/object-storage/{service_id}/buckets/{bucket_id}`: Remove a bucket (https://www.coritan.com/docs/api/reference/client/object-storage/#op-delete-api-v1-client-object-storage-service-id-buckets-bucket-id)
