Get Started
Portal api methods
Help

POST api/2.0/crm/{entityType}/customfield This function requires authentication

Description

Creates a new user field with the parameters (entity type, field title, type, etc.) specified in the request

Parameters
Name Description Type Example
entityType
sent in url
Entity type string some text
label
sent in body
Field title string some text
fieldType
sent in body
User field value number 1234
position
sent in body
Field position
optional
number 1234
mask
sent in body
Mask
optional
string some text
Example
             
             Data transfer in application/json format:
             
             1) Creation of a user field of  TextField type
             
             data: {
                entityType: "contact",
                label: "Sample TextField",
                fieldType: 0,
                position: 0,
                mask: {"size":"40"}        - this is the text field size. All other values are ignored.
             }
             
             
             2) Creation of a user field of TextArea type
             
             data: {
                entityType: "contact",
                label: "Sample TextArea",
                fieldType: 1,
                position: 1,
                mask: '{"rows":"2","cols":"30"}'        - this is the TextArea size. All other values are ignored.
             }
             
             
             3) Creation of a user field of   SelectBox type
             
             data: {
                entityType: "contact",
                label: "Sample SelectBox",
                fieldType: 2,
                position: 0,
                mask: ["1","2","3"]   - SelectBox values.
             }
             
             
             
             4) Creation of a user field of  CheckBox type
             
             data: {
                entityType: "contact",
                label: "Sample CheckBox",
                fieldType: 3,
                position: 0,
                mask: ""     
             }
             
             
             
             5) Creation of a user field of   Heading type
             
             data: {
                entityType: "contact",
                label: "Sample Heading",
                fieldType: 4,
                position: 0,
                mask: "" 
             }
             
             
             
             6) Creation of a user field of   Date type
             
             data: {
                entityType: "contact",
                label: "Sample Date",
                fieldType: 5,
                position: 0,
                mask: "" 
             }
             
             
             
Returns

User field

Example Response

application/json

{
  "status": 0,
  "response": {
    "relativeItemsCount": 0,
    "entityId": 14523423,
    "label": "Birthdate",
    "fieldValue": "2019-06-18T22:26:03.8318061Z",
    "fieldType": 5,
    "position": 10,
    "mask": "",
    "id": 0
  }
}

text/xml

<result>
  <status>0</status>
  <response>
    <relativeItemsCount>0</relativeItemsCount>
    <entityId>14523423</entityId>
    <label>Birthdate</label>
    <fieldValue>2019-06-18T22:26:03.8318061Z</fieldValue>
    <fieldType>5</fieldType>
    <position>10</position>
    <mask></mask>
    <id>0</id>
  </response>
</result>