Skip to main content
POST
/
chatbots
/
{chatbotId}
/
custom-attributes
Create custom attribute
curl --request POST \
  --url https://www.chatbase.co/api/v1/chatbots/{chatbotId}/custom-attributes \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "department",
  "label": "Department",
  "type": "text",
  "description": "Employee department",
  "archived": false
}'
{
  "message": "Success",
  "data": {
    "name": "department",
    "label": "Department",
    "type": "text",
    "description": "Employee department",
    "archived": false
  }
}

Authorizations

Authorization
string
header
required

API key in Bearer token format

Path Parameters

chatbotId
string
required

ID of the chatbot

Body

application/json
name
string
required

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

Example:

"department"

type
enum<string>
required

Attribute data type

Available options:
text,
number,
boolean,
date
Example:

"text"

label
string

Display label for the attribute

Example:

"Department"

description
string

Description of the attribute

Example:

"Employee department"

archived
boolean
default:false

Whether the attribute is archived

Example:

false

Response

Custom attribute created successfully

message
string
Example:

"Success"

data
object

Created custom attribute

I