Add Column
Add a new column to the table schema. Optionally specify a position to insert the column at a specific index.
POST
/api/v1/tables/{tableId}/columnsAuthorization
apiKey X-API-Key<token>
Your Sim API key (personal or workspace). Generate one from the Sim dashboard under Settings > API Keys.
In: header
Path Parameters
tableId*string
The unique identifier of the table.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST \ "https://www.sim.ai/api/v1/tables/{tableId}/columns" \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "workspaceId": "YOUR_WORKSPACE_ID", "column": { "name": "email", "type": "string", "required": true, "unique": true } }'{
"success": true,
"data": {
"columns": [
{
"name": "email",
"type": "string",
"required": true,
"unique": true
},
{
"name": "phone",
"type": "string",
"required": false,
"unique": false
}
]
}
}{
"error": "string",
"details": [
{}
]
}{
"error": "string"
}{
"error": "string"
}{
"error": "string"
}