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

# Update Column

> Update a column's title, config, or dependencies. Returns `requires_recalculation: true` when the change invalidates existing cell values. Requests are scoped to the workspace associated with the API key; table, sheet, column, cell, operation, and version IDs must belong to that workspace.

Update a column's title, config, or dependencies.

When the change invalidates existing cell values (e.g., the prompt template or code changes), the response includes `requires_recalculation: true` and the list of `affected_column_ids`.

When the update changes column metadata or configuration, PromptLayer creates a new sheet version and returns `version`.


## OpenAPI

````yaml PATCH /api/public/v2/tables/{table_id}/sheets/{sheet_id}/columns/{column_id}
openapi: 3.1.0
info:
  title: PromptLayer API
  description: >-
    REST API for PromptLayer: prompt template management, request logging,
    observability, evaluations, and workflows.
  version: 1.0.0
servers: []
security:
  - ApiKeyAuth: []
paths:
  /api/public/v2/tables/{table_id}/sheets/{sheet_id}/columns/{column_id}:
    patch:
      tags:
        - smart-tables
      summary: Update Column
      description: >-
        Update a column's title, config, or dependencies. Returns
        `requires_recalculation: true` when the change invalidates existing cell
        values. Requests are scoped to the workspace associated with the API
        key; table, sheet, column, cell, operation, and version IDs must belong
        to that workspace.
      operationId: update_table_sheet_column
      parameters:
        - name: table_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: sheet_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: column_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  nullable: true
                config:
                  type: object
                  nullable: true
                dependencies:
                  type: array
                  nullable: true
                  items:
                    type: object
                    required:
                      - column_id
                    properties:
                      column_id:
                        type: string
                        format: uuid
                      reference_type:
                        type: string
                        default: value
                      config_key:
                        type: string
                        nullable: true
                      config_meta:
                        type: object
                        nullable: true
      responses:
        '200':
          description: Column updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  column:
                    $ref: '#/components/schemas/Column'
                  requires_recalculation:
                    type: boolean
                  affected_column_ids:
                    type: array
                    items:
                      type: string
                      format: uuid
                  version:
                    type: integer
                    description: >-
                      Current sheet version_count for this response. It matches
                      the sheet's version_count after any committed changes.
        '400':
          description: Cycle detected or invalid config
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          description: Table, sheet, or column not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    Column:
      type: object
      description: A column within a Table sheet.
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier of the column.
        sheet_id:
          type: string
          format: uuid
        workspace_id:
          type: integer
          description: >-
            Workspace that owns this resource; determined by the authenticated
            request scope.
        title:
          type: string
          description: Display title of the column.
        type:
          $ref: '#/components/schemas/TableColumnType'
        config:
          type: object
          description: Type-specific configuration. Shape depends on the column type.
        position_rank:
          type: number
          description: Fractional position rank used for ordering.
        is_output_column:
          type: boolean
          description: Whether this column is designated as an output column.
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          default: false
          description: Indicates that the request failed.
        message:
          type: string
          description: Human-readable error message.
        error:
          type: string
          description: Machine-readable or fallback error message.
      additionalProperties: true
      description: >-
        Standard error response. Some legacy endpoints may return either message
        or error.
    TableColumnType:
      type: string
      description: >-
        Smart Table column type. Use uppercase backend enum values. Input: TEXT.
        Reference (Tables only, not in legacy evaluation/workflow enums):
        COMPOSITION. Computed: all other listed values. Create requests also
        accept lowercase aliases (text, prompt_template, llm, code, score,
        comparison, composition), which are normalized to uppercase. Legacy
        DATASET columns are not creatable.
      enum:
        - TEXT
        - ABSOLUTE_NUMERIC_DISTANCE
        - AI_DATA_EXTRACTION
        - APPLY_DIFF
        - ASSERT_VALID
        - COALESCE
        - CONDITION
        - CODE_EXECUTION
        - COMBINE_COLUMNS
        - COMPARE
        - COMPOSITION
        - CONTAINS
        - CONVERSATION_SIMULATOR
        - COSINE_SIMILARITY
        - COUNT
        - ENDPOINT
        - FOR_LOOP
        - HUMAN
        - JSON_PATH
        - LLM_ASSERTION
        - MATH_OPERATOR
        - MCP
        - MIN_MAX
        - PARSE_VALUE
        - PROMPT_TEMPLATE
        - REGEX
        - REGEX_EXTRACTION
        - VARIABLE
        - WHILE_LOOP
        - WORKFLOW
        - XML_PATH
  responses:
    UnauthorizedError:
      description: Unauthorized - missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````