Skip to content
POST /collection/{id}/table

Needs can_manage on the collection. 409 table_key_taken, 409 collection_table_limit_reached.

Path Parameters

idstring
required·

Resource id

Request Body

descriptionstring
fieldsobject[]
descriptionstring
idstring
indexedboolean
keystring
namestring
options
requiredboolean
typestring
historyobject
keystring
namestring
primary_fieldstring
row_scopeobject
unique_keystring[]

Response Body

can_manageboolean
can_useboolean
collection_idstring
created_atstring
descriptionstring
field_countinteger
hidden_field_keysstring[]
is_defaultboolean
keystring
namestring
row_scope_fieldstring,null
row_visibilitystring
Possible values:
allown
schemaobject
fieldsobject[]
8 properties
descriptionstring
idstring
indexedboolean
keystring
namestring
options
requiredboolean
typestring
primary_fieldstring
row_scopeobject,null
unique_keyarray,null
versioninteger
schema_versioninteger
statsobject,null
updated_atstring
updated_by_namestring,null
curl -X POST 'https://api.elaichi.ai/collection/<id>/table' \
  -H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"key":"your_key","name":"your_name","description":"your_description","fields":[],"primary_field":"your_primary_field","unique_key":[],"row_scope":{},"history":{}}'
const body = {
  "key": "your_key",
  "name": "your_name",
  "description": "your_description",
  "fields": [],
  "primary_field": "your_primary_field",
  "unique_key": [],
  "row_scope": {},
  "history": {}
};

const response = await fetch('https://api.elaichi.ai/collection/<id>/table', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer ' + process.env.ELAICHI_API_TOKEN,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(body),
});

const data = await response.json();
console.log(data);
import os
import requests

url = "https://api.elaichi.ai/collection/<id>/table"
headers = {
    "Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
    "Content-Type": "application/json",
}
payload = {
    "key": "your_key",
    "name": "your_name",
    "description": "your_description",
    "fields": [],
    "primary_field": "your_primary_field",
    "unique_key": [],
    "row_scope": {},
    "history": {}
}

response = requests.post(url, headers=headers, json=payload)
print(response.json())