Skip to main content
Documentation

API Reference

Update column

HTTP Reference
PATCH/api/tables/{table_id}/columns/{column_id}

Required scope: columns:write

Patch an existing column (label/config/position/auto-run). Use this to enable or adjust auto-run after creation.

Updated September 3, 2026

This page documents the canonical HTTP contract for this endpoint.

Path parameters

  • table_idRequired

    string

    Target table ID.

  • column_idRequired

    string

    Target column ID.

Body parameters

  • labelOptional

    string

    Updated display label.

  • positionOptional

    number

    Updated explicit float sort order for the column.

  • isImportantOptional

    boolean

    Marks or unmarks the column as a favorite/starred context field for draft and calling fallback.

  • configOptional

    object

    Updated column config.

  • config.providerOptional

    string

    Provider key (for example add_to_crm, sync_to_table, add_to_sequence).

  • config.destinationTableIdOptional

    string

    sync_to_table single destination id.

  • config.columnMappingsOptional

    array<object>

    sync_to_table mapping entries (sourceKey/destKey) or route-level mappings.

  • config.routesOptional

    array<object>

    sync_to_table router routes (first matching route wins); routes can define condition, syncMode, syncBehavior, listSourceColumnId, listPath, and columnMappings.

  • config.syncModeOptional

    string

    sync_to_table mode: row or list.

  • config.syncBehaviorOptional

    string

    sync_to_table behavior: link or copy.

  • config.listSourceColumnIdOptional

    string

    sync_to_table list mode source JSON column ID whose items[] payload should be expanded.

  • config.listPathOptional

    string

    sync_to_table list mode optional item array path (default items).

  • config.columnMappings[].sourceScopeOptional

    string

    sync_to_table list mode mapping scope: row or item.

  • config.columnMappings[].itemKeyOptional

    string

    sync_to_table list mode item field name when sourceScope=item.

  • config.columnMappings[].sourceKeyOptional

    string

    sync_to_table row mapping source column key when sourceScope=row.

  • config.columnMappings[].pathOptional

    string

    sync_to_table row mapping nested JSON path inside sourceKey.

  • config.fieldMappingsOptional

    object

    add_to_crm mapping contract from source columns into canonical lead fields.

  • config.fieldMappings.companyDomainOptional

    string

    add_to_crm source domain column key.

  • config.fieldMappings.linkedinUrlOptional

    string

    add_to_crm source LinkedIn column key.

  • config.fieldMappings.emailAddressesOptional

    array<object>

    add_to_crm email mappings; structured sources require explicit path.

  • config.fieldMappings.emailAddresses[].columnOptional

    string

    add_to_crm email source column key.

  • config.fieldMappings.emailAddresses[].pathOptional

    string

    add_to_crm email JSON path/key (for example response).

  • config.fieldMappings.phoneNumbersOptional

    array<object>

    add_to_crm phone mappings; structured sources require explicit path.

  • config.fieldMappings.phoneNumbers[].columnOptional

    string

    add_to_crm phone source column key.

  • config.fieldMappings.phoneNumbers[].pathOptional

    string

    add_to_crm phone JSON path/key (for example mobile_number).

  • config.fieldMappings.commonOptional

    object

    Add to Leads multi-source parent-row mappings applied to every lead source.

  • config.fieldMappings.leadSourcesOptional

    array<object>

    Add to Leads multi-source row/array sources.

  • config.fieldMappings.leadSources[].kindOptional

    string

    Add to Leads source kind: row or array.

  • config.fieldMappings.leadSources[].sourceColumnOptional

    string

    Add to Leads array source JSON column key.

  • config.fieldMappings.leadSources[].sourceArrayPathOptional

    string

    Add to Leads array path inside sourceColumn, commonly items.

  • config.fieldMappings.leadSources[].templateOptional

    object

    Add to Leads canonical lead field mappings from row columns or __array_item paths.

  • config.sourceColumnsOptional

    array<string>

    add_to_crm dependency/source column list.

  • config.sequenceIdOptional

    string

    add_to_sequence: target sequence id. Must be ACTIVE and linked to this table via sourceTableId.

  • config.sourceLeadColumnOptional

    string

    add_to_sequence: column key (not field name) of the add_to_crm or lead_finder column containing lead IDs.

  • config.assignedToUserIdOptional

    string

    add_to_sequence: assignee for generated sequence tasks. Omit sender routing to use the assignee defaults.

  • config.skipActiveSequenceConflictsOptional

    boolean

    add_to_sequence: skip people already active in another sequence. Recommended for automated/table-driven handoffs.

  • config.senderAccountIdsOptional

    object

    add_to_sequence advanced routing: explicit sender account IDs keyed by email/linkedin.

  • config.assignmentPlanOptional

    array<object>

    add_to_sequence advanced/team routing: routes with assigneeUserId, optional senderAccountIds, and optional weight.

  • config.routingModeOptional

    string

    add_to_sequence advanced/team routing: single, round_robin, or weighted_round_robin.

  • config.urlOptional

    string

    http_request URL template. Use {{column_key}} for row values and {{secrets.name}} for workspace secrets.

  • config.methodOptional

    string

    http_request HTTP method (GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS).

  • config.headersOptional

    object

    http_request key-value header pairs. Values support {{secrets.name}} templates.

  • config.bodyOptional

    string | object

    http_request body template. Can be null, a string, or a JSON object.

  • config.timeoutSecondsOptional

    number

    http_request timeout in seconds (default 30).

  • autoRunOptional

    string

    never, onInsert, onSourceUpdate.

  • config.runConditionOptional

    RunCondition

    Optional recursive column-owned predicate. Applied to candidate rows for auto-run, /run, and /estimate; omit to consider all candidate rows.

