> ## 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.

# Run Enrichment

> Initiate a table run, optionally for a selected range of rows and/or columns.

## Overview

This endpoint starts or reruns table execution after rows and columns are ready.
It can run the whole table, rerun failures, or scope execution to specific rows or columns.

## Example request

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

curl -X POST "https://api.extruct.ai/v1/tables/${TABLE_ID}/run" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer ${EXTRUCT_API_TOKEN}" \
  -d '{"mode":"new"}'
```

## Key parameters

* `table_id` (required): target table identifier.
* `mode` (optional): run mode. Allowed values: `new` (default), `all`, `failed`.
* `rows` (optional): row IDs to scope the run.
* `columns` (optional): column IDs to scope the run.

Practical meaning of `mode`:

* `new`: run cells that do not already have values
* `all`: rerun every eligible cell in scope
* `failed`: rerun only failed cells

Use `rows` when you want to rerun only a subset of table rows.
Use `columns` when you want to run only specific columns instead of the full schema.
When you add new columns to an existing table, the usual pattern is `mode: "new"` with the new column IDs in `columns`.

## Success signal

A successful response returns run metadata (`id`, `status`, `num_requested_cells`). Use `GET /v1/tables/{table_id}` to track `run_status` and in-progress counters.

## 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 invalid `mode`, malformed JSON, or invalid row/column IDs.

## Related endpoints

* [Get Table Endpoint](/api-reference/tables/get-table)
* [Get Table Data Endpoint](/api-reference/tables/get-table-data)

## Related guides

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


## OpenAPI

````yaml post /v1/tables/{table_id}/run
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /v1/tables/{table_id}/run:
    post:
      tags:
        - tables
      summary: Run Table
      description: >-
        Initiate a table run, optionally for a selected range of rows and/or
        columns.
      operationId: run_table_v1_tables__table_id__run_post
      parameters:
        - name: table_id
          in: path
          required: true
          schema:
            type: string
            title: Table Id
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TableRunParamsInput'
              default:
                mode: new
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TableRunOutput'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    TableRunParamsInput:
      properties:
        mode:
          $ref: '#/components/schemas/TableRunExecutionMode'
          description: >-
            Table run execution mode. NEW (default) - run cells without values;
            ALL - run all cells; FAILED - run failed cells
          default: new
        rows:
          anyOf:
            - items:
                type: string
                format: uuid
              type: array
            - type: 'null'
        columns:
          anyOf:
            - items:
                type: string
                format: uuid
              type: array
            - type: 'null'
      additionalProperties: false
      type: object
      title: TableRunParamsInput
    TableRunOutput:
      properties:
        id:
          type: string
          title: Id
        created_at:
          type: string
          format: date-time
          title: Created At
        status:
          $ref: '#/components/schemas/Status'
        rows:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
        columns:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
        num_requested_cells:
          type: integer
          title: Num Requested Cells
        mode:
          $ref: '#/components/schemas/TableRunExecutionMode'
      type: object
      required:
        - id
        - created_at
        - status
        - rows
        - columns
        - num_requested_cells
        - mode
      title: TableRunOutput
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TableRunExecutionMode:
      type: string
      enum:
        - new
        - all
        - failed
      title: TableRunExecutionMode
    Status:
      type: string
      enum:
        - created
        - in_progress
        - done
        - failed
      title: Status
    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

````