Configuration API
Introduction
Configuration API is a service for storing configuration of license. You can set up here different types of features such as properties or webhooks.
Versioning
This document describes the Configuration API v3.5. This is the developer preview version that provides a preview of the upcoming changes to the API. It's not open to public use. However, if you want to test some features, contact us at developers@livechat.com or ask on the chat, and we'll give you access. Read more about versioning...
Authentication
Authentication for Configuration API is handled by access tokens. Find out how to get an access token from Agent authorization flows. If a method requires particular authorization scopes, you’ll find them included in the method description. Each request should contain the Authorization: Bearer <your_access_token>
header.
Data centers
LiveChat system operates in two data centers: dal
(USA) and fra
(Europe). The default data center is dal
.
All the LiveChat OAuth 2.1 access tokens have a prefix: dal:
or fra:
. This prefix indicates the data center they belong to. If you need to specify the data center while making an API call, simply add the X-Region: <token_prefix>
optional header.
Summing up, if the user token starts with fra
, you should add the X-Region: fra
header. If the token starts with dal
, you don’t have to specify the header.
If you get the misdirected_request
error, use the prefix returned in the error as the value of X-Region
.
Propagation delay
All configurations set by this API will have action in system after max 2 minutes. This delay will be removed in the future.
Agents
An agent is a type of user who communicates with customers. You can look up the sample agent data structure in the response of Get Agent.
Methods
HTTP method | The Agents API endpoint |
---|---|
POST | https://api.livechatinc.com/v3.5/configuration/action/<action> |
Required header | Value |
---|---|
Content-Type | application/json |
Create Agent
Creates a new agent with specified parameters within a license.
Specifics
Method URL | https://api.livechatinc.com/v3.5/configuration/action/create_agent |
Required scopes | accounts--all:rc accounts--all:rw 1 subscription.lc:rw 1 |
1) – to create agents who don't have to wait for approval after creation
Request
Parameter | Data type | Required | Notes |
---|---|---|---|
id | string | Yes | Agent ID |
name | string | Yes | Agent name |
role | string | No | Agent role, should be one of the following: viceowner , administrator , normal (default). |
avatar | string | No | Avatar URL |
job_title | string | No | Agent's job title |
mobile | string | No | Agent's mobile number |
max_chats_count | int | No | Agent's maximum number of concurrent chats; default: 6. Limited to 100. |
awaiting_approval | bool | No | Determines if the Agent will be awaiting approval after creation. Only a requester with the subscription.lc:rw scope can set this value to false . |
groups | object[] | No | Groups an Agent belongs to. |
groups[].id | uint | Yes | Group ID; required only when group is included. |
groups[].priority * | string | Yes | Agent's priority in a group; required only when group is included. |
notifications ** | string[] | No | Represents which Agent notifications are turned on. |
email_subscriptions *** | string[] | No | Represents which subscriptions will be send to the Agent via email. |
work_scheduler | object | No | Work scheduler options to set for the new Agent |
work_scheduler.****.<work_scheduler> | object | No | <work_scheduler> values ***** |
* Possible values for the groups[].priority
parameter:
Possible value | Notes |
---|---|
first | The highest chat routing priority. Agents with the first priority get chats before others from the same group, e.g. Bots can get chats before regular Agents. Corresponds to the Bot priority option in the LiveChat App. |
normal | The medium chat routing priority. Agents with the normal priority get chats before those with the last priority, when there are no Agents with the first priority available with free slots in the group. Corresponds to the Primary priority option in the LiveChat App. |
last | The lowest chat routing priority. Agents with the last priority get chats when there are no Agents with the first or normal priority available with free slots in the group. Corresponds to the Secondary priority option in the LiveChat App. |
supervisor | Agents with the supervisor priority will not get any chats assigned automatically. |
** Possible values for the notifications
array:
new_visitor
incoming_chat
returning_visitor
queued_visitor
visitor_is_typing
new_goal
unassigned_chats
unassigned_chat_messages
ticket
inactive_notifications
mute_all_sounds
repeat_sound_notifications
ticket_notifications
incoming_message_for_focused_chat
*** Possible values for the email_subscriptions
array:
daily_summary
weekly_summary
**** Possible values for the work_scheduler
object keys:
sunday
monday
tuesday
wednesday
thursday
friday
saturday
***** <work_scheduler>
contains the following fields:
start
(string
) - the time when the Agent starts work, in the format:HH:MM
end
(string
) - the time when the Agent finishes work, in the format:HH:MM
REQUEST
curl -X POST \
https://api.livechatinc.com/v3.5/configuration/action/create_agent \
-H 'Authorization: Bearer <your_access_token>' \
-H 'Content-Type: application/json' \
-d '{
"id": "smith@example.com",
"name": "Agent Smith",
"role": "viceowner",
"groups": [
{
"id": 5,
"priority": "first"
},
{
"id": 2,
"priority": "last"
},
{
"id": 1,
"priority": "normal"
}
],
"work_scheduler": {
"monday": {
"start": "08:30",
"end": "12:30"
}
},
"notifications": [
"new_visitor",
"new_goal",
"visitor_is_typing"
],
"email_subscriptions": [
"weekly_summary"
]
}'
{
"id": "smith@example.com"
}
Get Agent
It returns the info about an Agent specified by id
.
Specifics
Method URL | https://api.livechatinc.com/v3.5/configuration/action/get_agent |
Required scopes | agents--my:ro agents--all:ro |
Request
Parameter | Type | Required | Notes |
---|---|---|---|
id | string | Yes | Agent ID |
fields * | string[] | No | Additional fields to include. |
* Possible values for the fields[]
parameter:
Possible value | Notes |
---|---|
work_scheduler | Work scheduler object for an Agent |
groups | Groups an Agent belongs to |
email_subscriptions | A list of an Agent's active subscriptions |
notifications | A list of an Agent's enabled notifications |
job_title | Agent's job title |
mobile | Agent's mobile number |
max_chats_count | Agent's maximum number of concurrent chats |
suspended | Boolean value indicating if an Agent is suspended |
awaiting_approval | Boolean value indicating if an Agent is awaiting approval |
REQUEST
curl -X POST \
https://api.livechatinc.com/v3.5/configuration/action/get_agent \
-H 'Authorization: Bearer <your_access_token>' \
-H 'Content-Type: application/json' \
-d '{
"id": "smith@example.com"
}'
{
"id": "smith@example.com",
"name": "Agent Smith",
"avatar": "https://domain.com/avatar.image.jpg",
"role": "administrator",
"login_status": "accepting chats"
}
List Agents
Returns all Agents within a license.
Specifics
Method URL | https://api.livechatinc.com/v3.5/configuration/action/list_agents |
Required scopes | agents--all:ro |
Request
Parameter | Required | Type | Notes |
---|---|---|---|
filters | No | object | Possible request filters |
filters.group_ids | No | int[] | IDs of the groups from which you want to list Agents. You'll only get the Agents from the specified group(s). |
filters.suspended | No | bool | If provided, returns only those Agents who have the same suspended field value. |
fields * | No | string[] | Additional Agent fields to include. |
* Possible values for the fields[]
parameter:
Possible value | Notes |
---|---|
groups | Groups an Agent belongs to |
work_scheduler | Work scheduler object for an Agent |
email_subscriptions | A list of the Agent's active email subscriptions |
notifications | A list of the Agent's enabled notifications |
job_title | Agent's job title |
mobile | Agent's mobile number |
max_chats_count | Agent's maximum number of concurrent chats |
suspended | Boolean value indicating if an Agent is suspended |
awaiting_approval | Boolean value indicating if an Agent is awaiting approval |
REQUEST
curl -X POST \
https://api.livechatinc.com/v3.5/configuration/action/list_agents \
-H 'Authorization: Bearer <your_access_token>' \
-H 'Content-Type: application/json' \
-d '{
"fields": [
"email_subscriptions",
"max_chats_count",
"job_title"
],
"filters": {
"group_ids": [
0,
1
]
}
}'
[
{
"avatar_path": "cdn.livechatinc.com/avatars/1.png",
"id": "smith@example.com",
"job_title": "Support Hero",
"login_status": "not accepting chats",
"name": "Smith",
"role": "owner",
"max_chats_count": 5,
"summaries": [
"daily_summary",
"weekly_summary"
]
},
{
"avatar_path": "cdn.livechatinc.com/avatars/2.png",
"id": "jones@example.com",
"job_title": "Support Hero (Newbie)",
"login_status": "accepting chats",
"name": "Jones",
"role": "viceowner",
"max_chats_count": 2,
"summaries": [
"weekly_summary"
]
}
]
Update Agent
Updates the properties of an Agent specified by id
.
Specifics
Method URL | https://api.livechatinc.com/v3.5/configuration/action/update_agent |
Required scopes | agents--my:rw agents--all:rw 1 accounts.roles.lc--all:rw 2 |
1) to update other agents within the same license
2) to update the agent role
Request
Parameter | Data type | Required | Notes |
---|---|---|---|
id | string | Yes | Agent ID |
name | string | No | Agent name |
role | string | No | Agent role, should be one of the following: viceowner , administrator , normal |
avatar | string | No | Avatar URL |
job_title | string | No | Agent's job title |
mobile | string | No | Agent's mobile number |
max_chats_count | int | No | Agent's maximum number of concurrent. Limited to 100. chats |
groups | object[] | No | Groups an Agent belongs to. |
groups[].id | uint | Yes | Group ID; required only when group 's included. |
groups[].priority * | string | Yes | Agent's priority in a group; required only when group 's included. |
notifications ** | string[] | No | Represents which Agent notifications are turned on. |
email_subscriptions *** | string[] | No | Represents which subscriptions will be send to an Agent via email. |
work_scheduler | object | No | Work scheduler options to set for a new Agent |
work_scheduler.****.<work_scheduler> | object | No | <work_scheduler> values ***** |
* Possible values for the groups[].priority
parameter:
Possible value | Notes |
---|---|
first | The highest chat routing priority. Agents with the first priority get chats before others from the same group, e.g. Bots can get chats before regular Agents. Corresponds to the Bot priority option in the LiveChat App. |
normal | The medium chat routing priority. Agents with the normal priority get chats before those with the last priority, when there are no Agents with the first priority available with free slots in the group. Corresponds to the Primary priority option in the LiveChat App. |
last | The lowest chat routing priority. Agents with the last priority get chats when there are no Agents with the first or normal priority available with free slots in the group. Corresponds to the Secondary priority option in the LiveChat App. |
supervisor | Agents with the supervisor priority will not get any chats assigned automatically. |
** Possible values for the notifications
array:
new_visitor
incoming_chat
returning_visitor
queued_visitor
visitor_is_typing
new_goal
unassigned_chats
unassigned_chat_messages
ticket
inactive_notifications
mute_all_sounds
repeat_sound_notifications
ticket_notifications
incoming_message_for_focused_chat
*** Possible values for the email_subscriptions
array:
daily_summary
weekly_summary
**** Possible values for the work_scheduler
object keys:
sunday
monday
tuesday
wednesday
thursday
friday
saturday
*****
<work_scheduler>
contains the following fields:
start
(string
) - the time when the Agent starts work, in the format:HH:MM
end
(string
) - the time when the Agent finishes work, in the format:HH:MM
Response
No response payload (200 OK
).
REQUEST
curl -X POST \
https://api.livechatinc.com/v3.5/configuration/action/update_agent \
-H 'Authorization: Bearer <your_access_token>' \
-H 'Content-Type: application/json' \
-d '{
"id": "smith@example.com",
"name": "Agent Smith",
"role": "viceowner",
"groups": [
{
"id": 5,
"priority": "first"
},
{
"id": 2,
"priority": "last"
},
{
"id": 1,
"priority": "normal"
}
],
"work_scheduler": {
"monday": {
"start": "08:30",
"end": "12:30"
},
"friday": {
"start": "07:30",
"end": "21:30"
}
},
"notifications": [
"new_visitor",
"new_goal",
"visitor_is_typing"
],
"email_subscriptions": [
"weekly_summary"
]
}'
Delete Agent
Deletes an Agent specified by id
.
Specifics
Method URL | https://api.livechatinc.com/v3.5/configuration/action/delete_agent |
Required scopes | agents--my:rw accounts--my:rw agents--all:rw * accounts--all:rw * |
* to delete other agents within the same license
Request
Parameter | Required | Data type | Notes |
---|---|---|---|
id | Yes | string | Agent ID |
Response
No response payload (200 OK
).
REQUEST
curl -X POST \
https://api.livechatinc.com/v3.5/configuration/action/delete_agent \
-H 'Authorization: Bearer <your_access_token>' \
-H 'Content-Type: application/json' \
-d '{
"id": "smith@example.com"
}'
Suspend Agent
Suspends an Agent specified by id
.
❗️ This method is not yet available for public use. For now, an agent can only be approved via the LiveChat Agent application UI. If you want to use this method in your integration, send us an email at developers@livechat.com and describe your use case.
Specifics
Method URL | https://api.livechatinc.com/v3.5/configuration/action/suspend_agent |
Required scopes | agents--all:rw sessions--all:rw 1 |
1) sessions--all:rw
is a private scope; it's not possible to configure it in Developer Console.
Request
Parameter | Required | Data type | Notes |
---|---|---|---|
id | Yes | string | Agent ID |
Response
No response payload (200 OK
).
REQUEST
curl -X POST \
https://api.livechatinc.com/v3.5/configuration/action/suspend_agent \
-H 'Authorization: Bearer <your_access_token>' \
-H 'Content-Type: application/json' \
-d '{
"id": "smith@example.com"
}'
Unsuspend Agent
Unsuspends an Agent specified by id
.
❗️ This method is not yet available for public use. For now, an agent can only be approved via the LiveChat Agent application UI. If you want to use this method in your integration, send us an email at developers@livechat.com and describe your use case.
Specifics
Method URL | https://api.livechatinc.com/v3.5/configuration/action/unsuspend_agent |
Required scopes | agents--all:rw accounts--all:rw subscription.lc:rw 1 |
1) subscription.lc:rw
is a private scope; it's not possible to configure it in Developer Console.
Request
Parameter | Required | Data type | Notes |
---|---|---|---|
id | Yes | string | Agent ID |
Response
No response payload (200 OK
).
REQUEST
curl -X POST \
https://api.livechatinc.com/v3.5/configuration/action/unsuspend_agent \
-H 'Authorization: Bearer <your_access_token>' \
-H 'Content-Type: application/json' \
-d '{
"id": "smith@example.com"
}'
Request Agent Unsuspension
A suspended Agent can send emails to license owners and vice owners with an unsuspension request.
Specifics
Method URL | https://api.livechatinc.com/v3.5/configuration/action/request_agent_unsuspension |
Required scopes | - |
Request
Empty request payload.
Response
No response payload (200 OK
).
REQUEST
curl -X POST \
https://api.livechatinc.com/v3.5/configuration/action/request_agent_unsuspension \
-H 'Authorization: Bearer <your_access_token>' \
-H 'Content-Type: application/json' \
-d '{}'
Approve Agent
Approves an Agent thus allowing the Agent to use the application.
❗️ This method is not yet available for public use. For now, an agent can only be approved via the LiveChat Agent application UI. If you want to use this method in your integration, send us an email at developers@livechat.com and describe your use case.
Specifics
Method URL | https://api.livechatinc.com/v3.5/configuration/action/approve_agent |
Required scopes | agents--all:rw accounts--all:rw subscription.lc:rw * |
* subscription.lc:rw
is a private scope; it's not possible to configure it in Developer Console.
Request
Parameter | Required | Data type | Notes |
---|---|---|---|
id | Yes | string | Agent ID |
Response
No response payload (200 OK
).
REQUEST
curl -X POST \
https://api.livechatinc.com/v3.5/configuration/action/approve_agent \
-H 'Authorization: Bearer <your_access_token>' \
-H 'Content-Type: application/json' \
-d '{
"id": "smith@example.com"
}'
Auto access
Auto access allows you to assign groups to a thread that will be created when a customer starts a chat. Those groups are assigned based on the conditions defined to match the customer's geolocation and the page URL the customer is currently visiting. Every time a customer calls Login or Update Customer Page, our backend checks if the page URL and geolocation match the pre-defined conditions. Given there's a match, the groups are assigned to a thread, but not until a chat starts and the thread is actually created.
If a customer starts a chat via Start Chat or
Activate Chat with the chat.access
parameter,
chat.access
overrides the auto access assigned to the thread.
Auto access rules are ordered using a linked list. Each of them points to the next element by keeping its id
in the next_id
field.
For the last element of the list, the next_id
is empty.
Methods
Add Auto Access
Creates an auto access
data structure, which is a set of conditions for the tracking URL and geolocation of a customer.
Specifics
Method URL | https://api.livechatinc.com/v3.5/configuration/action/add_auto_access |
Required scopes | access_rules:rw |
Parameter | Required | Data type | Notes |
---|---|---|---|
access | Yes | object | Destination access |
access.groups | Yes | []int | Destination groups |
conditions 1 | Yes | object | Conditions to check |
conditions.url | No | object | The condition that matches on customer_page.url from Login or url from Update Customer Page |
conditions.domain | No | object | The condition that matches on the domain of the customer_url |
conditions.{url,domain}.values | No | []match_object 2 | Positive match, may not be used together with exclude_values |
conditions.{url,domain}.exclude_values | No | []match_object | Negative match |
conditions.geolocation | No | object | The condition that matches on the customer's geolocation |
conditions.geolocation.values | Yes | []geolocation_object 3 | An array of objects; matches when at least one subcondition matches. |
description | No | string | Description of the auto access |
next_id | No | string | ID of an existing auto access. Leave empty if the new auto access should be the last one on the list. |
1) conditions
must have at least one of url
, domain
, geolocation
set.
2) <match_object>
structure:
Parameter | Required | Data type | Notes |
---|---|---|---|
value | Yes | string | A value to match |
exact_match | No | bool | If set to false , a match_object.value will be matched as a substring of the customer URL or domain. |
3) the geolocation_object
structure. The condition is fulfilled only when all of the specified fields match. At least one field must be specified.
Parameter | Required | Data type | Example |
---|---|---|---|
country | No | string | "United States" |
country_code | No | string | "US" |
region | No | string | "California" |
city | No | string | "Mountain View" |
REQUEST
curl -X POST \
https://api.livechatinc.com/v3.5/configuration/action/add_auto_access \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <your_access_token>' \
-d '{
"description": "Chats on livechat.com from United States",
"access": {
"groups": [ 1 ]
},
"conditions": {
"domain": {
"values": [
{
"value": "livechat.com",
"exact_match": true
}
]
},
"geolocation": {
"values": [
{
"country": "United States",
"country_code": "US"
}
]
}
},
"next_id": "1faad6f5f1d6e8fdf27e8af9839783b7"
}'
{
"id": "pqi8oasdjahuakndw9nsad9na"
}
List Auto Accesses
Returns all existing auto access
data structures.
Specifics
Method URL | https://api.livechatinc.com/v3.5/configuration/action/list_auto_accesses |
Required scopes | access_rules:ro |
REQUEST
curl -X POST \
https://api.livechatinc.com/v3.5/configuration/action/list_auto_accesses \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <your_access_token>' \
-d '{}'
[
{
"id": "1faad6f5f1d6e8fdf27e8af9839783b7",
"description": "Chats on livechat.com from United States",
"access": {
"groups": [
0
]
},
"conditions": {
"geolocation": {
"values": [
{
"country": "United States",
"country_code": "US"
}
]
},
"domain": {
"values": [
{
"value": "livechat.com",
"exact_match": true
}
]
}
},
"next_id": "pqi8oasdjahuakndw9nsad9na"
}
]
Delete Auto Access
Deletes an existing auto access
data structure specified by its ID.
Specifics
Method URL | https://api.livechatinc.com/v3.5/configuration/action/delete_auto_access |
Required scopes | access_rules:rw |
Parameter | Required | Data type | Notes |
---|---|---|---|
id | Yes | string | Auto access ID |
Response
No response payload (200 OK
).
REQUEST
curl -X POST \
https://api.livechatinc.com/v3.5/configuration/action/delete_auto_access \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <your_access_token>' \
-d '{
"id": "pqi8oasdjahuakndw9nsad9na"
}'
Update Auto Access
Updates an existing auto access
. Only specified fields are updated (overwritten), leaving unspecified fields unchanged.
Specifics
Method URL | https://api.livechatinc.com/v3.5/configuration/action/update_auto_access |
Required scopes | access_rules:rw |
Parameter | Required | Data type | Notes |
---|---|---|---|
id | Yes | string | ID of the auto access to modify |
access | No | object | Destination access |
access.groups | Yes | []int | Destination groups |
conditions 1 | No | object | Conditions to check |
conditions.url | No | object | The condition that matches on customer_page.url from Login or url from Update Customer Page |
conditions.domain | No | object | The condition that matches on the domain of the customer_url |
conditions.{url,domain}.values | No | []match_object 2 | Positive match, may not be used together with exclude_values |
conditions.{url,domain}.exclude_values | No | []match_object | Negative match |
conditions.geolocation | No | object | The condition that matches on the customer's geolocation |
conditions.geolocation.values | Yes | []geolocation_object 3 | An array of objects; matches when at least one subcondition matches. |
description | No | string | Description of the auto access |
next_id 4 | No | string | ID of an existing auto access. If next_id is an empty string, auto_access moves to the end of the list. |
1) conditions
must have at least one of url
, domain
, geolocation
set.
2) <match_object>
structure:
Parameter | Required | Data type | Notes |
---|---|---|---|
value | Yes | string | A value to match |
exact_match | No | bool | If set to false , a match_object.value will be matched as a substring of the customer URL or domain; default: false. |
3) the geolocation_object
structure. The condition is fulfilled only when all of the specified fields match. At least one field must be specified.
Parameter | Required | Data type | Example |
---|---|---|---|
country | No | string | "United States" |
country_code | No | string | "US" |
region | No | string | "California" |
city | No | string | "Mountain View" |
4) Modifying next_id
moves the auto access specified by id
before the auto access that is specified by next_id
.
If next_id
is an empty string, then auto access will be placed at the end of the list. If you don't intend to reorder the rule at all, don't include next_id
in the request. To better understand it, analyze the example below.
💡 Example:
In the following list: A -> B -> C -> D -> null, letters represent the auto_access
data structures while arrows indicate the next_id
relation. Therefore, A has next_id
set to B, B has next_id
set to C, and so on.
An update_auto_access
call with the {"id": "C", "next_id": "B"}
payload would result in reordering the sequence, which after the successful request, would look like this: A -> C -> B -> D -> null. Consistency is maintained by keeping the next_id
references properly assigned in each of the elements after a single request.
Response
No response payload (200 OK
).
REQUEST
curl -X POST \
https://api.livechatinc.com/v3.5/configuration/action/update_auto_access \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <your_access_token>' \
-d '{
"id": "pqi8oasdjahuakndw9nsad9na",
"access": {
"groups": [0, 42]
},
"next_id": "1faad6f5f1d6e8fdf27e8af9839783b7"
}'
Bots
Bot enables writing integrations using the Agent Chat API - both RTM and Web - to communicate in chats as regular Agents.
A Bot shares the SSO access token with the Agent who created the Bot. Each Bot is a resource owned by an application in Developers Platform, identified by its own client_id
.
Unlike Agents, Bot don't have passwords or emails - you cannot log in as a Bot.
Methods
HTTP method | The Bots API endpoint |
---|---|
POST | https://api.livechatinc.com/v3.5/configuration/action/<action> |
Required header | Value | |
---|---|---|
Content-Type | application/json |
Create Bot
Creates a new bot. To make the bot available for receiving chats or webhooks, use the Set Routing Status method.
Specifics
Method URL | https://api.livechatinc.com/v3.5/configuration/action/create_bot |
Required scopes | agents-bot--my:rw |
Request
Parameter | Required | Data type | Notes |
---|---|---|---|
name | Yes | string | Display name |
avatar | No | string | Avatar URL |
max_chats_count | No | int | Max. number of incoming chats that can be routed to the Bot; default: 6. Limited to 500. |
default_group_priority **** | No | string | The default routing priority for a group without defined priority. |
job_title | No | string | Bot's job title |
groups | No | object[] | Groups the Bot belongs to. |
groups[].id | No | int | Group ID; required only when group 's included. |
groups[].priority * | Yes | string | Bot's priority in a group; required only when group 's included. |
work_scheduler | No | object | Work scheduler options to set for the new Bot. |
work_scheduler.**.<work_scheduler> | No | object | <work_scheduler> values ***. |
timezone | Yes | string | The time zone in which the Bot's work scheduler should operate. Required only if work_scheduler is provided. |
owner_client_id ***** | Yes | string | Required only when authorizing via PATs. When you provide this param while authorizing with a Bearer Token, the client_id associated with the Bearer Token will be ignored, and provided owner_client_id will be used instead. |
* Possible values for the groups[].priority
parameter:
Possible value | Notes |
---|---|
first | The highest chat routing priority. Bots with the first priority get chats before others from the same group, e.g. Bots can get chats before regular Agents. Corresponds to the Bot priority option in the LiveChat App. |
normal | The medium chat routing priority. Bots with the normal priority get chats before agents with the last priority, when there are no Agents with the first priority available with free slots in the group. Corresponds to the Primary priority option in the LiveChat App. |
last | The lowest chat routing priority. Bots with the last priority get chats when there are no Agents with the first or normal priority available with free slots in the group. Corresponds to the Secondary priority option in the LiveChat App. |
supervisor | Bots with the supervisor priority will not get any chats assigned automatically. |
** Possible values for the work_scheduler
object keys:
sunday
monday
tuesday
wednesday
thursday
friday
saturday
*** <work_scheduler>
contains the following fields:
start
(string
) - the time when the Bot starts accepting chats, in the format:HH:MM
end
(string
) - the time when the Bot finishes accepting chats, in the format:HH:MM
**** The table below presents the possible values for the default_group_priority
parameter:
Possible value | Notes |
---|---|
first | The highest chat routing priority. Bots with the first priority get chats before others from the same group, e.g. Bots can get chats before regular Agents. Corresponds to the Bot priority option in the LiveChat App. |
normal | The medium chat routing priority. Bots with the normal priority get chats before agents with the last priority, when there are no Agents with the first priority available with free slots in the group. Corresponds to the Primary priority option in the LiveChat App. |
last | The lowest chat routing priority. Bots with the last priority get chats when there are no Agents with the first or normal priority available with free slots in the group. Corresponds to the Secondary priority option in the LiveChat App. |
supervisor | Bots with the supervisor priority will not get any chats assigned automatically. |
***** The number of sent webhooks depends on the number of webhooks registered for an owner_client_id
, not the number of bots belonging to that owner_client_id
.
REQUEST
curl -X POST \
https://api.livechatinc.com/v3.5/configuration/action/create_bot \
-H 'Authorization: Bearer <your_access_token>' \
-H 'Content-Type: application/json' \
-d '{
"name": "Bot Name"
}'
{
"id": "5c9871d5372c824cbf22d860a707a578"
}
Delete Bot
Deletes a bot specified by id
.
Specifics
Method URL | https://api.livechatinc.com/v3.5/configuration/action/delete_bot |
Required scopes | agents-bot--my:rw agents-bot--all:rw |
Request
Parameter | Required | Type | Notes |
---|---|---|---|
id | Yes | string | Bot ID |
Response
No response payload (200 OK
).
REQUEST
curl -X POST \
https://api.livechatinc.com/v3.5/configuration/action/delete_bot \
-H 'Authorization: Bearer <your_access_token>' \
-H 'Content-Type: application/json' \
-d '{
"id": "505591fc9fc2d6e92798bed7d9d8f079"
}'
Update Bot
Updates an existing Bot.
Specifics
Method URL | https://api.livechatinc.com/v3.5/configuration/action/update_bot |
Required scopes | agents-bot--my:rw agents-bot--all:rw (to update other Bots within the same license) |
Request
Parameter | Required | Data type | Notes |
---|---|---|---|
id | Yes | string | Bot ID |
name | No | string | Display name |
avatar | No | string | Avatar URL |
max_chats_count | No | int | Maximum incoming chats that can be routed to the Bot. Limited to 500. |
groups | No | object[] | Groups the Bot belongs to |
groups[].id | Yes | uint | Group ID, required only when groups 's present. |
groups[].priority * | Yes | string | Bot's priority in the group; required only when groups is included. |
default_group_priority ** | No | string | The default routing priority for a group without defined priority. |
work_scheduler | No | object | Work scheduler options to set for the new Bot. |
work_scheduler.***.<work_scheduler> | No | object | <work_scheduler> values ****. |
timezone | No | string | The time zone in which the Bot's work scheduler should operate. Required if work_scheduler is provided. |
* The table below presents the possible values for the groups[].priority
parameter:
Possible value | Notes |
---|---|
first | The highest chat routing priority. Bots with the first priority get chats before others from the same group, e.g. Bots can get chats before regular Agents. Corresponds to the Bot priority option in the LiveChat App. |
normal | The medium chat routing priority. Bots with the normal priority get chats before agents with the last priority, when there are no Agents with the first priority available with free slots in the group. Corresponds to the Primary priority option in the LiveChat App. |
last | The lowest chat routing priority. Bots with the last priority get chats when there are no Agents with the first or normal priority available with free slots in the group. Corresponds to the Secondary priority option in the LiveChat App. |
supervisor | Bots with the supervisor priority will not get any chats assigned automatically. |
** The table below presents the possible values for the default_group_priority
parameter:
Possible value | Notes |
---|---|
first | The highest chat routing priority. Bots with the first priority get chats before others from the same group, e.g. Bots can get chats before regular Agents. Corresponds to the Bot priority option in the LiveChat App. |
normal | The medium chat routing priority. Bots with the normal priority get chats before agents with the last priority, when there are no Agents with the first priority available with free slots in the group. Corresponds to the Primary priority option in the LiveChat App. |
last | The lowest chat routing priority. Bots with the last priority get chats when there are no Agents with the first or normal priority available with free slots in the group. Corresponds to the Secondary priority option in the LiveChat App. |
supervisor | Bots with the supervisor priority will not get any chats assigned automatically. |
*** Possible values for the work_scheduler
object keys:
sunday
monday
tuesday
wednesday
thursday
friday
saturday
**** <work_scheduler>
contains the following fields:
start
(string
) - the time when the Bot starts accepting chats, in the format:HH:MM
end
(string
) - the time when the Bot finishes accepting chats, in the format:HH:MM
Response
No response payload (200 OK
).
REQUEST
curl -X POST \
https://api.livechatinc.com/v3.5/configuration/action/update_bot \
-H 'Authorization: Bearer <your_access_token>' \
-H 'Content-Type: application/json' \
-d '{
"id": "ce54714e3d2b53adbfff09dbdbdd56e9",
"name": "New Bot Name"
}'
List Bots
Returns the list of Bots created within a license. The method behavior differs depending on who created the Bot and what authorization method is used for the call.
Specifics
Method URL | https://api.livechatinc.com/v3.5/configuration/action/list_bots |
Required scopes | agents-bot--my:ro agents-bot--all:ro |
Request
Parameter | Required | Type | Notes |
---|---|---|---|
all | No | bool | true - gets all Bots within a license. false (default)* - returns only the requester's Bots. |
fields ** | No | string[] | Additional Bot fields to include |
* Calling List Bots with all:false
- If a Bot was created via an app, all Agents who make the request via this app will get the Bot in the response.
- If a Bot was created directly by an Agent (PAT authorization), all Agents who authorize with PATs will get the Bot in the response.
** Possible values for the fields[]
parameter:
Possible value | Notes |
---|---|
groups | Groups a Bot belongs to |
work_scheduler | Work scheduler object for a Bot |
job_title | Bot's job title |
max_chats_count | Bot's maximum number of concurrent chats |
timezone | The time zone in which the Bot's work scheduler operates |
REQUEST
curl -X POST \
https://api.livechatinc.com/v3.5/configuration/action/list_bots \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <your_access_token>' \
-d '{
"all": false
}'
[
{
"id": "2c1b8da190222160e8f9e077af4c625b",
"name": "Bot Name",
"avatar_path": "example.com/avatar.jpg"
}
]
Get Bot
It returns the info about a bot with a given id
.
Specifics
Method URL | https://api.livechatinc.com/v3.5/configuration/action/get_bot |
Required scopes | agents-bot--my:ro agents-bot--all:ro |
Request
Parameter | Required | Type | Notes |
---|---|---|---|
id | Yes | string | Bot ID |
fields * | string[] | No | Additional fields to include. |
* Possible values for the fields[]
parameter:
Possible value | Notes |
---|---|
work_scheduler | Work scheduler object for a Bot |
groups | Groups a Bot belongs to |
job_title | Bot's job title |
max_chats_count | Bot's maximum number of concurrent chats |
timezone | The time zone in which the Bot's work scheduler operates |
REQUEST
curl -X POST \
https://api.livechatinc.com/v3.5/configuration/action/get_bot \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <your_access_token>' \
-d '{
"id": "5c9871d5372c824cbf22d860a707a578"
}'
{
"id": "5c9871d5372c824cbf22d860a707a578",
"name": "John Doe",
"avatar_path": "https://example.com/avatar.jpg",
"default_group_priority": "first",
"owner_client_id": "asXdesldiAJSq9padj",
"max_chats_count": 6,
"groups": [
{
"id": 0,
"priority": "normal"
},
{
"id": 1,
"priority": "normal"
},
{
"id": 2,
"priority": "first"
}
]
}
Groups
Groups let you organize your work by creating teams with Agent and Bot members. You can use groups to do configuration based on shared settings (language, working hours, department) and to separate chat routing. It's worth mentioning that one Agent can belong to multiple groups at the same time. It's possible to configure routing priorities for Agents and Bots specifically per group.
Methods
HTTP method | The Groups API endpoint |
---|---|
POST | https://api.livechatinc.com/v3.5/configuration/action/<action> |
Required header | Value |
---|---|
Content-Type | application/json |
Create Group
Creates a new group.
Specifics
Method URL | https://api.livechatinc.com/v3.5/configuration/action/create_group |
Required scopes | groups--all:rw |
Request
Parameter | Data type | Required | Notes |
---|---|---|---|
name | string | Yes | Group name (up to 180 chars) |
language_code | string | No | The code of the group languange |
agent_priorities * | object | Yes | Agents' priorities in a group as a map in the "<id>": "<priority>" format. At least one Agent must have the normal priority. |
* The table below presents the possible values for the agent_priorities
map:
Possible value | Notes |
---|---|
first | The highest chat routing priority. Agents with the first priority get chats before others from the same group, e.g. Bots can get chats before regular Agents. |
normal | The medium chat routing priority. Agents with the normal priority get chats before those with the last priority, when there are no Agents with the first priority available with free slots in the group. |
last | The lowest chat routing priority. Agents with the last priority get chats when there are no Agents with the first or normal priority available with free slots in the group. |
supervisor | Agents with the supervisor priority will not get any chats assigned automatically. |
REQUEST
curl -X POST \
https://api.livechatinc.com/v3.5/configuration/action/create_group \
-H 'Authorization: Bearer <your_access_token>' \
-H 'Content-Type: application/json' \
-d '{
"name": "Sports shoes",
"agent_priorities": {
"agent1@example.com": "normal",
"agent2@example.com": "normal",
"agent3@example.com": "last"
}
}'
{
"id": 19
}
Update Group
Updates an existing group.
Specifics
Method URL | https://api.livechatinc.com/v3.5/configuration/action/update_group |
Required scopes | groups--my:rw groups--all:rw (to update groups the requester is not a member of) |
Request
Parameter | Data type | Required | Notes |
---|---|---|---|
id | int | Yes | Group ID |
name | string | No | Group name (up to 180 chars) |
language_code | string | No | The code of the group languange |
agent_priorities * | object | No | Agents' priorities in a group as a map in the "<id>": "<priority>" format. |
* The table below presents the possible values for the agent_priorities
map:
Possible value | Notes |
---|---|
first | The highest chat routing priority. Agents with the first priority get chats before others from the same group, e.g. Bots can get chats before regular Agents. |
normal | The medium chat routing priority. Agents with the normal priority get chats before those with the last priority, when there are no Agents with the first priority available with free slots in the group. |
last | The lowest chat routing priority. Agents with the last priority get chats when there are no Agents with the first or normal priority available with free slots in the group. |
supervisor | Agents with the supervisor priority will not get any chats assigned automatically. |
Response
No response payload (200 OK
).
REQUEST
curl -X POST \
https://api.livechatinc.com/v3.5/configuration/action/update_group \
-H 'Authorization: Bearer <your_access_token>' \
-H 'Content-Type: application/json' \
-d '{
"id": 19,
"name": "Sport shoes",
"agent_priorities": {
"agent1@example.com": "normal",
"agent2@example.com": "normal",
"agent3@example.com": "last"
}
}'
Delete Group
Deletes an existing group.
Specifics
Method URL | https://api.livechatinc.com/v3.5/configuration/action/delete_group |
Required scopes | groups--my:rw groups--all:rw (to delete groups the requester is not a member of) |
Request
Parameter | Data type | Required | Notes |
---|---|---|---|
id | int | Yes | Group ID |
Response
No response payload (200 OK
).
REQUEST
curl -X POST \
https://api.livechatinc.com/v3.5/configuration/action/delete_group \
-H 'Authorization: Bearer <your_access_token>' \
-H 'Content-Type: application/json' \
-d '{
"id": 19
}'
List Groups
Lists all the exisiting groups.
Specifics
Method URL | https://api.livechatinc.com/v3.5/configuration/action/list_groups |
Required scopes | groups--all:ro |
Request
Parameter | Data type | Required | Notes |
---|---|---|---|
fields * | string[] | No | Additional fields to include. |
* Possible values for the fields[]
parameter:
Possible value | Notes |
---|---|
agent_priorities | An object containing Agents belonging to a group, along with their priorities. |
routing_status | The routing status of a group. |
REQUEST
curl -X POST \
https://api.livechatinc.com/v3.5/configuration/action/list_groups \
-H 'Authorization: Bearer <your_access_token>' \
-H 'Content-Type: application/json' \
-d '{}'
[
{
"id": 0,
"name": "General",
"language_code": "en",
"routing_status": "offline"
},
{
"id": 19,
"name": "Sport shoes",
"language_code": "en",
"routing_status": "offline"
}
]
Get Group
Returns details about a group specified by its id
.
Specifics
Method URL | https://api.livechatinc.com/v3.5/configuration/action/get_group |
Required scopes | groups--my:ro groups--all:ro (to get groups the requester is not a member of) |
Request
Parameter | Data type | Required | Notes |
---|---|---|---|
id | int | Yes | Group ID |
fields * | string[] | No | Additional fields to include. |
* Possible values for the fields[]
parameter:
Possible value | Notes |
---|---|
agent_priorities | An object containing Agents belonging to a group, along with their priorities. |
routing_status | The routing status of a group. |
REQUEST
curl -X POST \
https://api.livechatinc.com/v3.5/configuration/action/get_group \
-H 'Authorization: Bearer <your_access_token>' \
-H 'Content-Type: application/json' \
-d '{
"id": 19,
"fields": ["agent_priorities", "routing_status"]
}'
{
"id": 19,
"name": "Sports shoes",
"language_code": "en",
"agent_priorities": {
"agent1@example.com": "normal",
"agent2@example.com": "normal",
"agent3@example.com": "last"
},
"routing_status": "offline"
}
Properties
Properties are key-value storages. Property configuration is owned by a Client Id (integration). In this document, we call a Client Id that owns a property the owner Client Id.
Properties can be private or public.
- Private properties can be accessed only by their owner Client Id. Read more...
- Public properties can be accessed by any Client Id. Read more...
Properties are grouped in namespaces, which helps to distinguish which property belongs to a given Client Id. The property namespace is named after the Client Id a property belongs to.
You can configure the property type, location access, and domain.
The general properties format
{
"properties": {
"<namespace>": {
"<property_name>": "<property_value>",
"<property_name>": "<property_value>"
}
}
}
Property types
There are four property types:
int
(int32)bool
string
tokenized_string
The tokenized_string
type is a string split to tokens before indexing in our search engine. It can be useful for longer strings, such as messages. It should not be used for keywords.
Property locations
Properties can be set within the following locations:
- event
- thread
- chat
- group
- license
You can configure access to properties within those locations. For example, you could create a property visible only to agents in a chat and thread, but not in an event.
Property domain
The property domain is a set of values that a property can be assigned to.
Property domain can be configured in two ways:
- by defining a set of values explicitly allowed in this property (for example
[1, 2, 3]
). - by defining a range. All values within the range are allowed in this property. It works only for numeric types (for example a range from
1
to3
).
Property default value
If a property value hasn't been explicitly set, then the default value will be returned, if any.
The default value of a property can be set during property registration as the default_value
parameter.
Private properties
You can register, unregister, and configure a property for a Client Id owned by your organization. Unpublished (private) properties can be access only with a token belonging to the owner Client Id. If you want other integrations to be able to access your private property, you need to publish it.
Public properties
Once you publish a private property, it becomes accessible to other integrations. The public access to your property can be read
and/or write
. Consider an example:
You register a private chat property with the read
and write
access.
{
"name": "string_property",
"owner_client_id": "0805e283233042b37f460ed8fbf22160",
"type": "string",
"access": {
"chat": {
"agent": ["read"],
"customer": ["read", "write"]
}
}
}
While publishing the property, you can narrow down its public access to read
.
curl -X POST \
https://api.livechatinc.com/v3.5/configuration/action/publish_property \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <your_access_token>' \
-d '{
"name": "string_property",
"owner_client_id": "0805e283233042b37f460ed8fbf22160",
"access_type": ["read"]
}'
In this case, tokens belonging to the owner Client Id will be able to read and write to that property. Any other token will only be able to read it.
💡 Published properties cannot be unregistered.
Test properties
Each license has some test properties that you can use to play with properties.
Namespace | Property | Type | Access |
---|---|---|---|
test | bool_property | bool | rw for everyone everywhere |
test | int_property | int | rw for everyone everywhere |
test | string_property | string | rw for everyone everywhere |
test | tokenized_string_property | tokenized_string | rw for everyone everywhere |
The tokenized_string
property is similar to the string
type. The values of a tokenized_string
are split in tokens to enable searching for each word separately.
Predefined properties
There are also predefined public properties used mainly by the LiveChat backend integration.
Methods
HTTP method | The Properties API endpoint |
---|---|
POST | https://api.livechatinc.com/v3.5/configuration/action/<action> |
Required header | Value | |
---|---|---|
Content-Type | application/json |
Register Property
Registers a new private property for a given Client Id.
Specifics
Method URL | https://api.livechatinc.com/v3.5/configuration/action/register_property |
Required scopes | properties.configuration:rw |
Request
Parameter | Required | Data type | Notes |
---|---|---|---|
name | Yes | string | Property name |
owner_client_id | Yes | string | Client Id that will own the property; must be owned by your organization. |
type | Yes | string | Possible values: int , string , bool , and tokenized_string |
access | Yes | object | |
access.<location> | min. one location | object | Possible values: chat , thread , event , license , group |
access.<location>.<user> | min. one user | [string] | Possible <user> values: agent , customer ; possible values: read , write |
description | No | string | Property description |
domain * | No | [<type>] | Array of values that properties can be set to |
range * | No | object | Range of values that properties can be set to |
range.from | No | int | Only values equal or greater than this parameter can be set to this property |
range.to | No | int | Only values equal or lower than this parameter can be set to this property |
default_value ** | No | type | Default value of property; validated by domain or range, if one exists |
*) Only one domain
and one range
can be set for a single property.
**) Registering a property with default_value
is possible only if access.<location>
is set to license
or to group
.
Response
No response payload (200 OK
).
REQUEST
curl -X POST \
https://api.livechatinc.com/v3.5/configuration/action/register_property \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <your_access_token>' \
-d '{
"name": "string_property",
"owner_client_id": "0805e283233042b37f460ed8fbf22160",
"type": "string",
"default_value": "string_default_value",
"access": {
"chat": {
"agent": ["read"],
"customer": ["read", "write"]
}
// "thread": {},
// "event": {},
// "license": {},
// "group": {}
}
}'
Unregister Property
Unregisters a private property.
Specifics
Method URL | https://api.livechatinc.com/v3.5/configuration/action/unregister_property |
Required scopes | properties.configuration:rw |
Request
Parameter | Required | Data type | Notes |
---|---|---|---|
name | Yes | string | Property name |
owner_client_id | Yes | string | Client Id that owns the property; must be owned by your organization |
Response
No response payload (200 OK
).
REQUEST
curl -X POST \
https://api.livechatinc.com/v3.5/configuration/action/unregister_property \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <your_access_token>' \
-d '{
"name": "string_property",
"owner_client_id": "0805e283233042b37f460ed8fbf22160"
}'
Publish Property
Publishes a private property. A published property cannot be unpublished or unregistered. Published properties can be accessed by tokens belonging to any Client Id.
Specifics
Method URL | https://api.livechatinc.com/v3.5/configuration/action/publish_property |
Required scopes | properties.configuration:rw |
Request
Parameter | Required | Data type | Notes |
---|---|---|---|
name | Yes | string | Property name |
owner_client_id | Yes | string | Client Id that owns the property; must be owned by your organization. |
access_type | Yes | [string] | Possible values: read , write . It determines the access level for the Client Ids different than owner_client_id . |
Response
No response payload (200 OK
).
REQUEST
curl -X POST \
https://api.livechatinc.com/v3.5/configuration/action/publish_property \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <your_access_token>' \
-d '{
"name": "string_property",
"owner_client_id": "0805e283233042b37f460ed8fbf22160",
"access_type": ["read"]
}'
List Properties
Lists private and public properties owned by a given Client Id.
Specifics
Method URL | https://api.livechatinc.com/v3.5/configuration/action/list_properties |
Required scopes | properties.configuration:rw |
Request
Parameter | Required | Data type | Notes |
---|---|---|---|
owner_client_id | Yes | string | Client Id that owns the properties; must be owned by your organization. |
REQUEST
curl -X POST \
https://api.livechatinc.com/v3.5/configuration/action/list_properties \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <your_access_token>' \
-d '{
"owner_client_id": "0805e283233042b37f460ed8fbf22160"
}'
{
"string_property": {
"type": "string",
"description": "",
"access": {
"thread": {
"agent": [
"read",
"write"
],
"customer": [
"read"
]
},
"chat": {
"agent": [
"write"
],
"customer": [
"read",
"write"
]
}
},
"public_access": [
"read"
]
}
}
Update License Properties
Updates a property value within a license. This operation doesn't overwrite the existing values.
Specifics
Method URL | https://api.livechatinc.com/v3.5/configuration/action/update_license_properties |
Required scopes | properties.license.value--my:rw *, properties.license.value--all:rw ** |
*) If the requester's Client ID matches the namespace, setting license properties requires properties.license.value--my:rw
.
**) If the requester's Client ID doesn't match the namespace, setting license properties requires properties.license.value--all:rw
. The scope allows to
set all properties from your namespace and public properties from core
and other namespaces.
Request
Parameter | Required | Data type | Notes |
---|---|---|---|
properties | Yes | object | An object with namespaces as keys and properties (grouped in objects) as values. |
Response
No response payload (200 OK
).
REQUEST
curl -X POST \
https://api.livechatinc.com/v3.5/configuration/action/update_license_properties \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <your_access_token>' \
-d '{
"properties": {
"0805e283233042b37f460ed8fbf22160": {
"string_property": "string value"
}
}
}'
{}
List License Properties
Returns the properties set within a license. For properties without an explicit value assignment, the method will return the default values (if they exist).
Specifics
Method URL | https://api.livechatinc.com/v3.5/configuration/action/list_license_properties |
Required scopes | properties.license.value--all:rw * |
*) The method doesn’t require any scopes if the requester’s client ID matches the namespace. If it doesn't, retrieving license properties requires properties.license.value--all:rw
. The scope allows to
access all properties from your namespace and public properties from core
and other namespaces.
Request
Parameter | Required | Data type | Notes |
---|---|---|---|
namespace | No | string | Properties namespace |
name_prefix | No | string | Properties name prefix |
REQUEST
curl -X POST \
https://api.livechatinc.com/v3.5/configuration/action/list_license_properties \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <your_access_token>' \
-d '{
"namespace": "0805e283233042b37f460ed8fbf22160",
"name_prefix": "string"
}'
{
"0805e283233042b37f460ed8fbf22160": {
"string_property": "string value"
}
}
Delete License Properties
Deletes the properties set within a license.
Specifics
Method URL | https://api.livechatinc.com/v3.5/configuration/action/delete_license_properties |
Required scopes | properties.license.value--my:rw *, properties.license.value--all:rw ** |
*) If the requester's Client ID matches the namespace, deleting license properties requires properties.license.value--my:rw
.
**) If the requester's Client ID doesn't match the namespace, deleting license properties requires properties.license.value--all:rw
. The scope allows to
delete all properties from your namespace and public properties from core
and other namespaces.
Request
Parameter | Required | Data type | Notes |
---|---|---|---|
properties | Yes | object | An object with namespaces as keys and property_names (in an array) as values. |
Response
No response payload (200 OK
).
REQUEST
curl -X POST \
https://api.livechatinc.com/v3.5/configuration/action/delete_license_properties \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <your_access_token>' \
-d '{
"properties": {
"0805e283233042b37f460ed8fbf22160": ["string_property"]
}
}'
Update Group Properties
Updates a property value within a group as the property location. This operation doesn't overwrite the existing values.
Specifics
Method URL | https://api.livechatinc.com/v3.5/configuration/action/update_group_properties |
Required scopes | properties.group.value--my:rw *, properties.group.value--all:rw ** |
*) If the requester's Client ID matches the namespace, setting group properties requires properties.group.value--my:rw
.
**) If the requester's Client ID doesn't match the namespace, setting group properties requires properties.group.value--all:rw
. The scope allows to
set all properties from your namespace and public properties from other namespaces.
Request
Parameter | Required | Data type | Notes |
---|---|---|---|
group_id | Yes | number | ID of the group you set the properties for. |
properties | Yes | object | An object with namespaces as keys and properties (grouped in objects) as values. |
Response
No response payload (200 OK
).
REQUEST
curl -X POST \
https://api.livechatinc.com/v3.5/configuration/action/update_group_properties \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <your_access_token>' \
-d '{
"group_id": 1,
"properties": {
"0805e283233042b37f460ed8fbf22160": {
"string_property": "group property value"
}
}
}'
{}
List Group Properties
Returns the properties set within a group. For properties without an explicit value assignment, the method will return the default values (if they exist).
Specifics
Method URL | https://api.livechatinc.com/v3.5/configuration/action/list_group_properties |
Required scopes | properties.group.value--all:rw * |
*) If the requester's Client ID doesn't match the namespace, retrieving group properties requires properties.license.value--all:rw
. The scope allows to
access all properties from your namespace and public properties from other namespaces.
Request
Parameter | Required | Data type | Notes |
---|---|---|---|
id | Yes | number | ID of the group you retrieve properties from. |
namespace | No | string | Properties namespace |
name_prefix | No | string | Properties name prefix |
REQUEST
curl -X POST \
https://api.livechatinc.com/v3.5/configuration/action/list_group_properties \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <your_access_token>' \
-d '{
"id": 1,
"namespace": "0805e283233042b37f460ed8fbf22160",
"name_prefix": "string"
}'
{
"0805e283233042b37f460ed8fbf22160": {
"string_property": "group property value"
}
}
Delete Group Properties
Deletes the properties set within a group.
Specifics
Method URL | https://api.livechatinc.com/v3.5/configuration/action/delete_group_properties |
Required scopes | properties.group.value--my:rw *, properties.group.value--all:rw ** |
*) If the requester's Client ID matches the namespace, deleting group properties requires properties.group.value--my:rw
.
**) If the requester's Client ID doesn't match the namespace, deleting group properties requires properties.group.value--all:rw
. The scope allows to
delete all properties from your namespace and public properties from other namespaces.
Request
Parameter | Required | Data type | Notes |
---|---|---|---|
id | Yes | number | ID of the group you delete properties from. |
properties | Yes | object | An object with namespaces as keys and property_names (in an array) as values. |
Response
No response payload (200 OK
).
REQUEST
curl -X POST \
https://api.livechatinc.com/v3.5/configuration/action/delete_group_properties \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <your_access_token>' \
-d '{
"id": 1,
"properties": {
"0805e283233042b37f460ed8fbf22160": ["string_property"]
}
}'
Tags
Tags are simple text labels that can be used by agents to assign chats to pre-defined, custom categories. Tags are useful for filtering out chats in archives and reports.
To create a new tag, call the Create Tag method with a name
. Letter case is ignored when checking if a tag already exists. When creating a tag, you can also provide group_ids
to assign the tag to some groups right away. It's also possible to create a tag with empty group_ids
and update the group assignment later with Update Tag.
To remove a tag, call Delete Tag. To maintain backward compatibility with deprecated v2 endpoints, both Update Tag and Delete Tag methods respect the letter case when matching the tag. You can list all tags existing on your account with the List Tags method.
Users with the tags--all:rw
scope can create/delete/update tags in all license's groups. Users with the tags--groups:rw
scope are restricted to groups they are assigned to. Similarly tags--all:ro
and tags--groups:ro
scopes affect listing tags.
Tag can be used to mark a chat's thread only if the thread and the tag are assigned to at least one common group.
Methods
HTTP method | The Tags API endpoint |
---|---|
POST | https://api.livechatinc.com/v3.5/configuration/action/<action> |
Required header | Value | |
---|---|---|
Content-Type | application/json |
Create Tag
Creates a new tag.
Specifics
Method URL | https://api.livechatinc.com/v3.5/configuration/action/create_tag |
Required scopes | tags--all:rw tags--groups:rw |
Request
Parameter | Required | Data type | Notes |
---|---|---|---|
name | yes | string | Matching the name of an existing tag is case insensitive. |
group_ids | no | []int | Can be empty. |
Response
No response payload (200 OK
).
REQUEST
curl -X POST \
https://api.livechatinc.com/v3.5/configuration/action/create_tag \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <your_access_token>' \
-d '{
"name": "docs_feedback",
"group_ids": [
0,
42
]
}'
Delete Tag
Deletes an existing tag.
Specifics
Method URL | https://api.livechatinc.com/v3.5/configuration/action/delete_tag |
Required scopes | tags--all:rw tags--groups:rw |
Request
Parameter | Required | Data type | Notes |
---|---|---|---|
name | yes | string | Matching the name of an existing tag is case sensitive. |
Response
No response payload (200 OK
).
REQUEST
curl -X POST \
https://api.livechatinc.com/v3.5/configuration/action/delete_tag \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <your_access_token>' \
-d '{
"name": "docs_feedback"
}'
List Tags
Lists the exisiting tags.
Specifics
Method URL | https://api.livechatinc.com/v3.5/configuration/action/list_tags |
Required scopes | tags--all:ro tags--groups:ro |
Request
Parameter | Required | Data type | Notes |
---|---|---|---|
filters | No | object | Possible request filters. |
filters.group_ids | Yes | int[] | IDs of the groups from which you want to list tags. |
REQUEST
curl -X POST \
https://api.livechatinc.com/v3.5/configuration/action/list_tags \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <your_access_token>' \
-d '{
"filters": {
"group_ids": [
0,
42
]
}
}'
[
{
"name": "docs_feedback",
"group_ids": [
0,
42
],
"author_id": "smith@example.com",
"created_at": "2019-12-09T12:01:18.909000Z"
},
{
"name": "positive feedback",
"group_ids": [
0
],
"author_id": "",
"created_at": "2017-11-13T15:37:36.000000+01:00"
},
{
"name": "support",
"group_ids": [
0
],
"author_id": "",
"created_at": "2017-11-13T15:37:36.000000+01:00"
},
{
"name": "complaint",
"group_ids": [
0
],
"author_id": "",
"created_at": "2017-11-13T15:37:36.000000+01:00"
},
{
"name": "sales",
"group_ids": [
0
],
"author_id": "",
"created_at": "2017-11-13T15:37:36.000000+01:00"
},
{
"name": "spam",
"group_ids": [
0
],
"author_id": "",
"created_at": "2017-11-13T15:37:36.000000+01:00"
}
]
Update Tag
Updates an existing tag.
Specifics
Method URL | https://api.livechatinc.com/v3.5/configuration/action/update_tag |
Required scopes | tags--all:rw tags--groups:rw |
Request
Parameter | Required | Data type | Notes |
---|---|---|---|
name | yes | string | Matching the name of an existing tag is case sensitive. |
group_ids | no | []int | Can be empty. |
Response
No response payload (200 OK
).
REQUEST
curl -X POST \
https://api.livechatinc.com/v3.5/configuration/action/update_tag \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <your_access_token>' \
-d '{
"name": "docs_feedback",
"group_ids": [
0,
42
]
}'
Webhooks
Here's what you need to know about webhooks:
- Webhooks notify you when specific events are triggered.
- They can be generated by both Web and RTM API actions.
- Webhooks and pushes have similar payloads.
- You register webhook definitions per Client ID (application).
- You enable webhooks for the licences that install your application.
- There's a limit of three weebhoks for every action a Client ID can register.
{
"webhook_id": "<webhook_id>",
"secret_key": "<secret_key>",
"action": "<action>",
"organization_id": "<organization_id>",
"payload": {
},
"additional_data": {
"chat_properties": { //optional
// chat properties
},
"chat_presence_user_ids": [ //optional
// User IDs
]
}
}
Methods
HTTP method | The Webhooks API endpoint |
---|---|
POST | https://api.livechatinc.com/v3.5/configuration/action/<action> |
Required header | Value | |
---|---|---|
Content-Type | application/json |
Register Webhook
Registers a webhook for the Client ID (application) provided in the request. One Client ID can register up to three webhooks for every action
. To receive license
webhooks, you need to enable them after registration.
As an alternative to calling Register Webhook, you can register webhooks via Developer Console by configuring the Chat Webhooks building block. This way you won't have to support enabling webhooks as LiveChat will do that under the hood when someone installs your app. Learn more...
For bot
webhooks, you need to create a bot, register webhooks, and then, call Set Routing Status.
Specifics
Method URL | https://api.livechatinc.com/v3.5/configuration/action/register_webhook |
Required token scopes 1 | webhooks.configuration:rw |
1) Token scopes are assigned to an access token, not to an application (Client ID). For this method, we recommend authorizing with a Personal Access Token (PAT). Make sure your PAT has the webhooks.configuration:rw
scope.
Parameter | Required | Data type | Notes |
---|---|---|---|
action 2 | yes | string | The action that triggers sending a webhook. |
secret_key | yes | string | The secret key sent in webhooks to verify the source of a webhook. |
url | yes | string | Destination URL for the webhook |
additional_data | no | []string | Additional data arriving with the webhook. Value: chat properties , chat_presence_user_ids (all actions except for agent_status_changed , agent_deleted , incoming_customer ) |
description | no | string | Webhook description |
filters | no | object | Filters to check if a webhook should be triggered. |
filters.author_type | no | string | Possible values: customer , agent ; allowed only for the incoming_event and event_updated actions. |
filters.only_my_chats | no | bool | true or false ; triggers webhooks only for chats with the property source.client_id set to my client_id . |
filters.chat_presence | no | object | Filters to check if a webhook should be triggered based on user's presence in the chat. |
filters.chat_presence.user_ids | no | object | Only one filter (values or exclude_values ) is allowed. Supports every user type (Agent, Customer, Bot). |
filters.chat_presence.user_ids.values | no | []string | Array of Users' ids; if any specified User is in the chat, the webhook will be triggered. |
filters.chat_presence.user_ids.exclude_values | no | []string | Array of Users' ids; if any specified Users is in the chat, the webhook will not be triggered. |
filters.chat_presence.my_bots | no | bool | If any bot owned by owner_client_id is in the chat, the webhook will be triggered. |
filters.source_type | no | []string | Array of source types. Possible values: my_client (client ID of your app), other_clients (client IDs other than your app's), system (no client ID); if the source which triggered the webhook matches the filter, the webhook will be sent. |
owner_client_id | yes | string | The Client ID for which the webhook will be registered. What is Client ID and where to find it? |
type | yes | string | bot or license |
Triggering actions
2) The table below presents the possible values for the action
parameter.
Possible action | Available filters |
---|---|
incoming_chat | chat_presence , only_my_chats , source_type |
chat_deactivated | chat_presence , only_my_chats , source_type |
chat_access_updated | chat_presence , only_my_chats , source_type |
chat_transferred | chat_presence , only_my_chats , source_type |
user_added_to_chat | chat_presence , only_my_chats , source_type |
user_removed_from_chat | chat_presence , only_my_chats , source_type |
incoming_event | chat_presence , author_type , only_my_chats , source_type |
event_updated | chat_presence , author_type , only_my_chats , source_type |
incoming_rich_message_postback | chat_presence , only_my_chats , source_type |
chat_properties_updated | chat_presence , only_my_chats , source_type |
chat_properties_deleted | chat_presence , only_my_chats , source_type |
thread_properties_updated | chat_presence , only_my_chats , source_type |
thread_properties_deleted | chat_presence , only_my_chats , source_type |
event_properties_updated | chat_presence , only_my_chats , source_type |
event_properties_deleted | chat_presence , only_my_chats , source_type |
thread_tagged | chat_presence , only_my_chats , source_type |
thread_untagged | chat_presence , only_my_chats , source_type |
routing_status_set | agent_ids , source_type |
incoming_customer | source_type |
customer_session_fields_updated | chat_presence , source_type |
events_marked_as_seen | chat_presence , only_my_chats , source_type |
group_created | source_type |
group_updated | source_type |
group_deleted | source_type |
agent_created | source_type |
agent_updated | source_type |
agent_deleted | source_type |
agent_suspended | source_type |
agent_unsuspended | source_type |
agent_approved | source_type |
bot_created | source_type |
bot_updated | source_type |
bot_deleted | source_type |
auto_access_created | source_type |
auto_access_updated | source_type |
auto_access_deleted | source_type |
REQUEST
curl -X POST \
https://api.livechatinc.com/v3.5/configuration/action/register_webhook \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic <your_username>:<your_PAT>' \
-d '{
"url": "http://myservice.com/webhooks",
"description": "Test webhook",
"action": "chat_deactivated",
"secret_key": "laudla991lamda0pnoaa0",
"owner_client_id": "asXdesldiAJSq9padj",
"type": "license"
}'
{
"id": "pqi8oasdjahuakndw9nsad9na"
}
List Webhooks
Lists all webhooks registered for the given Client ID.
Specifics
Method URL | https://api.livechatinc.com/v3.5/configuration/action/list_webhooks |
Required scopes | webhooks.configuration:rw |
Request
Parameter | Required | Data type | Notes |
---|---|---|---|
owner_client_id | yes | string | The webhook owner (the Client ID for which the webhook is registered). |
REQUEST
curl -X POST \
https://api.livechatinc.com/v3.5/configuration/action/list_webhooks \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <your_access_token>' \
-d '{
"owner_client_id": "0805e283233042b37f460ed8fbf22160"
}'
[
{
"id": "pqi8oasdjahuakndw9nsad9na",
"url": "http://myservice.com/webhooks",
"description": "Test webhook",
"action": "chat_deactivated",
"filters": {
"chat_presence": {
"user_ids": {
"values": [
"johndoe@mail.com"
]
},
"my_bots": true
}
},
"owner_client_id": "asXdesldiAJSq9padj",
"type": "license"
}
]
Unregister Webhook
Unregisters a webhook previously registered for a Client ID (application).
Specifics
Method URL | https://api.livechatinc.com/v3.5/configuration/action/unregister_webhook |
Required scopes | webhooks.configuration:rw |
Request
Parameter | Required | Data type | Notes |
---|---|---|---|
id | Yes | string | Webhook ID |
owner_client_id | Yes | string | The webhook owner (the Client ID for which the webhook is registered). |
Response
No response payload (200 OK
).
REQUEST
curl -X POST \
https://api.livechatinc.com/v3.5/configuration/action/unregister_webhook \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <your_access_token>' \
-d '{
"id": "pqi8oasdjahuakndw9nsad9na"
}'
List Webhook Names
Lists all webhooks that are supported in a given API version. This method requires no authorization.
Specifics
Method URL | https://api.livechatinc.com/v3.5/configuration/action/list_webhook_names |
Required scopes | - |
Request
Parameter | Required | Data type | Notes |
---|---|---|---|
version | No | string | Defaults to the current stable API version |
REQUEST
curl -X POST \
https://api.livechatinc.com/v3.5/configuration/action/list_webhook_names \
-H 'Content-Type: application/json' \
-d '{
"version": "3.5"
}'
[
{
"action": "agent_deleted",
"filters": [
"agent_ids"
]
},
{
"action": "chat_access_updated",
"filters": [
"chat_presence",
"only_my_chats"
],
"additional_data": [
"chat_properties",
"chat_presence_user_ids"
]
},
{
"action": "incoming_customer"
}
]
Enable License Webhooks
Enables the webhooks registered by a given Client Id (application). The webhooks will be installed for the license associated with the access token used in the request.
Webhooks will be automaticall enabled if you register them via Developer Console.
Specifics
Method URL | https://api.livechatinc.com/v3.5/configuration/action/enable_license_webhooks |
Required scopes | webhooks.state:rw |
Request
Parameter | Required | Data type | Notes |
---|---|---|---|
owner_client_id | Yes | string | Required only when authorizing via PATs. When you provide this param while authorizing with a Bearer Token, the client_id associated with the Bearer Token will be ignored, and provided owner_client_id will be used instead. |
Response
No response payload (200 OK
).
REQUEST
curl -X POST \
https://api.livechatinc.com/v3.5/configuration/action/enable_license_webhooks \
-H 'Authorization: Bearer <your_access_token>' \
-H 'Content-Type: application/json' \
-d '{}'
Disable License Webhooks
Disables the enabled webhooks.
Specifics
Method URL | https://api.livechatinc.com/v3.5/configuration/action/disable_license_webhooks |
Required scopes | webhooks.state:rw |
Request
Parameter | Required | Data type | Notes |
---|---|---|---|
owner_client_id | Yes | string | Required only when authorizing via PATs. When you provide this param while authorizing with a Bearer Token, the client_id associated with the Bearer Token will be ignored, and provided owner_client_id will be used instead. |
Response
No response payload (200 OK
).
REQUEST
curl -X POST \
https://api.livechatinc.com/v3.5/configuration/action/disable_license_webhooks \
-H 'Authorization: Bearer <your_access_token>' \
-H 'Content-Type: application/json' \
-d '{}'
Get License Webhooks State
Gets the state of the webhooks registered for a given Client Id (application) on the license associated with the access token used in the request.
Specifics
Method URL | https://api.livechatinc.com/v3.5/configuration/action/get_license_webhooks_state |
Required scopes | webhooks.state:ro |
Request
Parameter | Required | Data type | Notes |
---|---|---|---|
owner_client_id | Yes | string | Required only when authorizing via PATs. When you provide this param while authorizing with a Bearer Token, the client_id associated with the Bearer Token will be ignored, and provided owner_client_id will be used instead. |
REQUEST
curl -X POST \
https://api.livechatinc.com/v3.5/configuration/action/get_license_webhooks_state \
-H 'Authorization: Bearer <your_access_token>' \
-H 'Content-Type: application/json' \
-d '{}'
{
"license_webhooks_enabled": true
}
Available webhooks
To see the list of available webhooks v3.5, visit the Webhooks document.
Other
Methods
Get License ID
Returns the license ID for a given organization ID.
Specifics
HTTP Method | GET |
Method URL | https://api.livechatinc.com/v3.5/configuration/action/get_license_id |
Request
Query string | Required | Data type | Notes |
---|---|---|---|
organization_id | yes | string |
REQUEST
curl -X GET \
https://api.livechatinc.com/v3.5/configuration/action/get_license_id?organization_id=142cf3ad-5d54-4cf6-8ce1-3773d14d7f3f
{
"license_id": 104130623
}
Get Organization ID
Returns the organization ID for a given license ID.
Specifics
HTTP Method | GET |
Method URL | https://api.livechatinc.com/v3.5/configuration/action/get_organization_id |
Request
Query string | Required | Data type | Notes |
---|---|---|---|
license_id | yes | int |
REQUEST
curl -X GET \
https://api.livechatinc.com/v3.5/configuration/action/get_organization_id?license_id=104130623
{
"organization_id": "142cf3ad-5d54-4cf6-8ce1-3773d14d7f3f"
}
List Channels
Returns the summary of communication channels for your LiveChat product.
Specifics
Method URL | https://api.livechatinc.com/v3.5/configuration/action/list_channels |
Required scopes | - |
Request
Empty request payload.
Response
The response is an array of the channel objects:
Field | Data type | Notes |
---|---|---|
channel_type | string | Possible values: code , direct_link or integration |
channel_subtype | string | Possible values: An empty string for code and direct_link ; Client ID for integration |
first_activity_timestamp | string | RFC 3339 date-time format |
REQUEST
curl -X POST \
https://api.livechatinc.com/v3.5/configuration/action/list_channels \
-H 'Authorization: Bearer <your_access_token>' \
-H 'Content-Type: application/json' \
-d '{}'
[
{
"channel_type": "code",
"channel_subtype": "",
"first_activity_timestamp": "2017-10-12T13:56:16Z"
},
{
"channel_type": "direct_link",
"channel_subtype": "",
"first_activity_timestamp": "2017-10-12T15:20:00Z"
},
{
"channel_type": "integration",
"channel_subtype": "c6e4f62e2a2dab12531235b12c5a2a6b",
"first_activity_timestamp": "2019-08-16T16:55:51Z"
}
]
Check Product Limits for Plan
Resource limits in the LiveChat product are different for each plan. This method compares your organization's current resources with a given plan and returns those which exceeded the called plan's limits. Useful when considering downgrading the plan.
Specifics
HTTP Method | GET |
Method URL | https://api.livechatinc.com/v3.5/configuration/action/check_product_limits_for_plan |
Required scopes | subscription.lc:rw |
Request
Parameter | Required | Data type | Notes |
---|---|---|---|
plan | yes | string | Possible values: starter , team , enterprise , enterpriseplus |
Response
Resource Name | Notes |
---|---|
agents | The number of active agents, including bots, that exceeded the limit. |
groups | The number of groups that exceeded the limit. |
banned | The number of banned visitors that exceeded the limit. |
queue | The number of chats waiting in the queue (with Messaging Mode disabled) that exceeded the limit. |
queue_continuous | The number of chats waiting in the queue (with Messaging Mode enabled) that exceeded the limit. |
groups_per_agent | The number of groups an agent can be assigned to that exceeded the limit. |
access_rules | The number of Access Rules that exceeded the limit. |
group_chooser_groups | The number of groups available in the pre-chat survey that exceeded the limit. |
REQUEST
curl -X POST \
https://api.livechatinc.com/v3.5/configuration/action/check_product_limits_for_plan \
-H 'Authorization: Bearer <your_access_token>' \
-H 'Content-Type: application/json' \
-d '{
"plan": "starter"
}'
[
{
"resource": "groups",
"limit_balance": 1
},
{
"resource": "groups_per_agent",
"limit_balance": 2,
"id": "user@example.com"
},
{
"resource": "group_chooser_groups",
"limit_balance": 3,
"id": "0"
},
{
"resource": "queue",
"limit_balance": 4
},
{
"resource": "queue",
"limit_balance": 4,
"id": "0"
},
{
"resource": "queue_continuous",
"limit_balance": 1
},
{
"resource": "queue_continuous",
"limit_balance": 1,
"id": "0"
},
{
"resource": "access_rules",
"limit_balance": 1
}
]
Errors
{
"error": {
"type": "misdirected_request",
"message": "Wrong region",
"data": {
// optional
"region": "dal"
}
}
}
Possible errors
Error type | Default message | Description |
---|---|---|
authentication | Authentication error | An invalid or expired access token. |
authorization | Authorization error | User is not allowed to perform the action. |
already_exist | Already exist | It's impossible to create the resource as it already exists. |
group_not_found | Group not found | |
internal | Internal server error | |
license_expired | License expired | The end of license trial or subcription. |
limit_reached | Resource limit reached | Resource cannot be created/modified because the change would exceed the limit |
misdirected_request | Wrong region | Client's request should be performed to another region. The correct region is returned in the optional data object – this is where the client should be connected. |
not_found | Not found | The requested resource wasn't found. |
too_many_requests | Too many requests | The request's rate limit was exceeded. It'll be unblocked automatically after some time. |
transfer_ownership | Transfer ownership | Ownership cannot be transfered to this account (bot, suspended agent). |
unsupported_version | Unsupported version | Unsupported protocol version. |
validation | Wrong format of request |
Contact us
If you found a bug or a typo, you can let us know directly on GitHub. In case of any questions or feedback, don't hesitate to contact us at developers@livechat.com. We'll be happy to hear from you!