# Delete a list

Source: https://kirora.io/docs/api/reference/deleteList

`DELETE /v1/lists/{id}`

Requires an API key with the `lists:write` scope. [About keys and scopes](https://kirora.io/docs/api/reference/authentication)

Works with integration, agent and partner keys.

A repeat after success returns 404 or 409: treat that as done. [About idempotency](https://kirora.io/docs/api/reference/idempotency)

Deletes the list and its membership records. The contacts themselves are not deleted. Refused with one 409 `IN_USE` naming everything that blocks it, in the shape of `getListUsage`: campaigns not yet sent or cancelled (A/B tests included) whose audience, rules or exclusions name it, or whose content has a block shown only to, or hidden from, its members (`details.campaigns`), published forms not archived that add submitters to it or name it in a field (`details.forms`): without the list a form refuses every submission. Also goals not retired (`details.goals`), active or paused journeys (`details.journeys`), segments whose rules name it (`details.segments`), and templates (the draft or the published version) and shared blocks with such a block (`details.templates`, `details.sharedBlocks`): a "not in this list" rule must not outlive the list. Change or end those first. A sent or cancelled campaign does not block it: the campaign keeps its recipients and messages, the list leaves its `listIds` (`null` once none is left) and `audienceName` keeps the names of the lists it went to.

## Path parameters

- `id` (string, required, uuid) — The list's id.

## Header parameters

- `Kirora-Workspace` (string, optional, pattern `^[A-Za-z0-9._:-]{1,128}$`) — Partner keys only: the child workspace to act in, by the external id the partner gave it. Without it, a partner key acts in its own workspace. Any other key that sends it is refused with 403, and an unknown workspace is 404.

## Returns

Returns `204 No Content` with an empty body. It can also return `409 Conflict`; see the statuses below. Otherwise returns an error; [Errors](https://kirora.io/docs/api/reference/errors) lists every code and which to retry.

Statuses:

- `204 No Content`: The list was deleted.
- `409 Conflict`: The request conflicts with current state — a duplicate unique value, or a resource whose status does not allow this operation.

## Example

```bash
curl -X DELETE https://api.kirora.io/v1/lists/018f2a4e-6b1c-7d3e-9f40-37386ae05a6b \
  -H "Authorization: Bearer $KIRORA_API_KEY"
```
