Skip to main content
POST
/
api
/
public
/
v2
/
tables
/
{table_id}
/
sheets
/
{sheet_id}
/
columns
Create Column
curl --request POST \
  --url https://api.promptlayer.com/api/public/v2/tables/{table_id}/sheets/{sheet_id}/columns \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "title": "<string>",
  "config": {},
  "dependencies": [
    {
      "column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "reference_type": "value",
      "config_key": "<string>",
      "config_meta": {}
    }
  ]
}
'
{
  "success": true,
  "column": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "sheet_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "workspace_id": 123,
    "title": "<string>",
    "config": {},
    "position_rank": 123,
    "is_output_column": true
  },
  "cells": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "sheet_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "row_index": 123,
      "display_value": "<string>",
      "value": "<unknown>",
      "error": "<string>",
      "input_hash": "<string>",
      "updated_at": "2023-11-07T05:31:56Z",
      "request_metrics": {
        "request_count": 123,
        "request_ids": [
          123
        ],
        "latency_ms": 123,
        "price": 123,
        "input_tokens": 123,
        "output_tokens": 123,
        "trace_ids": [
          "<string>"
        ]
      },
      "execution_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "last_computed_version": 123,
      "error_message": "<string>"
    }
  ],
  "version": 123
}
Create a column in a Table sheet and create cells for existing rows. Use type and config to define the column behavior. Use dependencies for config-driven source columns. New columns are appended after the existing columns in the sheet.

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
Available options:
text,
prompt_template,
llm,
code,
score,
comparison,
composition
config
object

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.