Skip to main content
POST
Create Column
Add a new column to a sheet. For non-text columns, cells for all existing rows are created with stale status and queued for computation. Use dependencies to declare which other columns this column’s config references. PromptLayer enforces a DAG (no cycles allowed) and uses the dependency graph to propagate staleness when upstream cells change. Creating a column creates a new sheet version. The response returns version, the current sheet version count after the column is added.

Authorizations

X-API-KEY
string
header
required

Path Parameters

table_id
string<uuid>
required
sheet_id
string<uuid>
required

Body

application/json
title
string
required
type
enum<string>
required

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.

Available options:
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
config
object | null

Type-specific column configuration.

dependencies
object[] | null

Column dependency edges for non-text columns.

Response

Column created

success
boolean
column
object

A column within a Table sheet.

cells
object[]
version
integer

Current sheet version_count for this response. It matches the sheet's version_count after any committed changes.