---
title: Empty a bucket
description: Starts a job that deletes every object in the bucket, and returns at once.
doc_version: 0.1.0-preview
last_updated: 2026-09-14
---

# Empty a bucket

`POST /v1/workspaces/{workspaceId}/buckets/{bucketId}/empty`

Starts a job that deletes every object in the bucket, and returns at once. Poll get_job until the job status is succeeded or failed. Objects under retention stay, and the job result lists their keys. An object written while the job runs can stay. Send the exact bucket name as confirmName. Role: editor or higher.

## Authentication

Send `Authorization: Bearer <GRAPHON_API_KEY>`. Read the key from the
GRAPHON_API_KEY environment variable. Never print it.

## Path parameters

- `workspaceId` (string) — The workspace id.
- `bucketId` (string) — The bucket id.

## Request body

- `confirmName` (string) — The exact current bucket name.

## Example request

```bash
curl \
  --url "https://storage.graphon.sh/v1/workspaces/wspq7ws2np5l8z4/buckets/bktA1b2C3d4E5/empty" \
  --header "Authorization: Bearer $GRAPHON_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{"confirmName":"support-tickets"}'
```

## CLI

```bash
graphon buckets empty support-tickets --confirm-name support-tickets
```

## Sitemap

See the full [sitemap](/sitemap.md) for all pages.
