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",
  "type": "text",
  "label": "Department",
  "description": "Employee department",
  "archived": false
}
'
{
  "message": "Success",
  "data": {
    "name": "department",
    "label": "Department",
    "type": "text",
    "description": "Employee department",
    "archived": false
  }
}

Documentation Index

Fetch the complete documentation index at: https://chatbase.co/docs/llms.txt

Use this file to discover all available pages before exploring further.

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)

Pattern: ^[a-zA-Z][a-zA-Z0-9_-]*$
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