Custom Attributes: Add a new custom attribute
gapify_add_custom_attributeDefine a new custom attribute for an account to capture extra conversation or contact data. Specify display name, key, type, and allowed values in one API call.
Instructions
Add a new custom attribute to account [Custom Attributes]
POST /api/v1/accounts/{account_id}/custom_attribute_definitions
Auth: User API key (header api-access-token).
Body fields: attribute_display_name, attribute_display_type, attribute_description, attribute_key, attribute_values, attribute_model. Extra fields can be passed via extra_body.
Text values may be written in Persian (Farsi) or any other language and are sent unchanged; IDs, numbers and phone numbers may use Persian or Arabic-Indic digits.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account_id | Yes | The numeric ID of the account | |
| extra_body | No | Additional JSON body fields to merge into the request (for keys not listed above). | |
| attribute_key | No | Attribute unique key value | |
| attribute_model | No | Attribute type(conversation_attribute- 0, contact_attribute- 1) Example: 0 | |
| attribute_values | No | Attribute values Example: ["string"] | |
| attribute_description | No | Attribute description | |
| attribute_display_name | No | Attribute display name | |
| attribute_display_type | No | Attribute display type (text- 0, number- 1, currency- 2, percent- 3, link- 4, date- 5, list- 6, checkbox- 7) Example: 0 |