Deskhero Developer Hub
Back to deskhero.com
Fields

Create

Creates a custom field and reserves the physical storage slot that matches its data type, which is what later restricts data type changes. unique_key is derived from the label when omitted, is limited to 15 characters (label 30), may not start with sys_ or use a reserved key, and creation fails when the tenant plan's field quota is reached.

POST /api/{tenant:minlength(2)}/v{version:apiVersion}/fields
Authorisation
Minimum role: ADMIN

Request arguments

Name Type Source
inputDTO_fieldBody
Request body example

Response

Status
200 (OK)
Type
DTO_field
Wrapper
DTO_response_wrap
Other statuses
400 (BadRequest), 403 (Forbidden)
Response body example
DTO_field
NameTypeReadOnlyDescription
multi_optionDTO_field_multi_optionUsed only when field type supports selection
created_byDTO_reference_userReadOnlyCreated by
last_updated_byDTO_reference_userReadOnlyLast updated by
idInt32ReadOnlyLeave empty when Creating object
labelStringLabel
unique_keyStringUnique key
data_typeENUM field_data_typeData type
typeENUM field_typeType
validation_regexStringRegEx pattern for client side validation
validation_error_messageStringClient side validation message if RexEx fails
icon_idInt32Icon id
icon_fileStringIcon file
createdDateTimeReadOnlyCreated
last_updatedDateTimeReadOnlyLast updated
min_valueDouble (nullable)Used for Integers, Doubles, DateTimes (UnixTimeStamp)
max_valueDouble (nullable)Used for Integers, Doubles, DateTimes (UnixTimeStamp)
favoriteBooleanFavorite
allow_in_external_formsBooleanAllow in external forms
DTO_field_multi_option
NameTypeReadOnlyDescription
optionsDTO_reference[]Options
typeENUM field_multi_option_typeType
list_idInt32List id
field_idInt32Field id
DTO_reference
NameTypeReadOnlyDescription
idInt32The id of the reference
labelObjectReadOnlyName/Label from referenced object.
DTO_reference_user
NameTypeReadOnlyDescription
profile_picStringReadOnlyProfile pic
emailStringReadOnlyEmail
idInt32Id
labelObjectReadOnlyLabel
ENUM field_multi_option_type
ValueNameDescription
0UNKNOWNUNKNOWN
1BASICBASIC
2LISTLIST
3IMAGEIMAGE
ENUM field_data_type
ValueNameDescription
0UNKNOWNUNKNOWN
1STRINGText
2MULTI_LINE_STRINGText (multi-line)
3DATE_TIMEDate and time
4DATE_NO_TIMEDate
5DOUBLENumber (decimal)
6INTNumber (int)
7LONGNumber (long)
8BOOLOn / Off
9EMAILText (email)
10PHONEText (phone)
11PICK_ONEPick one
12PICK_MANYPick many
13IMAGEImage
14RICH_TEXTText (rich editor)
15FILESFiles
16COLORColor
-1INTERNAL_ENUMINTERNAL_ENUM
ENUM field_type
ValueNameDescription
0UNKNOWNUNKNOWN
1CUSTOMCUSTOM
2SYS_LABELSYS_LABEL
3SYS_NAMESYS_NAME
4SYS_EMAILSYS_EMAIL
7SYS_SUBJECTSYS_SUBJECT
8SYS_CONTENT_PLAINSYS_CONTENT_PLAIN
9SYS_STATUSSYS_STATUS
10SYS_PRIORITYSYS_PRIORITY
11SYS_CONTENT_RICHSYS_CONTENT_RICH
12SYS_ATTACHMENTSSYS_ATTACHMENTS
13SYS_CONTENT_RICH_DRAFTSYS_CONTENT_RICH_DRAFT
14SYS_TAGSSYS_TAGS
15SYS_IMPORT_REFSYS_IMPORT_REF
16SYS_COLOR_BGSYS_COLOR_BG
17SYS_COLOR_TEXTSYS_COLOR_TEXT
18SYS_SUBMITTED_FROMSYS_SUBMITTED_FROM

Generated Aug 4, 2026 18:37