Skip to content

Commit 2de0724

Browse files
authored
feat(docs): add canned responses endpoints (#1589)
1 parent df4c0ef commit 2de0724

File tree

4 files changed

+333
-3
lines changed

4 files changed

+333
-3
lines changed

src/pages/management/changelog/index.mdx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@ The developer preview version provides a preview of the upcoming changes to the
2020

2121
</Warning>
2222

23+
## [v3.7] - Developer preview
24+
25+
### Canned responses
26+
27+
- Added canned response management methods:
28+
- [**Create Canned Response**](/management/configuration-api/v3.7#create-canned-response)
29+
- [**Update Canned Response**](/management/configuration-api/v3.7#update-canned-response)
30+
- [**List Canned Responses**](/management/configuration-api/v3.7#list-canned-responses)
31+
- [**Delete Canned Response**](/management/configuration-api/v3.7#delete-canned-response)
32+
2333
## [v3.6] - 2025-08-07
2434

2535
### Agents

src/pages/management/configuration-api/v3.7/index.mdx

Lines changed: 261 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ All configurations set by this API will have action in system after max 2 minute
4242
| **Properties** | [`register_properties`](#register-properties) [`unregister_properties`](#unregister-properties) [`publish_properties`](#publish-properties) [`list_properties`](#list-properties) [`update_license_properties`](#update-license-properties) [`delete_license_properties`](#delete-license-properties) [`list_license_properties`](#list-license-properties) [`update_group_properties`](#update-group-properties) [`delete_group_properties`](#delete-group-properties) [`list_groups_properties`](#list-groups-properties) |
4343
| **Tags** | [`create_tag`](#create-tag) [`delete_tag`](#delete-tag) [`list_tags`](#list-tags) [`update_tag`](#update-tag) |
4444
| **Webhooks** | [`register_webhook`](#register-webhook) [`list_webhooks`](#list-webhooks) [`unregister_webhook`](#unregister-webhook) [`list_webhook_names`](#list-webhook-names) [`enable_license_webhook`](#enable-license-webhooks) [`disable_license_webhook`](#disable-license-webhooks) [`get_license_webhooks_state`](#get-license-webhooks-state) |
45+
| **Canned responses** | [`create_canned_response`](#create-canned-response) [`list_canned_responses`](#list-canned-responses) [`update_canned_response`](#update-canned-response) [`delete_canned_response`](#delete-canned-response) |
4546
| **Other** | [`list_channels`](#list-channels) [`check_product_limits_for_plan`](#check-product-limits-for-plan) [`reactivate_email`](#reactivate-email) [`update_company_details`](#update-company-details) |
4647

4748
## Batch requests
@@ -3666,6 +3667,266 @@ curl -X POST \
36663667

36673668
To see the list of available webhooks v3.7, [visit the Webhooks](/management/webhooks/v3.7/) document.
36683669

3670+
# Canned responses
3671+
3672+
<Section>
3673+
3674+
### Create Canned Response
3675+
3676+
Creates a new canned response.
3677+
3678+
#### Specifics
3679+
3680+
| | |
3681+
| -------------------------------- | ----------------------------------------------------------------------------- |
3682+
| Method URL | `https://api.livechatinc.com/v3.7/configuration/action/create_canned_response` |
3683+
| Required scopes | `canned_responses_write` |
3684+
| [Batch support](#batch-requests) | No |
3685+
3686+
#### Request
3687+
3688+
| Parameter | Required | Data type | Notes |
3689+
| ----------- | -------- | ---------------- | -------------------------------------------------------- |
3690+
| `text` | Yes | `string` | Canned response text content <sup>**1**</sup> |
3691+
| `tags` | Yes | `array[string]` | Array of tags |
3692+
| `group_id` | Yes | `number` | ID of the group the canned response belongs to |
3693+
| `is_private`| No | `bool` | Whether the canned response is private; default: `false` |
3694+
3695+
**1)** `text` is sanitized when created. If sanitization removes all content and the input becomes empty, the system rejects the request as invalid.
3696+
3697+
#### Response
3698+
3699+
| Parameter | Data type | Notes |
3700+
| --------- | --------- | ---------------------------- |
3701+
| `id` | `number` | ID of the created canned response |
3702+
3703+
<Code>
3704+
3705+
<CodeSample path={'REQUEST'}>
3706+
3707+
```shell
3708+
curl -X POST \
3709+
https://api.livechatinc.com/v3.7/configuration/action/create_canned_response \
3710+
-H 'Authorization: Bearer <your_access_token>' \
3711+
-H 'Content-Type: application/json' \
3712+
-d '{
3713+
"text": "Thank you for contacting us! How can I help you today?",
3714+
"tags": ["greeting", "support"],
3715+
"group_id": 1,
3716+
"is_private": false
3717+
}'
3718+
```
3719+
3720+
</CodeSample>
3721+
3722+
<CodeResponse>
3723+
3724+
```json
3725+
{
3726+
"id": 12345
3727+
}
3728+
```
3729+
3730+
</CodeResponse>
3731+
3732+
</Code>
3733+
3734+
### Update Canned Response
3735+
3736+
Updates an existing canned response.
3737+
3738+
#### Specifics
3739+
3740+
| | |
3741+
| -------------------------------- | ----------------------------------------------------------------------------- |
3742+
| Method URL | `https://api.livechatinc.com/v3.7/configuration/action/update_canned_response` |
3743+
| Required scopes | `canned_responses_write` |
3744+
| [Batch support](#batch-requests) | No |
3745+
3746+
#### Request
3747+
3748+
| Parameter | Required | Data type | Notes |
3749+
| ----------- | -------- | ---------------- | -------------------------------------------------------- |
3750+
| `id` | Yes | `number` | ID of the canned response to update |
3751+
| `text` | No | `string` | New canned response text <sup>1</sup> |
3752+
| `tags` | No | `array[string]` | Array of tags |
3753+
| `group_id` | No | `number` | New group ID for the canned response |
3754+
| `is_private`| No | `bool` | Whether the canned response is private |
3755+
3756+
**1)** `text` is sanitized when created. If sanitization removes all content and the input becomes empty, the system rejects the request as invalid.
3757+
3758+
#### Response
3759+
3760+
Empty response object `{}`.
3761+
3762+
<Code>
3763+
3764+
<CodeSample path={'REQUEST'}>
3765+
3766+
```shell
3767+
curl -X POST \
3768+
https://api.livechatinc.com/v3.7/configuration/action/update_canned_response \
3769+
-H 'Authorization: Bearer <your_access_token>' \
3770+
-H 'Content-Type: application/json' \
3771+
-d '{
3772+
"id": 12345,
3773+
"text": "Thank you for contacting us! How may I assist you today?",
3774+
"tags": ["greeting", "support", "updated"],
3775+
"is_private": true
3776+
}'
3777+
```
3778+
3779+
</CodeSample>
3780+
3781+
<CodeResponse>
3782+
3783+
```json
3784+
{}
3785+
```
3786+
3787+
</CodeResponse>
3788+
3789+
</Code>
3790+
3791+
### List Canned Responses
3792+
3793+
Returns a paginated list of canned responses.
3794+
3795+
#### Specifics
3796+
3797+
| | |
3798+
| -------------------------------- | ---------------------------------------------------------------------------- |
3799+
| Method URL | `https://api.livechatinc.com/v3.7/configuration/action/list_canned_responses` |
3800+
| Required scopes | `canned_responses_read` |
3801+
| [Batch support](#batch-requests) | No |
3802+
3803+
#### Request
3804+
3805+
| Parameter | Required | Data type | Notes |
3806+
| ----------------- | -------- | ---------------- | -------------------------------------------------------- |
3807+
| `group_ids` | No | `array[number]` | Filter by specific group IDs (if not provided, defaults to groups the user has access to) |
3808+
| `include_private` | No | `bool` | Include private canned responses; default: `false` |
3809+
| `limit` | No | `number` | Number of results per page (1-100, default: 100) |
3810+
| `page_id` | No | `string` | Page ID for pagination |
3811+
3812+
#### Response
3813+
3814+
| Parameter | Data type | Notes |
3815+
| -------------------- | ------------------------ | ---------------------------------------- |
3816+
| `canned_responses` | `array[CannedResponse]` | Array of canned response objects |
3817+
| `found_canned_responses` | `number` | Total number of canned responses found |
3818+
| `next_page_id` | `string` | Page ID for next page (if exists) |
3819+
3820+
##### Response
3821+
3822+
| Parameter | Data type | Notes |
3823+
| ----------- | ---------------- | ----------------------------------- |
3824+
| `id` | `number` | Canned response ID |
3825+
| `text` | `string` | Canned response text content |
3826+
| `tags` | `array[string]` | Array of tags |
3827+
| `group_id` | `number` | Group ID the canned response belongs to |
3828+
| `is_private`| `bool` | Whether the canned response is private |
3829+
| `author_id` | `string` | User ID of the last editor |
3830+
3831+
<Code>
3832+
3833+
<CodeSample path={'REQUEST'}>
3834+
3835+
```shell
3836+
curl -X POST \
3837+
https://api.livechatinc.com/v3.7/configuration/action/list_canned_responses \
3838+
-H 'Authorization: Bearer <your_access_token>' \
3839+
-H 'Content-Type: application/json' \
3840+
-d '{
3841+
"group_ids": [1, 2],
3842+
"include_private": true,
3843+
"limit": 10
3844+
}'
3845+
```
3846+
3847+
</CodeSample>
3848+
3849+
<CodeResponse>
3850+
3851+
```json
3852+
{
3853+
"canned_responses": [
3854+
{
3855+
"id": 12345,
3856+
"text": "Thank you for contacting us! How may I assist you today?",
3857+
"tags": ["greeting", "support", "updated"],
3858+
"group_id": 1,
3859+
"is_private": true,
3860+
"author_id": "agent123"
3861+
},
3862+
{
3863+
"id": 12346,
3864+
"text": "We'll get back to you within 24 hours.",
3865+
"tags": ["follow-up"],
3866+
"group_id": 1,
3867+
"is_private": false,
3868+
"author_id": "agent456"
3869+
}
3870+
],
3871+
"found_canned_responses": 25,
3872+
"next_page_id": "MTIzNDY="
3873+
}
3874+
```
3875+
3876+
</CodeResponse>
3877+
3878+
</Code>
3879+
3880+
### Delete Canned Response
3881+
3882+
Deletes an existing canned response.
3883+
3884+
#### Specifics
3885+
3886+
| | |
3887+
| -------------------------------- | ----------------------------------------------------------------------------- |
3888+
| Method URL | `https://api.livechatinc.com/v3.7/configuration/action/delete_canned_response` |
3889+
| Required scopes | `canned_responses_write` |
3890+
| [Batch support](#batch-requests) | No |
3891+
3892+
#### Request
3893+
3894+
| Parameter | Required | Data type | Notes |
3895+
| --------- | -------- | --------- | ---------------------------------- |
3896+
| `id` | Yes | `number` | ID of the canned response to delete |
3897+
3898+
#### Response
3899+
3900+
Empty response object `{}`.
3901+
3902+
<Code>
3903+
3904+
<CodeSample path={'REQUEST'}>
3905+
3906+
```shell
3907+
curl -X POST \
3908+
https://api.livechatinc.com/v3.7/configuration/action/delete_canned_response \
3909+
-H 'Authorization: Bearer <your_access_token>' \
3910+
-H 'Content-Type: application/json' \
3911+
-d '{
3912+
"id": 12345
3913+
}'
3914+
```
3915+
3916+
</CodeSample>
3917+
3918+
<CodeResponse>
3919+
3920+
```json
3921+
{}
3922+
```
3923+
3924+
</CodeResponse>
3925+
3926+
</Code>
3927+
3928+
</Section>
3929+
36693930
# Other
36703931

36713932
## Methods

src/pages/messaging/agent-chat-api/changelog/index.mdx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,20 @@ The developer preview version provides a preview of the upcoming changes to the
1919

2020
</Warning>
2121

22-
## [v3.7]
22+
## [v3.7] - Developer preview
23+
24+
### Configuration
25+
26+
- There are new pushes:
27+
- [canned_response_created](/messaging/agent-chat-api/v3.7/rtm-pushes/#canned_response_created)
28+
- [canned_response_updated](/messaging/agent-chat-api/v3.7/rtm-pushes/#canned_response_updated)
29+
- [canned_response_deleted](/messaging/agent-chat-api/v3.7/rtm-pushes/#canned_response_deleted)
2330

2431
### Chats
2532

2633
- The **List Archives** ([Web](/messaging/agent-chat-api/v3.7/#list-archives) & [RTM](/messaging/agent-chat-api/rtm-reference/#list-archives)) method has a new filter, `chat_ids`.
2734

28-
## [v3.6]
35+
## [v3.6] - 2025-08-07
2936

3037
### Chats
3138

src/pages/messaging/agent-chat-api/v3.7/rtm-pushes/index.mdx

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Here's what you need to know about **pushes**:
3737
| **Thread tags** | [`thread_tagged`](#thread_tagged) [`thread_untagged`](#thread_untagged) |
3838
| **Customers** | [`incoming_customers`](#incoming_customers) [`incoming_customer`](#incoming_customer) [`customer_updated`](#customer_updated) [`customer_page_updated`](#customer_page_updated) [`customer_banned`](#customer_banned) [`customer_transferred`](#customer_transferred) [`customer_left`](#customer_left) [`subscribed_customers_totals_updated`](#subscribed_customers_totals_updated) [`ticket_created`](#ticket_created) [`ticket_deleted`](#ticket_deleted) |
3939
| **Status** | [`routing_status_set`](#routing_status_set) [`agent_disconnected`](#agent_disconnected) |
40-
| **Configuration** | [`agent_created`](#agent_created) [`agent_approved`](#agent_approved) [`agent_updated`](#agent_updated) [`agent_suspended`](#agent_suspended) [`agent_unsuspended`](#agent_unsuspended) [`agent_deleted`](#agent_deleted) [`auto_accesses_updated`](#auto_accesses_updated) [`bot_created`](#bot_created) [`bot_updated`](#bot_updated) [`bot_deleted`](#bot_deleted) [`group_created`](#group_created) [`group_updated`](#group_updated) [`group_deleted`](#group_deleted) [`tag_created`](#tag_created) [`tag_deleted`](#tag_deleted) [`tag_updated`](#tag_updated) [`groups_status_updated`](#groups_status_updated) [`license_properties_updated`](#license_properties_updated) [`group_properties_updated`](#group_properties_updated) |
40+
| **Configuration** | [`agent_created`](#agent_created) [`agent_approved`](#agent_approved) [`agent_updated`](#agent_updated) [`agent_suspended`](#agent_suspended) [`agent_unsuspended`](#agent_unsuspended) [`agent_deleted`](#agent_deleted) [`auto_accesses_updated`](#auto_accesses_updated) [`bot_created`](#bot_created) [`bot_updated`](#bot_updated) [`bot_deleted`](#bot_deleted) [`canned_response_created`](#canned_response_created) [`canned_response_updated`](#canned_response_updated) [`canned_response_deleted`](#canned_response_deleted) [`group_created`](#group_created) [`group_updated`](#group_updated) [`group_deleted`](#group_deleted) [`tag_created`](#tag_created) [`tag_deleted`](#tag_deleted) [`tag_updated`](#tag_updated) [`groups_status_updated`](#groups_status_updated) [`license_properties_updated`](#license_properties_updated) [`group_properties_updated`](#group_properties_updated) |
4141
| **Other** | [`events_marked_as_seen`](#events_marked_as_seen) [`incoming_sneak_peek`](#incoming_sneak_peek) [`incoming_thinking_indicator`](#incoming_thinking_indicator) [`incoming_typing_indicator`](#incoming_typing_indicator) [`incoming_multicast`](#incoming_multicast) [`chat_unfollowed`](#chat_unfollowed) [`queue_positions_updated`](#queue_positions_updated) [`customer_unfollowed`](#customer-unfollowed) |
4242

4343
</Text>
@@ -1103,6 +1103,58 @@ Informs that a bot was deleted.
11031103

11041104
</CodeResponse>
11051105

1106+
### `canned_response_created`
1107+
1108+
Informs that a canned response was created. The payload contains the full state of the canned response data structure.
1109+
1110+
<CodeResponse title={'Sample push payload'}>
1111+
1112+
```json
1113+
{
1114+
"id": 12345,
1115+
"text": "Thank you for contacting us! How can I help you today?",
1116+
"tags": ["greeting", "support"],
1117+
"group_id": 1,
1118+
"is_private": false,
1119+
"author_id": "agent123"
1120+
}
1121+
```
1122+
1123+
</CodeResponse>
1124+
1125+
### `canned_response_updated`
1126+
1127+
Informs that a canned response was updated. The payload contains the updated canned response data.
1128+
1129+
<CodeResponse title={'Sample push payload'}>
1130+
1131+
```json
1132+
{
1133+
"id": 12345,
1134+
"text": "Thank you for contacting us! How may I assist you today?",
1135+
"tags": ["greeting", "support", "updated"],
1136+
"group_id": 1,
1137+
"is_private": true,
1138+
"author_id": "agent123"
1139+
}
1140+
```
1141+
1142+
</CodeResponse>
1143+
1144+
### `canned_response_deleted`
1145+
1146+
Informs that a canned response was deleted.
1147+
1148+
<CodeResponse title={'Sample push payload'}>
1149+
1150+
```json
1151+
{
1152+
"id": 12345
1153+
}
1154+
```
1155+
1156+
</CodeResponse>
1157+
11061158
### `group_created`
11071159

11081160
Informs that a group was created within a license. The payload contains the full state of the [group](/management/configuration-api/v3.7/#groups) data structure, including empty fields.

0 commit comments

Comments
 (0)