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
Key | Datatype | Required | Description |
---|---|---|---|
module | string | Name of the module whose fields must be fetched. Values allowed are tickets, contacts, accounts, tasks, timeEntry, products , calls , events, and contracts. | |
displayLabel | string | Name of the field on the UI | |
name | string | Name of the custom field | |
type | string | Data 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 | |
maxLength | string | Maximum permissible length of the value in the field. Applicable for Text, Number, Decimal, and Currency fields | |
decimalPlaces | string | Number of decimal places the value in a field can take. Applicable for Decimal and Currency fields | |
roundingPrecision | string | Precision 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 | |
roundingOption | string | Option to round off complex decimal numbers to the nearest whole number or shorter decimal number. Values allowed are roundOff, roundDown, and roundUp | |
defaultValue | string | Default value set for a field. Applicable for Checkbox fields | |
allowedValues | string | Values allowed in a field. Applicable for PickList fields | |
layoutIds | string | IDs of layouts configured for the module | |
isEncryptedField | string | Key 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 | |
toolTip | string | the tool tip of the field | |
toolTipType | string | the tool tip of the field |
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Authorization | string |
RESPONSES
status: OK
{"displayLabel":"Sample Text Field","apiName":"cf_sample_text_field","isCustomField":true,"toolTipType":"placeHolder","showToHelpCenter":true,"isEncryptedField":true,"toolTip":"Sample Text Field","id":"4000000049001","type":"Text","maxLength":50,"isMandatory":false}