Skip to main content

Create a record

Create a record object.

import requests

url = "http://www.lytecms.com/fields/fld_BxJPVIRa5Jd7rzdKgeIPlDAh"

payload = {"name": "name updated"}
headers = {
"Authorization": "Bearer <ACCESS_TOKEN>",
"Content-Type": "application/json"
}

response = requests.request("POST", url, json=payload, headers=headers)

print(response.text)

Parameters

ParameterTypeRequiredDescription
tablestringYesID of the table
fieldsobjectYesfields

Request body example


{
"table": "tbl_tableid",
"fields": {
"text": "hello world",
"Article": "# Title \n## Subtitle \n *Bold* ",
"date": "2020-01-01",
"URL": [ {"link": "http://google.com", "text": "Google"} ],
"image": "http://xxxx.png",
"single select": "option 1",
"multiple selects": ["option 1", "option 2"],
"number": 123.456,
"checkbox": true
}
}