Skip to main content
POST
/
table
/
column
Create a column
curl --request POST \
  --url https://app.myhero.so/table/column \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "tableId": "<string>",
  "name": "<string>",
  "data": {
    "type": "oneMany",
    "selectItems": [
      {
        "id": "<string>",
        "label": "<string>",
        "color": "<string>"
      }
    ],
    "number": {
      "format": "<string>",
      "decimalPlaces": 123
    },
    "oneMany": {
      "tableId": "<string>"
    }
  }
}
'
{
  "data": {
    "column": {
      "_id": "<string>",
      "projectId": "<string>",
      "tableId": "<string>",
      "workspaceId": "<string>",
      "isIdentifier": false,
      "name": "<string>",
      "slug": "<string>",
      "data": {
        "type": "identifier",
        "selectItems": [
          {
            "id": "<string>",
            "label": "<string>",
            "color": "<string>"
          }
        ],
        "number": {
          "format": "<string>",
          "decimalPlaces": 123
        },
        "oneMany": {
          "tableId": "<string>"
        }
      },
      "createdAt": 123,
      "updatedAt": 123,
      "originId": "<string>",
      "description": "<string>",
      "isDeleted": false
    },
    "cells": [
      {
        "_id": "<string>",
        "tableId": "<string>",
        "rowId": "<string>",
        "columnId": "<string>",
        "workspaceId": "<string>",
        "isIdentifier": false,
        "createdAt": 123,
        "updatedAt": 123,
        "originId": "<string>",
        "data": "<unknown>",
        "isDeleted": false
      }
    ]
  }
}

Documentation Index

Fetch the complete documentation index at: https://developers.myhero.so/llms.txt

Use this file to discover all available pages before exploring further.

Adds a new typed column to the given table and creates blank cells for every existing row. Specify data.type to set the column type (defaults to string). For select/multiSelect columns, provide data.selectItems. Returns the created column and the new cells.

Authorizations

Authorization
string
header
required

HERO personal access token

Body

application/json
tableId
string
required
Minimum string length: 1
name
string
required
Minimum string length: 1
data
object

Response

200 response

data
object
required