CommunityHire an ExpertSign Up
Table FieldsAdd Table Field
Table Fields

Add Table Field

Add a new field to a table.

POST/databases/{databaseId}/tables/{tableId}/fields

Field Types Reference

Editable Fields

TypeValue FormatDescription
SINGLE_LINE_TEXTstringShort text
LONG_TEXTstringMulti-line text
EMAILstringEmail address
PHONEstringPhone number
URLstringWeb URL
NUMBERnumberNumeric value
CURRENCYnumberMonetary amount
PERCENTnumberPercentage (0–100)
RATINGnumberStar rating
DURATIONnumberDuration
CHECKBOXbooleanTrue/false
SELECTstring or arraySingle or multi-select from predefined choices
USERobject or arrayUser reference
LINKED_RECORDstring or arrayLink to record(s) in another table
ATTACHMENTobject or arrayFile attachment
DATEstringDate (ISO 8601)
DATETIMEstringDate and time (ISO 8601)

Read-Only Fields

These are computed or system-managed and cannot be set when creating or updating records.

TypeDescription
LOOKUPValue from a linked record’s field
ROLLUPAggregation over linked records
FORMULACalculated from a formula expression
CREATED_ATRecord creation timestamp
UPDATED_ATRecord last modified timestamp
CREATED_BYUser who created the record
UPDATED_BYUser who last modified the record
AUTONUMBERAuto-incrementing number
RECORD_IDSystem record identifier

Field Options

Type-specific configuration passed in the options object when creating or updating fields.

SELECT

JSON
{
  "choices": [
    { "id": "choice-1", "label": "Option A", "color": "#FF0000" },
    { "id": "choice-2", "label": "Option B", "color": "#00FF00" }
  ],
  "allowToAddNewChoice": true,
  "sorting": "CUSTOM",
  "enforceOrder": false
}

sorting can be CUSTOM, ALPHA_ASC, or ALPHA_DESC.

NUMBER

JSON
{
  "precision": 2,
  "min": 0,
  "max": 1000000,
  "showThousandSeparator": true,
  "thousandSeparatorLocale": "en-US",
  "largeNumberAbbreviation": "NONE",
  "prefix": null,
  "suffix": null
}

largeNumberAbbreviation can be NONE, K, M, B, or T.

CURRENCY

JSON
{
  "precision": 2,
  "min": null,
  "max": null,
  "isoCode": "USD",
  "customSymbol": null,
  "showAs": "SYMBOL",
  "showThousandSeparator": true,
  "thousandSeparatorLocale": "en-US",
  "largeNumberAbbreviation": "NONE",
  "symbolOrCodePosition": "BEFORE"
}
  • showAs: SYMBOL or CODE
  • symbolOrCodePosition: BEFORE or AFTER

LINKED_RECORD

JSON
{
  "linkedTableId": "table-uuid",
  "inverseLinkFieldId": "field-uuid",
  "viewId": null,
  "sorting": [],
  "filter": null,
  "enforceOrder": false
}

LOOKUP

JSON
{
  "linkedRecordFieldId": "field-uuid",
  "lookupFieldId": "field-uuid",
  "isValid": true
}

ROLLUP

JSON
{
  "linkedRecordFieldId": "field-uuid",
  "rollupFieldId": "field-uuid",
  "function": "SUM",
  "filter": null
}

Available functions: SUM, MIN, MAX, COUNT, AVERAGE, ARRAYCOMPACT, ARRAYJOIN, ARRAYUNIQUE, ARRAYFLATTEN, CONCATENATE, COUNTALL, COUNTA, OR, AND.

ATTACHMENT

JSON
{
  "showAs": "PREVIEW",
  "inferredFileType": "OTHER",
  "enableFileLinkExpiration": true,
  "fileLinkExpirationValue": 2,
  "fileLinkExpirationUnit": "HOURS"
}
  • showAs: PREVIEW, LIST, or BADGE
  • inferredFileType: IMAGE, VIDEO, PDF, AUDIO, or OTHER
  • fileLinkExpirationUnit: HOURS or MINUTES

FORMULA

JSON
{
  "formula": "IF({Status} = 'Active', {Amount} * 1.1, {Amount})",
  "isValid": true,
  "referencedFieldIds": ["field-uuid-1", "field-uuid-2"]
}

AI Options

Fields can include an aiOptions object that configures AI-powered auto-fill behavior. This is returned in field definitions and can be set when creating or updating fields.

JSON
{
  "aiFillable": true,
  "aiOnly": false,
  "allowWebSearch": true,
  "aiModel": "GPT_4_1",
  "prompt": "Summarize the customer's request based on {Description}",
  "canBeTriggeredManually": true,
  "runWhenRecordIsCreated": true,
  "runWhenRecordIsUpdated": false
}
PropertyTypeDefaultDescription
aiFillablebooleanfalseWhether AI can fill this field
aiOnlybooleantrueIf true, only AI can write to this field
allowWebSearchbooleanfalseAllow AI to use web search when filling
aiModelstring"GPT_4_1"AI model to use
promptstring""Prompt template (reference other fields with {FieldName})
canBeTriggeredManuallybooleantrueWhether users can trigger AI fill manually
runWhenRecordIsCreatedbooleantrueAuto-run when record is created
runWhenRecordIsUpdatedbooleantrueAuto-run when record is updated

Fields without AI configuration return "aiOptions": null.

Authorizations

Softr-Api-KeyAPI keyin headerrequired

Path parameters

databaseIdstringrequired
tableIdstringrequired

Body

application/jsonrequired
namestringrequired
typestringrequired
optionsRecord<string, unknown>

Response

application/json

The newly created field.

dataobject

Use these docs with your AI tools

An AI agent can read this documentation directly. You do not need an account or an API key. Everything here is public and read-only.

Query these docs via MCP

Recommended

Add this server to Claude, Claude Code, Cursor, Mistral, or any tool that supports MCP. Your agent can then search Softr Documentation documentation and read it in full, instead of answering from memory.

https://docs.softr.io/mcp
  • searchFind the passages that answer a question.
  • fetchRead one page in full, as Markdown.
  • list_pagesSee every page in this documentation.

Query these docs over HTTP

The same tools also work as plain web requests. Use this for scripts, or for any tool that does not support MCP. There is one endpoint per tool. Arguments go in the query string, and the answer comes back as JSON.

https://docs.softr.io/api/docs/search?query=custom+domain

Read the OpenAPI description. It is built from the same definitions as the tools, so it always matches what the endpoints do.

Read these docs as Markdown

Add .md to any page URL to get its Markdown source. You can also send the headerAccept: text/markdown to the page URL itself.

To read the whole documentation in one file, open llms-full.txt. For a short index of every page, open llms.txt.