Contact Variables
Authorizations
x-chatcaptain-keystringRequired
Path parameters
chatbotIdstringRequired
The Id of the chatbot.
contactIdstringRequired
The Id of the contact.
Responses
200
The list of contact variables.
application/json
errorstringOptional
Optional error message.
403
Insufficient permissions.
get/v1/chatbots/{chatbotId}/contacts/variables/{contactId}
GET /v1/chatbots/{chatbotId}/contacts/variables/{contactId} HTTP/1.1
Host: api.chatcaptain.com
x-chatcaptain-key: YOUR_API_KEY
Accept: */*
{
"variables": [
{
"id": "oxFRSIOBMF3gaiD3XRGK",
"name": "customer_name",
"type": "string",
"value": "Max Mustermann",
"updated": "2025-10-06T10:00:00Z"
}
],
"error": "text"
}Authorizations
x-chatcaptain-keystringRequired
Path parameters
chatbotIdstringRequired
The Id of the chatbot.
contactIdstringRequired
The Id of the contact.
Responses
200
The deletion result.
application/json
deletedbooleanOptionalExample:
Indicates whether the deletion operation was successful.
trueerrorstringOptional
Optional error message.
403
Insufficient permissions.
delete/v1/chatbots/{chatbotId}/contacts/variables/{contactId}
DELETE /v1/chatbots/{chatbotId}/contacts/variables/{contactId} HTTP/1.1
Host: api.chatcaptain.com
x-chatcaptain-key: YOUR_API_KEY
Accept: */*
{
"deleted": true,
"error": "text"
}Authorizations
x-chatcaptain-keystringRequired
Path parameters
chatbotIdstringRequired
The Id of the chatbot.
variableIdstringRequired
The Id of the variable.
contactIdstringRequired
The Id of the contact.
Responses
200
The requested variable.
application/json
errorstringOptional
Optional error message.
403
Insufficient permissions.
get/v1/chatbots/{chatbotId}/contacts/variables/{contactId}/{variableId}
GET /v1/chatbots/{chatbotId}/contacts/variables/{contactId}/{variableId} HTTP/1.1
Host: api.chatcaptain.com
x-chatcaptain-key: YOUR_API_KEY
Accept: */*
{
"variable": {
"id": "oxFRSIOBMF3gaiD3XRGK",
"name": "customer_name",
"type": "string",
"value": "Max Mustermann",
"updated": "2025-10-06T10:00:00Z"
},
"error": "text"
}Authorizations
x-chatcaptain-keystringRequired
Path parameters
chatbotIdstringRequired
The Id of the chatbot.
variableIdstringRequired
The Id of the variable whose value is to be set.
Body
valuestringRequiredExample:
The new value to be assigned to the variable.
Custom ValuecontactIdstringOptionalExample:
The id of the contact to assign the variable to.
fdnklxaCACfw92b01vResponses
200
The updated variable.
application/json
errorstringOptional
Optional error message.
400
Invalid input data.
403
Insufficient permissions.
put/v1/chatbots/{chatbotId}/contacts/variables/{variableId}
PUT /v1/chatbots/{chatbotId}/contacts/variables/{variableId} HTTP/1.1
Host: api.chatcaptain.com
x-chatcaptain-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 57
{
"value": "Custom Value",
"contactId": "fdnklxaCACfw92b01v"
}{
"variable": {
"id": "oxFRSIOBMF3gaiD3XRGK",
"name": "customer_name",
"type": "string",
"value": "Max Mustermann",
"updated": "2025-10-06T10:00:00Z"
},
"error": "text"
}Last updated