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

# Delete Table Rows

> Delete rows by ID.

## Overview

This endpoint permanently removes one or more rows from a table.

Deletion is bulk and row-ID based.
Send the row IDs you want to remove in `rows`.
Use it when you want to clean up bad inputs, remove duplicates, or drop rows you no longer want to run or keep.

## Example request

```bash theme={null}
export EXTRUCT_API_TOKEN="YOUR_API_TOKEN"
export TABLE_ID="YOUR_TABLE_ID"

curl -X DELETE "https://api.extruct.ai/v1/tables/${TABLE_ID}/rows" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer ${EXTRUCT_API_TOKEN}" \
  -d '{
    "rows": [
      "11111111-1111-1111-1111-111111111111",
      "22222222-2222-2222-2222-222222222222"
    ]
  }'
```

## Key parameters

* `table_id` (required): target table identifier.
* `rows` (required): array of row IDs to delete.

## Success signal

A successful response returns the deleted row IDs.

## Common errors

### `401 Unauthorized`

Check that your header is `Authorization: Bearer ${EXTRUCT_API_TOKEN}`.

### `404 Not Found`

The table ID is invalid or unavailable in your workspace.

### `422 Unprocessable Entity`

Most often caused by missing `rows`, malformed JSON, or invalid row ID values.

## Related endpoints

* [Create Table Rows Endpoint](/api-reference/tables/create-table-rows)
* [Update Table Rows Endpoint](/api-reference/tables/update-table-rows)
* [Get Table Data Endpoint](/api-reference/tables/get-table-data)
* [Get Row Endpoint](/api-reference/tables/get-table-row)

## Related guides

* [AI Tables Basics](/api-guides/ai-tables/ai-table-basics)


## OpenAPI

````yaml delete /v1/tables/{table_id}/rows
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /v1/tables/{table_id}/rows:
    delete:
      tags:
        - tables
      summary: Delete Table Rows
      description: Delete rows by ID.
      operationId: delete_table_rows_v1_tables__table_id__rows_delete
      parameters:
        - name: table_id
          in: path
          required: true
          schema:
            type: string
            title: Table Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteTableRowsInput'
            example:
              rows:
                - 11111111-1111-1111-1111-111111111111
                - 22222222-2222-2222-2222-222222222222
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
                title: Response Delete Table Rows V1 Tables  Table Id  Rows Delete
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    DeleteTableRowsInput:
      properties:
        rows:
          items:
            type: string
            format: uuid
          type: array
          title: Rows
          description: List of row IDs to delete.
      type: object
      required:
        - rows
      title: DeleteTableRowsInput
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````