# Create bucket

```http
POST /v1/tenants/{tenantId}/buckets
```

Base URL: `https://api-portal.aur.lu/api`

Operation ID: `CreateBucket`

Authentication: ApiKeyAuth (API key in header `X-Api-Key`)

Required permission: `create:s3:buckets`

Creates a new bucket for the given tenant

## Parameters

### Path parameters

- `tenantId` (string, required) — Tenant ID

## Request body (required)

Bucket create request

Content type: `application/json`

- `defaultRetention` (object)
  - `duration` (object)
    - `duration` (integer)
    - `type` (string, one of: `d`, `y`)
  - `enabled` (boolean)
  - `mode` (string, one of: `off`, `governance`, `compliance`)
- `encrypted` (boolean)
- `lock` (boolean)
- `name` (string)
- `versioning` (boolean)

Example request body:

```json
{
  "defaultRetention": {
    "duration": {
      "duration": 0,
      "type": "d"
    },
    "enabled": true,
    "mode": "off"
  },
  "encrypted": true,
  "lock": true,
  "name": "string",
  "versioning": true
}
```

## Responses

### 201 — Created

Content type: `*/*`

Type: `string`

### 400 — Bad request

Content type: `*/*`

- `message` (string)

### 403 — Forbidden

Content type: `*/*`

- `message` (string)

### 409 — Conflict

Content type: `*/*`

- `message` (string)
