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

# Delete Column

> Delete a column and its cells. The operation creates a new sheet version and may mark downstream dependent cells as stale. Requests are scoped to the workspace associated with the API key; table, sheet, column, cell, operation, and version IDs must belong to that workspace.

Delete a column and its cells.

Deleting a column creates a new sheet version. If other columns depend on the deleted column, PromptLayer marks affected downstream cells as stale and returns `stale_count` with the new `version`.


## OpenAPI

````yaml DELETE /api/public/v2/tables/{table_id}/sheets/{sheet_id}/columns/{column_id}
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security:
  - ApiKeyAuth: []
paths:
  /api/public/v2/tables/{table_id}/sheets/{sheet_id}/columns/{column_id}:
    delete:
      tags:
        - smart-tables
      summary: Delete Column
      description: >-
        Delete a column and its cells. The operation creates a new sheet version
        and may mark downstream dependent cells as stale. 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: delete_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
      responses:
        '200':
          description: Column deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                  stale_count:
                    type: integer
                    description: >-
                      Number of stale cells on the sheet after downstream
                      dependency propagation.
                  version:
                    type: integer
                    description: Current sheet version_count after the column is deleted.
        '400':
          description: Column cannot be deleted or stored score configuration is invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          description: Workspace access denied or missing edit permission
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Table, sheet, or column not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          $ref: '#/components/responses/ValidationError'
        '500':
          description: Failed to delete column
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    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.
    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
  responses:
    UnauthorizedError:
      description: Unauthorized - missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    ValidationError:
      description: Validation error - request parameters or body are invalid.
      content:
        application/json:
          schema:
            oneOf:
              - $ref: '#/components/schemas/HTTPValidationError'
              - $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````