Skip to Content
inclamoDocs

Update custom attribute in Account

PATCH
/api/v1/accounts/{account_id}/custom_attribute_definitions/{id}

Update a custom attribute in account

Authorization

headerAuthorizationBearer <token>

Authenticate with Authorization: Bearer <token> using a user API token from Profile Settings. Available in Chatwoot v4.19.0 and later.

Path Parameters

id*integer

The ID of the custom attribute to be updated.

account_id*integer

The numeric ID of the account

Request Body

application/json
  1. body
attribute_display_name?string

Attribute display name

attribute_display_type?integer

Attribute display type (text- 0, number- 1, currency- 2, percent- 3, link- 4, date- 5, list- 6, checkbox- 7)

attribute_description?string

Attribute description

attribute_key?string

Attribute unique key value

attribute_values?array<string>

Attribute values

attribute_model?integer

Attribute type(conversation_attribute- 0, contact_attribute- 1)

regex_pattern?string

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

regex_cue?string

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

Response Body

Success

application/json
  1. response
id?integer

Identifier

attribute_display_name?string

Attribute display name

attribute_display_type?string

Attribute display type (text, number, currency, percent, link, date, list, checkbox)

attribute_description?string

Attribute description

attribute_key?string

Attribute unique key value

regex_pattern?string

Regex pattern

regex_cue?string

Regex cue

attribute_values?string

Attribute values

attribute_model?string

Attribute type(conversation_attribute/contact_attribute)

default_value?string

Attribute default value

created_at?string

The date and time when the custom attribute was created

updated_at?string

The date and time when the custom attribute was updated

Example Request
curl -X PATCH 'https://helpdesk.inclamo.com/api/v1/accounts/0/custom_attribute_definitions/0' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "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"}