---
title: "Purge Deleted Configuration"
method: POST
path: "/v2/storage/components/{componentId}/configs/{configurationId}/purge"
tags: ["Components and Configurations"]
---

# Purge Deleted Configuration

`POST /v2/storage/components/{componentId}/configs/{configurationId}/purge`

## Request

- Base URL: `https://connection.keboola.com`
- URL: `https://connection.keboola.com/v2/storage/components/{componentId}/configs/{configurationId}/purge`
- Auth: one of:
  - API key in header `X-StorageApi-Token`
  - API key in header `X-KBC-ManageApiToken`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/keboola/apis/keboola-storage-api/docs/v2/storage/components/:componentId/configs/:configurationId/purge/post.ts> (a function with typed inputs; its response is checked against the schema)

Permanently removes a configuration from the trash, including all its versions, rows and metadata. This cannot be undone.

The configuration must already be deleted (in the trash) — purging a live configuration fails with `400` and
`storage.components.configurations.notInTrash`. Unlike [deleting](#tag/Components-and-Configurations)
an already-deleted configuration (which also purges, for backward compatibility), this endpoint never falls back to a
soft delete, so a stale caller can never destroy a live configuration.

Only available in the **default branch**; development branch configurations cannot be permanently removed. Requires the
`canPurgeTrash` token permission.

The `If-Match` header is **required**: purge is irreversible, so the caller must state which version of the configuration
it decided to destroy. Send the `version` field of the configuration (deleted configurations are listed with
`?isDeleted=1`) as a strong entity tag, e.g. `If-Match: "5"`. The purge is applied only if the configuration is still at
that version, otherwise nothing is removed and the request fails with `412 Precondition Failed`. A request without the
header (or with `*`, which does not pin a version) fails with `428 Precondition Required`.

The variant without `branch/{branchId}` in the URL behaves the same as the branch endpoint with `branch/default`.

## Path parameters

- `componentId` string, required
- `configurationId` string, required

## Headers

- `If-Match` string, required

## Response `204`

Configuration purged.

## Other responses

- `400`: Configuration is not in the trash (`storage.components.configurations.notInTrash`), the branch is a development branch (`storage.components.cannotDeleteConfiguration`), or the `If-Match` value is unusable.
- `403`: Token lacks the `canPurgeTrash` permission or is not allowed to manage the component.
- `404`: Component (`storage.component.notFound`) or configuration (`storage.configuration.notFound`) not found.
- `409`: Another request is mid-write on the configuration; retryable (`storage.components.configurations.versionConflict`).
- `412`: `If-Match` does not match the current version (`storage.components.configurations.versionMismatch`).
- `428`: `If-Match` header is missing or does not pin a specific version (`storage.components.configurations.missingExpectedVersion`).

---

[API](https://skmtc.dev/keboola/apis/keboola-storage-api.md) - [All operations](https://skmtc.dev/keboola/apis/keboola-storage-api/llms.txt) - [OpenAPI document](https://skmtc.dev/keboola/apis/keboola-storage-api/revisions/34b5ceac0317?raw)
