---
title: "Delete an extraction"
method: DELETE
path: "/extractions/{extraction_id}"
tags: ["Extractions"]
---

# Delete an extraction

`DELETE /extractions/{extraction_id}`

## Request

- Base URL: `https://api.invoicedataextraction.com/v1`
- URL: `https://api.invoicedataextraction.com/v1/extractions/{extraction_id}`
- Auth: HTTP bearer

Permanently deletes an extraction, its output files and its uploaded source files
(source files shared with another extraction are kept until nothing uses them). An
extraction still being processed cannot be deleted; cancel it first.

Rate limit: 30 requests per minute per API key.

## Path parameters

- `extraction_id` string, uuid, required

## Query parameters

- `scope` 'own' | 'team'

## Response `200`

Deleted.

- object
  - `success` true, required

## Other responses

- `400`: `INVALID_INPUT`: the request does not match the contract; `details.issues` lists each problem with its `path`.
- `401`: `UNAUTHENTICATED`, `API_KEY_EXPIRED` or `API_KEY_REVOKED`.
- `403`: `FORBIDDEN`: `scope=team` from a caller who is not a team admin.
- `404`: `EXTRACTION_NOT_FOUND`: no extraction with this id within the caller's scope.
- `409`: `EXTRACTION_IN_PROGRESS`: still being processed; wait for it to finish, or cancel it, then delete.
- `429`: `RATE_LIMITED`: wait `details.retry_after_seconds` (also the `Retry-After` header), then retry.
- `500`: `INTERNAL_ERROR`: retry after a short delay.

---

[API](https://skmtc.dev/invoicedataextraction/apis/invoice-data-extraction-api.md) · [All operations](https://skmtc.dev/invoicedataextraction/apis/invoice-data-extraction-api/llms.txt) · [OpenAPI document](https://skmtc.dev/invoicedataextraction/apis/invoice-data-extraction-api/revisions/16d920350483?raw)
