> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anyformat.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Row

> Delete a row from a table of an extraction

*Rate limit tier: **general**, 600 requests/min. See [Rate limits](https://docs.anyformat.ai/api-reference-v3/introduction.md#rate-limits).*

Deletes the row at `index` from a table field of one extraction, with its values, and answers `204 No Content`. `extraction_id` is the `id` of an entry of `results.extractions` in [Get run](https://docs.anyformat.ai/api-reference-v3/runs/get.md). The rows after it move up by one. No endpoint restores a deleted row.

Name the table by its key in the results (`sanitized_name`) or by its `persistent_id`, not both. A field's `persistent_id` is the one [Get workflow](https://docs.anyformat.ai/api-reference-v3/workflows/get.md) returns for it. `index` counts from 0 and must name an existing row: no row at that index answers `404`, and a name that reaches a field with no rows answers `422`.

The call is not idempotent: a retry deletes the next row. After a timeout, read the run before you retry.

## Errors

| Status | `error_code` | When |
| - | - | - |
| `400` | `VALIDATION_ERROR` | The body names no table, names it twice, or lacks `index`. |
| `403` | `NOT_ASSIGNED_VERIFIER` | Another user is the assigned verifier of the document. |
| `403` | `insufficient_api_key_scope` | The API key has no `write` scope. |
| `404` | `NOT_FOUND` | `params.resource_type` is `extraction` (unknown, or in another organization), `field` (no field has that `sanitized_name`) or `data_row` (no table has that `persistent_id`, or it has no row at `index`). An `extraction_id` or a `persistent_id` that is not a UUID also answers `404`, without `params`. |
| `422` | `VALIDATION_ERROR` | The name reaches a field that is not a table. |

```bash curl theme={null}
curl -X POST 'https://api.anyformat.ai/v3/extractions/0699a1c2-e14c-7606-8000-2ee4fb17b4fd/rows/delete/' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{ "sanitized_name": "holdings", "index": 0 }'
```

```python Python (SDK) theme={null}
from anyformat.sdk import Client

client = Client(api_key="YOUR_API_KEY")

client.delete_row("0699a1c2-e14c-7606-8000-2ee4fb17b4fd", 0, sanitized_name="holdings")
```

```typescript TypeScript (SDK) theme={null}
import { Anyformat } from "@anyformat/sdk";

const af = new Anyformat({ apiKey: "YOUR_API_KEY" });

await af.deleteRow("0699a1c2-e14c-7606-8000-2ee4fb17b4fd", 0, { sanitizedName: "holdings" });
```

```text Response (204 No Content) theme={null}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.