POST/contacts/custom-properties

Adds contact custom properties of a domain. You can add up to 5 contact custom properties for a domain.

Authorization

oauth2

OAuth 2.0 authentication.
For more information, see Authentication and Authorization.

Scope

contact

HTTP Request

POSThttps://www.worksapis.com/v1.0/contacts/custom-properties

Header Parameters

HeadertypeDescription
Authorization string 

Bearer {token}


required 
Content-Type string 

application/json


required
example : application/json 

Request Body

PropertyTypeDescription
domainId integer 

Domain ID


required
format : int32 
propertyName string 

Custom property name. It must be unique within a domain. The name can only contain English alphabet, numbers, and underscores (_). It must start with an alphabetic character or underscore (_).


required
maxLength : 120 
displayName string 

Custom property display name. It must be unique within a domain.


required
maxLength : 20 
i18nDisplayNames array (I18nDisplayName) 

List of multilingual display names


minItems : 0 
propertyType string 

Custom property type

  • STRING: Text
  • LINK: Hyperlink

required
Allowed values : STRING, LINK 
displayOrder integer 

Sort order. Duplicates are allowed and based on this value, custom properties are sorted in ascending order. If it is not specified (NULL), the custom property is located at the end of the list.


minimum : 1
format : int32
nullable : true 
multiValued boolean 

Indicates whether multiple values can be added for the same custom property.


default : false 

I18nDisplayName

PropertyTypeDescription
language string 

Language code


Allowed values : ko_KR, ja_JP, zh_CN, zh_TW, en_US 
name string 

Multilingual name


maxLength : 20 

Request Example

example

1{2  "domainId": 10000001,3  "propertyName": "ext_id",4  "displayName": "External ID",5  "i18nDisplayNames": [6    {7      "language": "ko_KR",8      "name": "External ID"9    },10    {11      "language": "en_US",12      "name": "external id"13    }14  ],15  "propertyType": "STRING",16  "displayOrder": 117}

Response

HTTP 201

OK

PropertyTypeDescription
domainId integer 

Domain ID


format : int32 
customPropertyId string 

Custom property ID. It is automatically assigned.


readOnly : true 
propertyName string 

Custom property name.
It must be unique within a domain. The name can only contain English alphabet, numbers, and underscores (_). It must start with an alphabetic character or underscore (_).


maxLength : 120 
displayName string 

Custom property display name
It must be unique within a domain.


maxLength : 20 
i18nDisplayNames array (I18nDisplayName) 

List of multilingual display names


minItems : 0 
propertyType string 

Custom property type

  • STRING: Text
  • LINK: Hyperlink

Allowed values : STRING, LINK 
displayOrder integer 

Sort order. Duplicates are allowed and based on this value, custom properties are sorted in ascending order. If it is not specified (NULL), the custom property is located at the end of the list.


minimum : 1
format : int32
nullable : true 
multiValued boolean 

Indicates whether multiple values can be added for the same custom property.


default : false 

I18nDisplayName

PropertyTypeDescription
language string 

Language code


Allowed values : ko_KR, ja_JP, zh_CN, zh_TW, en_US 
name string 

Multilingual name


maxLength : 20 

Response Example

example

1{2  "domainId": 10000001,3  "customPropertyId": "custompi-5ge3-f6d7-ht33-35gr6e465u01",4  "propertyName": "ext_id",5  "displayName": "External ID",6  "i18nDisplayNames": [7    {8      "language": "ko_KR",9      "name": "External ID"10    },11    {12      "language": "en_US",13      "name": "external id"14    }15  ],16  "propertyType": "STRING",17  "displayOrder": 1,18  "multiValued": false19}

HTTP 400

Bad Request

HTTP 403

Forbidden