Skip to content

Canned Responses

The Canned Responses API allows you to manage pre-defined quick replies for your organization.

RoleListCreateUpdateDeleteUse
AdminYesYesYesYesYes
ManagerYesYesYesYesYes
AgentYesNoNoNoYes

Retrieve all canned responses for your organization.

Terminal window
GET /api/canned-responses
ParameterTypeDescription
categorystringFilter by category (e.g., greeting, support)
searchstringSearch in name, content, and shortcut
active_onlystringSet to "true" to only return active responses
{
"status": "success",
"data": {
"canned_responses": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Welcome Message",
"shortcut": "welcome",
"content": "Hello {{contact_name}}! Thank you for reaching out. How can I help you today?",
"category": "greeting",
"is_active": true,
"usage_count": 42,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
},
{
"id": "550e8400-e29b-41d4-a716-446655440001",
"name": "Business Hours",
"shortcut": "hours",
"content": "Our business hours are Monday to Friday, 9 AM to 6 PM EST.",
"category": "support",
"is_active": true,
"usage_count": 28,
"created_at": "2024-01-15T11:00:00Z",
"updated_at": "2024-01-15T11:00:00Z"
}
]
}
}

Retrieve a single canned response by ID.

Terminal window
GET /api/canned-responses/{id}
{
"status": "success",
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Welcome Message",
"shortcut": "welcome",
"content": "Hello {{contact_name}}! Thank you for reaching out. How can I help you today?",
"category": "greeting",
"is_active": true,
"usage_count": 42,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
}

Create a new canned response.

Terminal window
POST /api/canned-responses
{
"name": "Welcome Message",
"shortcut": "welcome",
"content": "Hello {{contact_name}}! Thank you for reaching out. How can I help you today?",
"category": "greeting"
}
FieldTypeRequiredDescription
namestringYesDisplay name for the response
contentstringYesThe response text (supports placeholders)
shortcutstringNoQuick-access code for slash commands
categorystringNoCategory for organization
{
"status": "success",
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Welcome Message",
"shortcut": "welcome",
"content": "Hello {{contact_name}}! Thank you for reaching out. How can I help you today?",
"category": "greeting",
"is_active": true,
"usage_count": 0,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
}

Update an existing canned response.

Terminal window
PUT /api/canned-responses/{id}
{
"name": "Updated Welcome Message",
"shortcut": "hi",
"content": "Hi {{contact_name}}! Welcome to our support. How may I assist you?",
"category": "greeting",
"is_active": true
}
FieldTypeDescription
namestringDisplay name for the response
contentstringThe response text
shortcutstringQuick-access code
categorystringCategory for organization
is_activebooleanWhether the response is active

Delete a canned response.

Terminal window
DELETE /api/canned-responses/{id}
{
"status": "success",
"data": {
"message": "Canned response deleted"
}
}

Increment the usage counter for a canned response. This is typically called automatically when a response is used in chat.

Terminal window
POST /api/canned-responses/{id}/use
{
"status": "success",
"data": {
"message": "Usage incremented"
}
}

The following categories are supported:

ValueLabel
greetingGreetings
supportSupport
salesSales
closingClosing
generalGeneral

Canned response content can include placeholders that are replaced with actual values when used:

PlaceholderDescription
{{contact_name}}Contact’s profile name
{{phone_number}}Contact’s phone number
{
"status": "error",
"message": "name and content are required"
}
{
"status": "error",
"message": "Canned response not found"
}
{
"status": "error",
"message": "Canned response with this name already exists"
}