---
title: Delete a prefix
description: Deletes every live object whose key starts with the prefix, as a job.
doc_version: 0.1.0-preview
last_updated: 2026-09-14
---

# Delete a prefix

`POST /v1/workspaces/{workspaceId}/buckets/{bucketId}/prefix-actions`

Deletes every live object whose key starts with the prefix, as a job. A bucket that a dataset uses returns 409 bucket_in_use until Graphon retires the dataset. Get the job to follow it. Objects under retention stay, and the job result lists them. Each deleted version stays recoverable for the bucket recovery window. One empty or prefix job runs on a bucket at a time. 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

- `action` (string) — The action to apply. One of: delete.
- `prefix` (string) — Every live object whose key starts with this text. It is not empty: Empty a bucket deletes them all.

## Example request

```bash
curl \
  --url "https://storage.graphon.sh/v1/workspaces/wspq7ws2np5l8z4/buckets/bktA1b2C3d4E5/prefix-actions" \
  --header "Authorization: Bearer $GRAPHON_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{"action":"delete","prefix":"incidents/2025/"}'
```

## CLI

```bash
graphon objects delete support-tickets --prefix incidents/2025/
```

## Sitemap

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