# Delete a collection

`DELETE /v1/collections/{collection_id}`

Removes the collection and its images from your account, including
Spark images generated from them, along with the collection's
scorings. The images also leave any custom benchmark
they were added to, with no warning, so a benchmark can drop below
`minimum_images` and its next scoring answers `400 BENCHMARK_TOO_SMALL`.
This cannot be undone.

A collection holding an image, or a Spark image generated from one,
that is an active hero or carousel image on a PDP cannot be deleted: the whole request is refused with
`400 COLLECTION_CONTAINS_ACTIVE_IMAGES` and nothing is removed. A
collection in another workspace or organization, or one already
deleted, answers `404 COLLECTION_NOT_FOUND`.

## Responses

### 204 — Collection and its images removed

### 400 — Check `error_code`:
  - NO_DEFAULT_PORTFOLIO: your organization has no default portfolio
  - NO_DEFAULT_WORKSPACE: your default portfolio has no default workspace
  - COLLECTION_CONTAINS_ACTIVE_IMAGES: an image in the collection, or a Spark image generated from one, is an active hero or carousel image on a PDP


**application/json**

- **object** — Standardized error format for all `/v1/*` endpoints. `error_code` is a
stable SCREAMING_SNAKE_CASE identifier clients can switch on.

  - `detail` (string) — Human-readable error message
  - `status_code` (integer) — HTTP status code
  - `error_code` (string) — Stable machine-readable error code
  - `request_id` (any) — Request identifier for correlation
  - `extra` (any) — Endpoint-specific additional context. For example,
IMAGE_DOWNLOAD_FAILED populates extra.failed_urls with per-URL
failure reasons so clients can triage bulk submissions.

  - `timestamp` (string)

### 401 — Missing or invalid Bearer token

### 404 — Check `error_code`:
  - NOT_FOUND: custom benchmarks are not enabled for your organization
  - COLLECTION_NOT_FOUND: no such collection in your default workspace, or it was already deleted


**application/json**

- **object** — Standardized error format for all `/v1/*` endpoints. `error_code` is a
stable SCREAMING_SNAKE_CASE identifier clients can switch on.

  - `detail` (string) — Human-readable error message
  - `status_code` (integer) — HTTP status code
  - `error_code` (string) — Stable machine-readable error code
  - `request_id` (any) — Request identifier for correlation
  - `extra` (any) — Endpoint-specific additional context. For example,
IMAGE_DOWNLOAD_FAILED populates extra.failed_urls with per-URL
failure reasons so clients can triage bulk submissions.

  - `timestamp` (string)

### 422 — Request validation failed (error_code VALIDATION_ERROR)

**application/json**

- **object** — Standardized error format for all `/v1/*` endpoints. `error_code` is a
stable SCREAMING_SNAKE_CASE identifier clients can switch on.

  - `detail` (string) — Human-readable error message
  - `status_code` (integer) — HTTP status code
  - `error_code` (string) — Stable machine-readable error code
  - `request_id` (any) — Request identifier for correlation
  - `extra` (any) — Endpoint-specific additional context. For example,
IMAGE_DOWNLOAD_FAILED populates extra.failed_urls with per-URL
failure reasons so clients can triage bulk submissions.

  - `timestamp` (string)

### 429 — Rate limit exceeded for this organization
