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

# Create Table Columns

> Create new columns in the table.

## Overview

This endpoint adds columns to an existing table.
It is the normal way to grow a workflow step by step instead of locking the full schema upfront.
This works especially well when you:

* start with a minimal table and add enrichment later
* test a few columns before rolling out the full workflow
* add new scoring or research fields to a table that already has data

## 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}/columns" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer ${EXTRUCT_API_TOKEN}" \
  -d '{
    "column_configs": [
      {
        "kind": "agent",
        "name": "Description",
        "key": "description",
        "value": {
          "agent_type": "research_pro",
          "prompt": "Describe what the company does in 2 sentences.",
          "output_format": "text"
        }
      }
    ],
    "insert_after": true
  }'
```

## Key parameters

* `table_id` (required): target table identifier.
* `column_configs` (required): list of new column config objects.
* `insert_after` (optional): defaults to `true`; can be `true`, `false`, or a column ID string.

## Success signal

A successful response includes updated column definitions for the table.

## 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 `column_configs` shape or unsupported `insert_after` value.

## Related endpoints

* [Update Table Column Endpoint](/api-reference/tables/update-table-column)
* [Delete Table Column Endpoint](/api-reference/tables/delete-table-column)

## Related guides

* [Column Guide](/api-guides/ai-tables/column-guide)
* [Column Library](/api-guides/ai-tables/column-library)


## OpenAPI

````yaml post /v1/tables/{table_id}/columns
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /v1/tables/{table_id}/columns:
    post:
      tags:
        - tables
      summary: Create Table Columns
      description: Create new columns in the table.
      operationId: create_table_columns_v1_tables__table_id__columns_post
      parameters:
        - name: table_id
          in: path
          required: true
          schema:
            type: string
            title: Table Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTableColumnsInput'
              examples:
                - column_configs:
                    - kind: agent
                      name: Company Description
                      key: description
                      value:
                        agent_type: research_pro
                        prompt: >-
                          Research the company {input} and provide a short
                          description.
                        output_format: text
                    - kind: agent
                      name: Company Linkedin URL
                      key: linkedin_url
                      value:
                        agent_type: research_pro
                        prompt: Find linkedin profile URL of the company {input}
                        output_format: url
                    - kind: agent
                      name: Company Linkedin Data
                      key: linkedin_data
                      value:
                        agent_type: linkedin
                        prompt: '{linkedin_url}'
                        output_format: text
                    - kind: agent
                      name: Linkedin Activity Summary
                      key: linkedin_activity
                      value:
                        agent_type: llm
                        prompt: >-
                          Based on the company Linkedin profile data, summarize
                          the recent activity as a bulleted list with names,
                          dates and links. Data: {linkedin_data}
                        output_format: text
                  insert_after: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ColumnOutputSchema'
                title: >-
                  Response Create Table Columns V1 Tables  Table Id  Columns
                  Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    CreateTableColumnsInput:
      properties:
        column_configs:
          items:
            anyOf:
              - $ref: '#/components/schemas/InputColumnConfig'
              - $ref: '#/components/schemas/AgentColumnConfig-Input'
              - $ref: '#/components/schemas/CriterionGradeColumnConfig'
              - $ref: '#/components/schemas/PeopleFinderColumnConfig'
              - $ref: '#/components/schemas/DiscoveryScoresColumnConfig'
              - $ref: '#/components/schemas/CompanyNameColumnConfig'
              - $ref: '#/components/schemas/CompanyWebsiteColumnConfig'
              - $ref: '#/components/schemas/CompanyProfileColumnConfig'
              - $ref: '#/components/schemas/EmailFinderColumnConfig'
              - $ref: '#/components/schemas/PhoneFinderColumnConfig'
              - $ref: '#/components/schemas/ReverseEmailLookupColumnConfig'
          type: array
          title: Column Configs
        insert_after:
          anyOf:
            - type: string
            - type: boolean
          description: >-
            Insert new columns after this column id. If true (default), insert
            in the end. If false, insert in the beginning.
          default: true
      type: object
      required:
        - column_configs
      title: CreateTableColumnsInput
    ColumnOutputSchema:
      properties:
        id:
          type: string
          title: Id
        created_at:
          type: string
          format: date-time
          title: Created At
        config:
          anyOf:
            - $ref: '#/components/schemas/InputColumnConfig'
            - $ref: '#/components/schemas/AgentColumnConfig-Output'
            - $ref: '#/components/schemas/CriterionGradeColumnConfig'
            - $ref: '#/components/schemas/PeopleFinderColumnConfig'
            - $ref: '#/components/schemas/DiscoveryScoresColumnConfig'
            - $ref: '#/components/schemas/CompanyNameColumnConfig'
            - $ref: '#/components/schemas/CompanyWebsiteColumnConfig'
            - $ref: '#/components/schemas/CompanyProfileColumnConfig'
            - $ref: '#/components/schemas/EmailFinderColumnConfig'
            - $ref: '#/components/schemas/PhoneFinderColumnConfig'
            - $ref: '#/components/schemas/ReverseEmailLookupColumnConfig'
      type: object
      required:
        - id
        - created_at
        - config
      title: ColumnOutputSchema
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    InputColumnConfig:
      properties:
        kind:
          type: string
          const: input
          title: Kind
          default: input
        name:
          type: string
          title: Name
        key:
          type: string
          title: Key
      type: object
      required:
        - name
        - key
      title: InputColumnConfig
    AgentColumnConfig-Input:
      properties:
        kind:
          type: string
          const: agent
          title: Kind
          default: agent
        name:
          type: string
          title: Name
        key:
          type: string
          title: Key
        value:
          $ref: '#/components/schemas/AgentColumnSchema'
      type: object
      required:
        - name
        - key
        - value
      title: AgentColumnConfig
    CriterionGradeColumnConfig:
      properties:
        kind:
          type: string
          const: criterion_grade
          title: Kind
          default: criterion_grade
        name:
          type: string
          title: Name
        key:
          type: string
          title: Key
        value:
          $ref: '#/components/schemas/CriterionGraderAgentSchema'
      type: object
      required:
        - name
        - key
        - value
      title: CriterionGradeColumnConfig
    PeopleFinderColumnConfig:
      properties:
        kind:
          type: string
          const: company_people_finder
          title: Kind
          default: company_people_finder
        name:
          type: string
          title: Name
        key:
          type: string
          title: Key
        value:
          $ref: '#/components/schemas/PeopleFinderAgentSchema'
      type: object
      required:
        - name
        - key
        - value
      title: PeopleFinderColumnConfig
    DiscoveryScoresColumnConfig:
      properties:
        kind:
          type: string
          const: discovery_scores
          title: Kind
          default: discovery_scores
        name:
          type: string
          title: Name
        key:
          type: string
          title: Key
        criteria:
          anyOf:
            - additionalProperties:
                $ref: '#/components/schemas/CriterionDefinition'
              type: object
            - type: 'null'
          description: Criteria definitions keyed by criterion.key
      type: object
      required:
        - name
        - key
      title: DiscoveryScoresColumnConfig
    CompanyNameColumnConfig:
      properties:
        kind:
          type: string
          const: company_name
          title: Kind
          default: company_name
        name:
          type: string
          title: Name
        key:
          type: string
          title: Key
      type: object
      required:
        - name
        - key
      title: CompanyNameColumnConfig
      description: >-
        System column for company name - automatically populated from company
        enrichment.
    CompanyWebsiteColumnConfig:
      properties:
        kind:
          type: string
          const: company_website
          title: Kind
          default: company_website
        name:
          type: string
          title: Name
        key:
          type: string
          title: Key
      type: object
      required:
        - name
        - key
      title: CompanyWebsiteColumnConfig
      description: >-
        System column for company website - automatically populated from company
        enrichment.
    CompanyProfileColumnConfig:
      properties:
        kind:
          type: string
          const: company_profile
          title: Kind
          default: company_profile
        name:
          type: string
          title: Name
        key:
          type: string
          title: Key
      type: object
      required:
        - name
        - key
      title: CompanyProfileColumnConfig
      description: >-
        System column for complete company profile - automatically populated
        from company enrichment.
    EmailFinderColumnConfig:
      properties:
        kind:
          type: string
          const: email_finder
          title: Kind
          default: email_finder
        name:
          type: string
          title: Name
        key:
          type: string
          title: Key
      type: object
      required:
        - name
        - key
      title: EmailFinderColumnConfig
      description: Configuration for email finder columns.
    PhoneFinderColumnConfig:
      properties:
        kind:
          type: string
          const: phone_finder
          title: Kind
          default: phone_finder
        name:
          type: string
          title: Name
        key:
          type: string
          title: Key
      type: object
      required:
        - name
        - key
      title: PhoneFinderColumnConfig
      description: Configuration for phone finder columns.
    ReverseEmailLookupColumnConfig:
      properties:
        kind:
          type: string
          const: reverse_email_lookup
          title: Kind
          default: reverse_email_lookup
        name:
          type: string
          title: Name
        key:
          type: string
          title: Key
        email_column_key:
          type: string
          title: Email Column Key
      type: object
      required:
        - name
        - key
        - email_column_key
      title: ReverseEmailLookupColumnConfig
      description: >-
        Configuration for reverse email lookup columns.


        Given an email address, returns LinkedIn profile data via FullEnrich
        API.
    AgentColumnConfig-Output:
      properties:
        kind:
          type: string
          const: agent
          title: Kind
          default: agent
        name:
          type: string
          title: Name
        key:
          type: string
          title: Key
        value:
          $ref: '#/components/schemas/AgentColumnSchema'
      type: object
      required:
        - name
        - key
        - value
      title: AgentColumnConfig
    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
    AgentColumnSchema:
      properties:
        agent_type:
          $ref: '#/components/schemas/AgentType'
          default: research_pro
        prompt:
          type: string
          title: Prompt
          default: ''
        output_format:
          $ref: '#/components/schemas/AgentOutputFormat'
          default: text
        labels:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
        output_schema:
          anyOf:
            - additionalProperties: true
              type: object
            - {}
            - type: 'null'
        extra_dependencies:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
      type: object
      title: AgentColumnSchema
    CriterionGraderAgentSchema:
      properties:
        criterion:
          type: string
          title: Criterion
      type: object
      required:
        - criterion
      title: CriterionGraderAgentSchema
    PeopleFinderAgentSchema:
      properties:
        roles:
          items:
            type: string
          type: array
          minItems: 1
          title: Roles
        provider:
          type: string
          const: research_pro
          title: Provider
          default: research_pro
        max_results:
          type: integer
          title: Max Results
          default: 5
      type: object
      required:
        - roles
      title: PeopleFinderAgentSchema
    CriterionDefinition:
      properties:
        key:
          type: string
          pattern: ^[a-zA-Z][a-zA-Z0-9_]*$
          title: Key
          description: Unique identifier for this criterion (e.g., "is_ai_company")
        name:
          type: string
          maxLength: 100
          minLength: 1
          title: Name
          description: Human-readable name for this criterion (e.g., "AI Company")
        criterion:
          type: string
          maxLength: 500
          minLength: 10
          title: Criterion
          description: The actual criterion text to evaluate against companies
      type: object
      required:
        - key
        - name
        - criterion
      title: CriterionDefinition
      description: Definition of a criterion for evaluating companies in discovery tasks
    AgentType:
      type: string
      enum:
        - research
        - research_pro
        - research_reasoning
        - llm
        - linkedin
      title: AgentType
    AgentOutputFormat:
      type: string
      enum:
        - text
        - url
        - number
        - email
        - label
        - json
        - grade
        - people
        - numeric
        - money
        - date
        - phone
        - select
        - multiselect
      title: AgentOutputFormat
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````