---
title: "Delete a saved extraction schema"
method: DELETE
path: "/v1/extraction-schemas/{id}"
tags: ["Documents"]
---

# Delete a saved extraction schema

`DELETE /v1/extraction-schemas/{id}`

## Request

- Base URL: `https://console.nace.ai`
- URL: `https://console.nace.ai/v1/extraction-schemas/{id}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/nace/apis/drex-api/docs/v1/extraction-schemas/:id/delete.ts> (a function with typed inputs; its response is checked against the schema)

Deletes the schema with every version. Free, and works at any balance.

- **After:** reading it, adding a version, or naming its `schema_id` on an extract answers `404 schema_not_found`, and it leaves the list.
- **Running extracts:** an extract already accepted keeps the copy of the schema it took and finishes; its result still names the `schema_id` and `schema_version` it used.
- **Repeats:** deleting a schema that is already deleted answers `204` again.
- **Nace's schemas** (`owner: "platform"`) can't be deleted; they answer `404`.

## Path parameters

- `id` string, required

## Response `204`

Deleted, or already deleted.

## Other responses

- `401`: Missing or invalid API key (`authentication_error`, code `invalid_api_key`).
- `404`: No schema with this id for this account (`not_found_error`, code `schema_not_found`). Another account's schema id and Nace's own schemas answer the same.
- `429`: Over the account's requests per minute for document routes, or the document service is throttling this account (`rate_limit_error`).
- `500`: Something failed on Drex's side (`internal_error`).
- `502`: The document service refused Drex's own request (`upstream_error`, code `ndi_refused_drex`). Retry later.
- `503`: The document service is unavailable (`service_unavailable`).

---

[API](https://skmtc.dev/nace/apis/drex-api.md) - [All operations](https://skmtc.dev/nace/apis/drex-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nace/apis/drex-api/revisions/a0e62d925a61?raw)
