Add a new custom attribute
Add a new custom attribute to account
AuthorizationBearer <token>Authenticate with Authorization: Bearer <token> using a user API token from Profile Settings. Available in Chatwoot v4.19.0 and later.
account_id*integerThe numeric ID of the account
application/json- body
attribute_display_name?stringAttribute display name
attribute_display_type?integerAttribute display type (text- 0, number- 1, currency- 2, percent- 3, link- 4, date- 5, list- 6, checkbox- 7)
attribute_description?stringAttribute description
attribute_key?stringAttribute unique key value
attribute_values?array<string>Attribute values
attribute_model?integerAttribute type(conversation_attribute- 0, contact_attribute- 1)
regex_pattern?stringRegex pattern (Only applicable for type- text). The regex pattern is used to validate the attribute value(s).
regex_cue?stringRegex cue message (Only applicable for type- text). The cue message is shown when the regex pattern is not matched.
Success
application/json- response
id?integerIdentifier
attribute_display_name?stringAttribute display name
attribute_display_type?stringAttribute display type (text, number, currency, percent, link, date, list, checkbox)
attribute_description?stringAttribute description
attribute_key?stringAttribute unique key value
regex_pattern?stringRegex pattern
regex_cue?stringRegex cue
attribute_values?stringAttribute values
attribute_model?stringAttribute type(conversation_attribute/contact_attribute)
default_value?stringAttribute default value
created_at?stringThe date and time when the custom attribute was created
updated_at?stringThe date and time when the custom attribute was updated
curl -X POST 'https://helpdesk.inclamo.com/api/v1/accounts/0/custom_attribute_definitions' \ -H 'Content-Type: application/json' \ -d '{}'{ "id": 0, "attribute_display_name": "string", "attribute_display_type": "string", "attribute_description": "string", "attribute_key": "string", "regex_pattern": "string", "regex_cue": "string", "attribute_values": "string", "attribute_model": "string", "default_value": "string", "created_at": "string", "updated_at": "string"}