For the complete documentation index, see llms.txt. This page is also available as Markdown.

Chatbot variables

Lists all global variables for a chatbot

get

Required Permission: chatbots.variables.list

Resource: chatbots/:chatbotId

Authorizations
x-chatcaptain-keystringRequired
Path parameters
chatbotIdstringRequired

The ID of the chatbot.

Query parameters
filtersstringOptional

Filters variables by categories. Separate multiple filters with commas.

  • 0: CUSTOM
  • 1: APP
  • 2: Entity
Example: 0,1
Responses
200

List of all global variables.

application/json
errorstringOptional

Optional error message.

get
/v1/chatbots/{chatbotId}/variables

Creates a new global variable

post

Required Permission: chatbots.variables.create

Resource: chatbots/:chatbotId

Authorizations
x-chatcaptain-keystringRequired
Path parameters
chatbotIdstringRequired

The ID of the chatbot.

Body
categorystring · enumRequired

The category of the variable.

Example: customPossible values:
defaultValuestringOptional

An optional default value for the variable.

Example: Default Value
labelstringRequired

The human-readable label of the variable.

Example: Customer Email
typestringRequired

The data type of the variable (e.g., "string", "number", "boolean", "object").

Example: string
namestringRequired

The programmatic name of the variable.

Example: customer_email
structureJsonstring · jsonOptional

A JSON string defining the structure for object variables.

Example: {"firstName": "string", "lastName": "string"}
subCategorynumber · enumRequired

Sets the subCategory of the variable.

  • 0: GLOBAL_VARIABLE_SUB_CATEGORY_CONVERSATION
  • 1: GLOBAL_VARIABLE_SUB_CATEGORY_CONTACT
Possible values:
Responses
post
/v1/chatbots/{chatbotId}/variables

Deletes a global variable

delete

Required Permission: chatbots.variables.delete

Resource: chatbots/:chatbotId

Authorizations
x-chatcaptain-keystringRequired
Path parameters
chatbotIdstringRequired

The ID of the chatbot.

variableIdstringRequired

The ID of the variable to be deleted.

Responses
200

Result of the deletion process.

application/json
deletedbooleanOptional

Indicates whether the variable was successfully deleted.

Example: true
delete
/v1/chatbots/{chatbotId}/variables/{variableId}

Updates an existing global variable

patch

Required Permission: chatbots.variables.edit

Resource: chatbots/:chatbotId

Authorizations
x-chatcaptain-keystringRequired
Path parameters
chatbotIdstringRequired

The ID of the chatbot.

variableIdstringRequired

The ID of the variable to be updated.

Body
defaultValuestringOptional

The new default value.

Example: Updated Default
labelstringOptional

The new label.

Example: Updated Label
namestringOptional

The new programmatic name.

Example: updated_variable_name
Responses
200

Global variable updated successfully.

application/json
patch
/v1/chatbots/{chatbotId}/variables/{variableId}

Last updated