Definitions

FilterObject

Per-request filter expression used with scope="filtered" for column runs and estimates. This does not configure a column's saved auto-run condition.

Fields

  • modeRequired

    string

    Logical operator for combining rules. Use AND or OR.

  • filtersRequired

    array<object>

    Filter rule list evaluated against row data.

  • filters[].columnKeyRequired

    string

    Column key used in the condition.

  • filters[].operatorRequired

    string

    Comparison operator (for example equals or isNotEmpty).

  • filters[].valueOptional

    string | number | boolean

    Required for value-based operators such as equals.

FilterObject example

json
{
  "mode": "and",
  "filters": [
    { "columnKey": "linkedin_url", "operator": "isNotEmpty" },
    { "columnKey": "country", "operator": "equals", "value": "United States" }
  ]
}

RunCondition

Canonical recursive predicate saved at config.runCondition to decide whether each candidate row is eligible for a column run. Omit it to consider every candidate row.

Fields

  • typeRequired

    string

    Node type: condition, all, any, or not.

  • childrenOptional

    array<RunCondition>

    Child predicates for all/any; not must contain exactly one child.

  • columnKey | columnIdOptional

    string

    Source column identity for a condition leaf. Use the key or id that identifies the table column.

  • jsonPathOptional

    string

    Optional path inside a JSON column value for a condition leaf.

  • operatorOptional

    string

    Condition operator, such as equals, isNotEmpty, contains, in, between, before, or dateBetween.

  • missingPolicyRequired

    string

    Behavior when a referenced value is missing: unknown, true, or false.

  • value | value2Optional

    string | number | boolean | array

    Comparison values for a condition leaf. between and dateBetween require both value and value2; valueless operators omit them.

RunCondition example

json
{
  "type": "all",
  "children": [
    {
      "type": "condition",
      "columnKey": "linkedin_url",
      "operator": "isNotEmpty",
      "missingPolicy": "unknown"
    },
    {
      "type": "condition",
      "columnKey": "country",
      "operator": "equals",
      "missingPolicy": "unknown",
      "value": "United States"
    }
  ]
}

Example

bash
curl -X PATCH "https://app.autotouch.ai/api/tables/67bd8c39c7d3e80f0a95b560/columns/67bd8cd8c7d3e80f0a95b58f" \
    -H "Authorization: Bearer stk_your_key_id.your_secret" \
    -H "Content-Type: application/json" \
    -d '{
      "autoRun":"onInsert",
      "config":{
        "runCondition":{
          "type":"condition",
          "columnKey":"company_domain",
          "operator":"isNotEmpty",
          "missingPolicy":"unknown"
        }
      }
    }'

Request body

json
{
    "autoRun": "onSourceUpdate",
    "config": {
      "runCondition": {
        "type": "all",
        "children": [
          {
            "type": "condition",
            "columnKey": "company_domain",
            "operator": "isNotEmpty",
            "missingPolicy": "unknown"
          },
          {
            "type": "condition",
            "columnKey": "country",
            "operator": "equals",
            "missingPolicy": "unknown",
            "value": "United States"
          }
        ]
      }
    }
  }

Response example

json
{
    "id": "67bd8cd8c7d3e80f0a95b58f",
    "key": "company_summary",
    "label": "Company Summary",
    "kind": "enrichment",
    "dataType": "text",
    "autoRun": "onSourceUpdate",
    "config": {
      "runCondition": {
        "type": "all",
        "children": [
          {
            "type": "condition",
            "columnKey": "company_domain",
            "operator": "isNotEmpty",
            "missingPolicy": "unknown"
          },
          {
            "type": "condition",
            "columnKey": "country",
            "operator": "equals",
            "missingPolicy": "unknown",
            "value": "United States"
          }
        ]
      }
    }
  }

Errors

  • 401

    Invalid API key or missing auth.

  • 403

    Missing columns:write scope or table access denied.

  • 404

    Column or table not found.

Docs