v1

latestOpenAPI 3.0.32026-07-13201451.3 KB
Contacts

Create custom attribute

Creates a new custom attribute for contacts

post/chatbots/{chatbotId}/custom-attributes

Path parameters

chatbotIdstring required

ID of the chatbot

Request body

namestring required

Attribute name (must start with a letter and can only contain letters, numbers, underscores, and hyphens)

labelstring

Display label for the attribute

type'text' | 'number' | 'boolean' | 'date' required

Attribute data type

descriptionstring

Description of the attribute

archivedboolean

Whether the attribute is archived

Example request

{
  "name": "department",
  "label": "Department",
  "type": "text",
  "description": "Employee department"
}

Response

Custom attribute created successfully

messagestring

Example response

{
  "message": "Success",
  "data": {
    "name": "department",
    "label": "Department",
    "type": "text",
    "description": "Employee department"
  }
}