Custom attributes

Add a new custom attribute

Add a new custom attribute to account

post/v1/workspaces/{workspace_id}/custom_attribute_definitions

Request

  • Base URL: https://api.oxvo.com
  • URL: https://api.oxvo.com/v1/workspaces/{workspace_id}/custom_attribute_definitions
  • Auth: API key in header api_access_token

Request body

attribute_display_namestring

Attribute display name

attribute_display_typeinteger

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

attribute_descriptionstring

Attribute description

attribute_keystring

Attribute unique key value

attribute_valuesstring[]

Attribute values

attribute_modelinteger

Attribute type(conversation_attribute- 0, contact_attribute- 1)

regex_patternstring

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

regex_cuestring

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

Example request

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

Response

Success

idinteger

Identifier

attribute_display_namestring

Attribute display name

attribute_display_typestring

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

attribute_descriptionstring

Attribute description

attribute_keystring

Attribute unique key value

regex_patternstring

Regex pattern

regex_cuestring

Regex cue

attribute_valuesstring

Attribute values

attribute_modelstring

Attribute type(conversation_attribute/contact_attribute)

default_valuestring

Attribute default value

created_atstring

The date and time when the custom attribute was created

updated_atstring

The date and time when the custom attribute was updated

Changes

No recorded changes to this operation across all 1 revision of this API.