Pular para o conteúdo principal

custom_attribute_create_update_payload

attribute_display_namestring

Attribute display name

Example: Custom Attribute
attribute_display_typeinteger

Attribute display type (text- 0, number- 1, currency- 2, percent- 3, link- 4, date- 5, list- 6, checkbox- 7, dropdown- 8, multiselect- 9, radio- 10). The option-backed types (list, dropdown, multiselect, radio) require attribute_values.

Example: 0
attribute_descriptionstring

Attribute description

Example: This is a custom attribute
attribute_keystring

Attribute unique key value

Example: custom_attribute
attribute_valuesstring[]

Attribute values

Example: ["value1","value2"]
attribute_modelinteger

Attribute type(conversation_attribute- 0, contact_attribute- 1)

Example: 0
regex_patternstring

Regex pattern (Only applicable for type- text). The regex pattern is used to validate the attribute value(s).

Example: ^[a-zA-Z0-9]+$
regex_cuestring

Regex cue message (Only applicable for type- text). The cue message is shown when the regex pattern is not matched.

Example: Please enter a valid value
requiredboolean

When true, the app's forms refuse to save a record that leaves this field empty. Not enforced by the API.

Example: false
custom_attribute_create_update_payload
{
"attribute_display_name": "Custom Attribute",
"attribute_display_type": 0,
"attribute_description": "This is a custom attribute",
"attribute_key": "custom_attribute",
"attribute_values": [
"value1",
"value2"
],
"attribute_model": 0,
"regex_pattern": "^[a-zA-Z0-9]+$",
"regex_cue": "Please enter a valid value",
"required": false
}