---
title: "/buckets/{bucketId}"
url: "https://developers.rest.rodeo/apis/storage/versions/8415f51a-292b-4046-b795-bc13ea7a48cf/operations/deleteBucket"
---

> Full API specification: https://developers.rest.rodeo/apis/storage/versions/8415f51a-292b-4046-b795-bc13ea7a48cf.md

# /buckets/{bucketId}

`DELETE` `/buckets/{bucketId}`

Operation ID: `deleteBucket`

Deletes the bucket. Rejected with 409 while the bucket still contains objects.

## Path parameters

- `bucketId` (string, uuid, required) - The bucket id.

## Responses

- `204` - The bucket was deleted
- `401` - Missing or invalid bearer token
- `404` - No bucket with this id
- `405` - Method not allowed
- `409` - The bucket is not empty

## OpenAPI definition

```yaml
openapi: 3.0.3
info:
  title: Storage API
  version: 1.0.0
servers:
  - url: https://api.rest.rodeo/storage/api/v1
    description: Production
paths:
  /buckets/{bucketId}:
    delete:
      operationId: deleteBucket
      summary: /buckets/{bucketId}
      description: Deletes the bucket. Rejected with 409 while the bucket still
        contains objects.
      parameters:
        - $ref: "#/components/parameters/BucketId"
      responses:
        "204":
          description: The bucket was deleted
        "401":
          description: Missing or invalid bearer token
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: No bucket with this id
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "405":
          description: Method not allowed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "409":
          description: The bucket is not empty
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
security:
  - bearerAuth: []
components:
  parameters:
    BucketId:
      name: bucketId
      in: path
      required: true
      schema:
        type: string
        format: uuid
      description: The bucket id.
  schemas:
    Error:
      type: object
      required:
        - error
      additionalProperties: false
      properties:
        error:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
```
