API Reference

Learn how Field objects are defined in Morph API.

In Morph API, Fields are defined as Simple Field objects.

SimpleField object

Properties and types

KeyTypeDescription
namestring
displayNamestring
typestringPossible values are:
- "shortText"
- "longText"
- "singleSelect"
- "multiSelect"
- "datetime"
- "date"
- "time"
- "number"
- "decimal"
- "boolean"
- "autoNumber"
- "email"
- "image"
- "attachment"
- "createdAt"
- "phoneNumber"
- "url"
- "richText"
- "formula"
- "createdBy"
- "lastEditedAt"
- "lastEditedBy"
defaulteither of the following types:
- string or
- number, or
- boolean, or
- array of string
nullableboolean
commentstring
lengthnumber
unsignednumber
membersarray of string
formulastringSQL statement
relationsarray of Relation object.
originalTableSlugstring
primaryboolean

JSON representation

{
  "name": "string",
  "displayName": "string",
  "type": "shortText",
  "default": "string",
  "nullable": true,
  "comment": "string",
  "length": 0,
  "unsigned": 0,
  "members": [
    "string"
  ],
  "formula": "string",
  "relations": [
    {
      "targetTable": "string",
      "targetField": "string",
      "targetTableFields": [
        {}
      ]
    }
  ],
  "originalTableSlug": "string",
  "primary": true
}

Relation object

Properties and types

KeyTypeDescription
targetTablestring
targetFieldstring
targetTableFieldsarray of targetTableField object

JSON representation

{
  "targetTable": "string",
  "targetField": "string",
  "targetTableFields": [
    {}
  ]
}

targetTableField object

ℹ️

Only used in response

Properties and types

KeyTypeDescription
namestring
displayNamestring

JSON representation

{
  "name": "string",
  "displayName": "string"
}

"shortText"-"longText"-"singleSelect"-"multiSelect"-"datetime"-"date"-"time"-"number"-"decimal"-"boolean"-"autoNumber"-"email"-"image"-"attachment"-"createdAt"-"phoneNumber"-"url"-"richText"-"formula"-"createdBy"-"lastEditedAt"-"lastEditedBy"

Value type

Pass specific format values when you call record APIs.

simple fieldformatremark
shortText"string"
"string""string"
singleSelect"string"
multiSelect["option1", "option2"]
datetimeone of [YYYY-MM-DD, YYYY-MM-DD hh:mm:ss, YYYY-MM-DDThh:mm:ss, YYYY-MM-DDThh:mm:ss.sss, YYYY-MM-DDThh:mm:ss.sssZ]
dateYYYY-MM-DD or YYYY/MM/DD
timeHH:mm
number1
decimal1.1
booleantrue / false
email[email protected]
imagehttps://sample-image.jpg
attachmenthttps://sample-attachment.pdf
url[http or https]: //sample.com
richText{}