Create Field

POST {{baseUrl}}/api/v1/organizationFields?module=<String> &displayLabel=<string> max chars : 200&type=<string> max chars : 100

This API creates a field

OAuth Scope

  • Desk.settings.CREATE

Request Params

KeyDatatypeRequiredDescription
modulestringName of the module whose fields must be fetched. Values allowed are tickets, contacts, accounts, tasks, timeEntry, products , calls , events, and contracts.
displayLabelstringName of the field on the UI
namestringName of the custom field
typestringData type of the field. Values allowed are Text, Number, Percent, Decimal, Currency, Date, Date Time, Email, Phone, PickList, Website, Textarea, Checkbox, Multiselect, Boolean and LargeText
maxLengthstringMaximum permissible length of the value in the field. Applicable for Text, Number, Decimal, and Currency fields
decimalPlacesstringNumber of decimal places the value in a field can take. Applicable for Decimal and Currency fields
roundingPrecisionstringPrecision of the value in the field. Precision refers to the total number of digits in a decimal number. For example, the precision of 30.12 is 4. Applicable for Currency fields
roundingOptionstringOption to round off complex decimal numbers to the nearest whole number or shorter decimal number. Values allowed are roundOff, roundDown, and roundUp
defaultValuestringDefault value set for a field. Applicable for Checkbox fields
allowedValuesstringValues allowed in a field. Applicable for PickList fields
layoutIdsstringIDs of layouts configured for the module
isEncryptedFieldstringKey that returns if the value in the field is encrypted or not. The field types are Text, Number, Percent, Decimal, Email, Phone, URL which supports encryption
toolTipstringthe tool tip of the field
toolTipTypestringthe tool tip of the field

HEADERS

KeyDatatypeRequiredDescription
Authorizationstring

RESPONSES

status: OK

{&quot;displayLabel&quot;:&quot;Sample Text Field&quot;,&quot;apiName&quot;:&quot;cf_sample_text_field&quot;,&quot;isCustomField&quot;:true,&quot;toolTipType&quot;:&quot;placeHolder&quot;,&quot;showToHelpCenter&quot;:true,&quot;isEncryptedField&quot;:true,&quot;toolTip&quot;:&quot;Sample Text Field&quot;,&quot;id&quot;:&quot;4000000049001&quot;,&quot;type&quot;:&quot;Text&quot;,&quot;maxLength&quot;:50,&quot;isMandatory&quot;:false}