API version

Configuration API

11 minutes reading time

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.3. This is the latest stable version recommended for the production use. 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 OAuth2.0 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.

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.

Postman collection

You can find all the requests from the Configuration API v3.3 in Postman. In our collection, we use environment variables for the API version and the access token. Importing the collection from the link below downloads the LiveChat Web API environment as well. Remember to replace sample tokens with your own.

Run in Postman

Agents

An Agent is a type of user who communicates with Customers. The Agent data structure consists of several fields, which you can look up here. The requester can view and modify some of the fields, but others are read-only.

Methods

HTTP methodThe Agents API endpoint
POSThttps://api.livechatinc.com/v3.3/configuration/action/<action>
Required headerValue
Content-Typeapplication/json

Create Agent

Creates a new Agent with specified parameters within a license. If the requester has the billing:rw scope, then the newly created Agent will have the awaiting_approval property marked as false by default; otherwise it'll be true.

Specifics
Method URLhttps://api.livechatinc.com/v3.3/configuration/action/create_agent
Required scopesaccounts--all:rc
Request
ParameterData typeRequiredNotes
idstringYesAgent ID
namestringYesAgent name
rolestringNoAgent role, should be one of the following: viceowner, administrator, normal (default).
avatar_pathstringNoURL path of the Agent's avatar
job_titlestringNoAgent's job title
mobilestringNoAgent's mobile number
max_chats_countintNoAgent's maximum number of concurrent chats; default: 6. Limited to 100.
awaiting_approvalboolNoDetermines if the Agent will be awaiting approval after creation. Only a requester with the billing:rw scope can set this value to false.
groupsobject[]NoGroups an Agent belongs to.
groups[].iduintYesGroup ID; required only when group is included.
groups[].priority *stringYesAgent's priority in a group; required only when group is included.
notifications**string[]NoRepresents which Agent notifications are turned on.
email_subscriptions***string[]NoRepresents which subscriptions will be send to the Agent via email.
work_schedulerobjectNoWork scheduler options to set for the new Agent
work_scheduler.****.<work_scheduler>objectNo<work_scheduler> values *****

* Possible values for the groups[].priority parameter:

Possible valueNotes
firstThe 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.
normalThe 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.
lastThe 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.

** 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
Copied!
curl -X POST \
  https://api.livechatinc.com/v3.3/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"
        ]
      }'
Response
Copied!
{
	"id": "smith@example.com"
}

Get Agent

It returns the info about an Agent specified by id.

Specifics
Method URLhttps://api.livechatinc.com/v3.3/configuration/action/get_agent
Required scopesagents--my:ro agents--all:ro
Request
ParameterTypeRequiredNotes
idstringYesAgent ID
fields*string[]NoAdditional fields to include.

* Possible values for the fields[] parameter:

Possible valueNotes
work_schedulerWork scheduler object for an Agent
groupsGroups an Agent belongs to
email_subscriptionsA list of an Agent's active subscriptions
notificationsA list of an Agent's enabled notifications
job_titleAgent's job title
mobileAgent's mobile number
max_chats_countAgent's maximum number of concurrent chats
suspendedBoolean value indicating if an Agent is suspended
awaiting_approvalBoolean value indicating if an Agent is awaiting approval
REQUEST
Copied!
curl -X POST \
  https://api.livechatinc.com/v3.3/configuration/action/get_agent \
  -H 'Authorization: Bearer <your_access_token>' \
  -H 'Content-Type: application/json' \
  -d '{
        "id": "smith@example.com"
      }'
Response
Copied!
{
	"id": "smith@example.com",
	"name": "Agent Smith",
	"avatar_path": "https://domain.com/avatar.image.jpg",
	"role": "administrator",
	"login_status": "accepting chats"
}

List Agents

Returns all Agents within a license.

Specifics
Method URLhttps://api.livechatinc.com/v3.3/configuration/action/list_agents
Required scopesagents--all:ro
Request
ParameterRequiredTypeNotes
filtersNoobjectPossible request filters
filters.group_idsNoint[]IDs of the groups from which you want to list Agents. You'll only get the Agents from the specified group(s).
fields*Nostring[]Additional Agent fields to include.

* Possible values for the fields[] parameter:

Possible valueNotes
groupsGroups an Agent belongs to
work_schedulerWork scheduler object for an Agent
email_subscriptionsA list of the Agent's active email subscriptions
notificationsA list of the Agent's enabled notifications
job_titleAgent's job title
mobileAgent's mobile number
max_chats_countAgent's maximum number of concurrent chats
suspendedBoolean value indicating if an Agent is suspended
awaiting_approvalBoolean value indicating if an Agent is awaiting approval
REQUEST
Copied!
curl -X POST \
  https://api.livechatinc.com/v3.3/configuration/action/list_agents \
  -H 'Authorization: Bearer <your_access_token>' \
  -H 'Content-Type: application/json' \
  -d '{
       "fields": [
          "summaries",
          "max_chats_count",
          "job_title"
        ],
        "filters": {
          "group_ids": [
            0,
            1
          ]
        }
    }'
Response
Copied!
[
	{
		"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 URLhttps://api.livechatinc.com/v3.3/configuration/action/update_agent
Required scopesagents--my:rw agents--all:rw (to update other Agents within the same license)
Request
ParameterData typeRequiredNotes
idstringYesAgent ID
namestringNoAgent name
rolestringNoAgent role, should be one of the following: viceowner, administrator, normal
avatar_pathstringNoURL path for Agent avatar
job_titlestringNoAgent's job title
mobilestringNoAgent's mobile number
max_chats_countintNoAgent's maximum number of concurrent chats. Limited to 100.
groupsobject[]NoGroups an Agent belongs to.
groups[].iduintYesGroup ID; required only when group's included.
groups[].priority *stringYesAgent's priority in a group; required only when group's included.
notifications**string[]NoRepresents which Agent notifications are turned on.
email_subscriptions***string[]NoRepresents which subscriptions will be send to an Agent via email.
work_schedulerobjectNoWork scheduler options to set for a new Agent
work_scheduler.****.<work_scheduler>objectNo<work_scheduler> values *****

* Possible values for the groups[].priority parameter:

Possible valueNotes
firstThe 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.
normalThe 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.
lastThe 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.

** 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
Copied!
curl -X POST \
  https://api.livechatinc.com/v3.3/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 URLhttps://api.livechatinc.com/v3.3/configuration/action/delete_agent
Required scopesagents--all:rw
Request
ParameterRequiredData typeNotes
idYesstringAgent ID
Response

No response payload (200 OK).

REQUEST
Copied!
curl -X POST \
  https://api.livechatinc.com/v3.3/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.

Specifics
Method URLhttps://api.livechatinc.com/v3.3/configuration/action/suspend_agent
Required scopesagents--all:rw
Request
ParameterRequiredData typeNotes
idYesstringAgent ID
Response

No response payload (200 OK).

REQUEST
Copied!
curl -X POST \
  https://api.livechatinc.com/v3.3/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.

Specifics
Method URLhttps://api.livechatinc.com/v3.3/configuration/action/unsuspend_agent
Required scopesagents--all:rw billing:rw
Request
ParameterRequiredData typeNotes
idYesstringAgent ID
Response

No response payload (200 OK).

REQUEST
Copied!
curl -X POST \
  https://api.livechatinc.com/v3.3/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 URLhttps://api.livechatinc.com/v3.3/configuration/action/request_agent_unsuspension
Required scopes-
Request

Empty request payload.

Response

No response payload (200 OK).

REQUEST
Copied!
curl -X POST \
  https://api.livechatinc.com/v3.3/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.

Specifics
Method URLhttps://api.livechatinc.com/v3.3/configuration/action/approve_agent
Required scopesagents-all:rw subscription_manage *

* subscription_manage is a private scope; it's not possible to configure it in Developer Console.

Request
ParameterRequiredData typeNotes
idYesstringAgent ID
Response

No response payload (200 OK).

REQUEST
Copied!
curl -X POST \
  https://api.livechatinc.com/v3.3/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 URLhttps://api.livechatinc.com/v3.3/configuration/action/add_auto_access
Required scopesaccess_rules:rw
ParameterRequiredData typeNotes
accessYesobjectDestination access
access.groupsYes[]intDestination groups
conditions1YesobjectConditions to check
conditions.urlNoobjectThe condition that matches on customer_page.url from Login or url from Update Customer Page
conditions.domainNoobjectThe condition that matches on the domain of the customer_url
conditions.{url,domain}.valuesNo[]match_object2Positive match, may not be used together with exclude_values
conditions.{url,domain}.exclude_valuesNo[]match_objectNegative match
conditions.geolocationNoobjectThe condition that matches on the customer's geolocation
conditions.geolocation.valuesYes[]geolocation_object3An array of objects; matches when at least one subcondition matches.
descriptionNostringDescription of the auto access
next_idNostringID 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:

ParameterRequiredData typeNotes
valueYesstringA value to match
exact_matchNoboolIf 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.

ParameterRequiredData typeExample
countryNostring"United States"
country_codeNostring"US"
regionNostring"California"
cityNostring"Mountain View"
REQUEST
Copied!
curl -X POST \
  https://api.livechatinc.com/v3.3/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"
      }'
Response
Copied!
{
  "id": "pqi8oasdjahuakndw9nsad9na"
}

List Auto Accesses

Returns all existing auto access data structures.

Specifics
Method URLhttps://api.livechatinc.com/v3.3/configuration/action/list_auto_accesses
Required scopesaccess_rules:ro
REQUEST
Copied!
curl -X POST \
  https://api.livechatinc.com/v3.3/configuration/action/list_auto_accesses \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <your_access_token>' \
  -d '{}'
Response
Copied!
[
  {
    "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 URLhttps://api.livechatinc.com/v3.3/configuration/action/delete_auto_access
Required scopesaccess_rules:rw
ParameterRequiredData typeNotes
idYesstringAuto access ID
Response

No response payload (200 OK).

REQUEST
Copied!
curl -X POST \
  https://api.livechatinc.com/v3.3/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 URLhttps://api.livechatinc.com/v3.3/configuration/action/update_auto_access
Required scopesaccess_rules:rw
ParameterRequiredData typeNotes
idYesstringID of the auto access to modify
accessNoobjectDestination access
access.groupsYes[]intDestination groups
conditions1NoobjectConditions to check
conditions.urlNoobjectThe condition that matches on customer_page.url from Login or url from Update Customer Page
conditions.domainNoobjectThe condition that matches on the domain of the customer_url
conditions.{url,domain}.valuesNo[]match_object2Positive match, may not be used together with exclude_values
conditions.{url,domain}.exclude_valuesNo[]match_objectNegative match
conditions.geolocationNoobjectThe condition that matches on the customer's geolocation
conditions.geolocation.valuesYes[]geolocation_object3An array of objects; matches when at least one subcondition matches.
descriptionNostringDescription of the auto access
next_id4NostringID 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:

ParameterRequiredData typeNotes
valueYesstringA value to match
exact_matchNoboolIf 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.

ParameterRequiredData typeExample
countryNostring"United States"
country_codeNostring"US"
regionNostring"California"
cityNostring"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
Copied!
curl -X POST \
  https://api.livechatinc.com/v3.3/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 methodThe Bots API endpoint
POSThttps://api.livechatinc.com/v3.3/configuration/action/<action>
Required headerValue
Content-Typeapplication/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 URLhttps://api.livechatinc.com/v3.3/configuration/action/create_bot
Required scopesagents-bot--my:rw
Request
ParameterRequiredData typeNotes
nameYesstringDisplay name
avatarNostringAvatar URL
max_chats_countNointMax. number of incoming chats that can be routed to the Bot; default: 6. Limited to 500.
default_group_priority ****NostringThe default routing priority for a group without defined priority.
groupsNoobject[]Groups the Bot belongs to.
groups[].idNointGroup ID; required only when group's included.
groups[].priority *YesstringBot's priority in a group; required only when group's included.
work_schedulerNoobjectWork scheduler options to set for the new Bot.
work_scheduler.**.<work_scheduler>Noobject<work_scheduler> values ***.
timezoneYesstringThe time zone in which the Bot's work scheduler should operate. Required only if work_scheduler is provided.
owner_client_id *YesstringRequired only when authorizing via PATs. The request will be rejected if you provide owner_client_id when authorizing with a Bearer Token.

* Possible values for the groups[].priority parameter:

Possible valueNotes
firstThe 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.
normalThe 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.
lastThe 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.

** 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 valuesNotes
firstThe 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.
normalThe 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.
lastThe 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.

* 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
Copied!
curl -X POST \
  https://api.livechatinc.com/v3.3/configuration/action/create_bot \
  -H 'Authorization: Bearer <your_access_token>' \
  -H 'Content-Type: application/json' \
  -d '{
      "name": "Bot Name"
      }'
Response
Copied!
{
	"id": "5c9871d5372c824cbf22d860a707a578"
}

Delete Bot

Specifics
Method URLhttps://api.livechatinc.com/v3.3/configuration/action/delete_bot
Required scopesagents-bot--my:rw agents-bot--all:rw
Request
ParameterRequiredTypeNotes
idYesstringBot ID
Response

No response payload (200 OK).

REQUEST
Copied!
curl -X POST \
  https://api.livechatinc.com/v3.3/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 URLhttps://api.livechatinc.com/v3.3/configuration/action/update_bot
Required scopesagents-bot--my:rw agents-bot--all:rw (to update other Bots within the same license)
Request
ParameterRequiredData typeNotes
idYesstringBot ID
nameNostringDisplay name
avatarNostringAvatar URL
max_chats_countNointMaximum incoming chats that can be routed to the Bot. Limited to 500.
groupsNoobject[]Groups the Bot belongs to
groups[].idYesuintGroup ID, required only when groups's present.
groups[].priority *YesstringBot's priority in the group; required only when groups is included.
default_group_priority **NostringThe default routing priority for a group without defined priority.
work_schedulerNoobjectWork scheduler options to set for the new Bot.
work_scheduler.***.<work_scheduler>Noobject<work_scheduler> values ****.
timezoneNostringThe 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 valuesNotes:
firstThe 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.
normalThe 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.
lastThe 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.

** The table below presents the possible values for the default_group_priority parameter:

Possible valuesNotes
firstThe 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.
normalThe 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.
lastThe 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.
supervisorBot works as supervisor so it will not be assigned to any chats.

*** 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
Copied!
curl -X POST \
  https://api.livechatinc.com/v3.3/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 URLhttps://api.livechatinc.com/v3.3/configuration/action/list_bots
Required scopesagents-bot--my:ro agents-bot--all:ro
Request
ParameterRequiredTypeNotes
allNobooltrue - gets all Bots within a license.  false (default)* - returns only the requester's Bots.
fields**Nostring[]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 valueNotes
groupsGroups a Bot belongs to
work_schedulerWork scheduler object for a Bot
job_titleBot's job title
max_chats_countBot's maximum number of concurrent chats
timezoneThe time zone in which the Bot's work scheduler operates
REQUEST
Copied!
curl -X POST \
  https://api.livechatinc.com/v3.3/configuration/action/list_bots \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <your_access_token>' \
  -d '{
        "all": false
      }'
Response
Copied!
[
	{
		"id": "2c1b8da190222160e8f9e077af4c625b",
		"name": "Bot Name",
		"avatar_path": "example.com/avatar.jpg"
	}
]

Get Bot

Specifics
Method URLhttps://api.livechatinc.com/v3.3/configuration/action/get_bot
Required scopesagents-bot--my:ro agents-bot--all:ro
Request
ParameterRequiredTypeNotes
idYesstringBot ID
fields*string[]NoAdditional fields to include.

* Possible values for the fields[] parameter:

Possible valueNotes
work_schedulerWork scheduler object for a Bot
groupsGroups a Bot belongs to
job_titleBot's job title
max_chats_countBot's maximum number of concurrent chats
timezoneThe time zone in which the Bot's work scheduler operates
REQUEST
Copied!
curl -X POST \
  https://api.livechatinc.com/v3.3/configuration/action/get_bot \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <your_access_token>' \
  -d '{
        "id": "5c9871d5372c824cbf22d860a707a578"
      }'
Response
Copied!
{
	"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 methodThe Groups API endpoint
POSThttps://api.livechatinc.com/v3.3/configuration/action/<action>
Required headerValue
Content-Typeapplication/json

Create Group

Creates a new group.

Specifics
Method URLhttps://api.livechatinc.com/v3.3/configuration/action/create_group
Required scopesgroups--all:rw
Request
ParameterData typeRequiredNotes
namestringYesGroup name (up to 180 chars)
language_codestringNoThe code of the group languange
agent_priorities*objectYesAgents' 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 valueNotes
firstThe 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.
normalThe 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.
lastThe 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.
REQUEST
Copied!
curl -X POST \
  https://api.livechatinc.com/v3.3/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"
        }
      }'
Response
Copied!
{
	"id": 19
}

Update Group

Updates an existing group.

Specifics
Method URLhttps://api.livechatinc.com/v3.3/configuration/action/update_group
Required scopesgroups--my:rw groups--all:rw (to update groups the requester is not a member of)
Request
ParameterData typeRequiredNotes
idintYesGroup ID
namestringNoGroup name (up to 180 chars)
language_codestringNoThe code of the group languange
agent_priorities*objectNoAgents' 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 valueNotes
firstThe 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.
normalThe 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.
lastThe 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.
Response

No response payload (200 OK).

REQUEST
Copied!
curl -X POST \
  https://api.livechatinc.com/v3.3/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 URLhttps://api.livechatinc.com/v3.3/configuration/action/delete_group
Required scopesgroups--my:rw groups--all:rw (to delete groups the requester is not a member of)
Request
ParameterData typeRequiredNotes
idintYesGroup ID
Response

No response payload (200 OK).

REQUEST
Copied!
curl -X POST \
  https://api.livechatinc.com/v3.3/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 URLhttps://api.livechatinc.com/v3.3/configuration/action/list_groups
Required scopesgroups--all:ro
Request
ParameterData typeRequiredNotes
fields*string[]NoAdditional fields to include.

* Possible values for the fields[] parameter:

Possible valueNotes
agent_prioritiesAn object containing Agents belonging to a group, along with their priorities.
routing_statusThe routing status of a group.
REQUEST
Copied!
curl -X POST \
  https://api.livechatinc.com/v3.3/configuration/action/list_groups \
  -H 'Authorization: Bearer <your_access_token>' \
  -H 'Content-Type: application/json' \
  -d '{}'
Response
Copied!
[
	{
		"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 URLhttps://api.livechatinc.com/v3.3/configuration/action/get_group
Required scopesgroups--my:ro groups--all:ro (to get groups the requester is not a member of)
Request
ParameterData typeRequiredNotes
idintYesGroup ID
fields*string[]NoAdditional fields to include.

* Possible values for the fields[] parameter:

Possible valueNotes
agent_prioritiesAn object containing Agents belonging to a group, along with their priorities.
routing_statusThe routing status of a group.
REQUEST
Copied!
curl -X POST \
  https://api.livechatinc.com/v3.3/configuration/action/get_group \
  -H 'Authorization: Bearer <your_access_token>' \
  -H 'Content-Type: application/json' \
  -d '{
        "id": 19,
        "fields": ["agent_priorities", "routing_status"]
      }'
Response
Copied!
{
	"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
Copied!
{
    "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 to 3).

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.3/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.

NamespacePropertyTypeAccess
testbool_propertyboolrw for everyone everywhere
testint_propertyintrw for everyone everywhere
teststring_propertystringrw for everyone everywhere
testtokenized_string_propertytokenized_stringrw 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 methodThe Properties API endpoint
POSThttps://api.livechatinc.com/v3.3/configuration/action/<action>
Required headerValue
Content-Typeapplication/json

Register Property

Registers a new private property for a given Client Id.

Specifics
Method URLhttps://api.livechatinc.com/v3.3/configuration/action/register_property
Required scopesproperties--configuration:rw
Request
ParameterRequiredData typeNotes
nameYesstringProperty name
owner_client_idYesstringClient Id that will own the property; must be owned by your organization.
typeYesstringPossible values: int, string, bool, and tokenized_string
accessYesobject
access.<location>min. one locationobjectPossible values: chat, thread, event, license, group
access.<location>.<user>min. one user[string]Possible <user> values: agent, customer; possible values: read, write
descriptionNostringProperty description
domain *No[<type>]Array of values that properties can be set to
range *NoobjectRange of values that properties can be set to
range.fromNointOnly values equal or greater than this parameter can be set to this property
range.toNointOnly values equal or lower than this parameter can be set to this property
default_value **NotypeDefault 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
Copied!
curl -X POST \
  https://api.livechatinc.com/v3.3/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 URLhttps://api.livechatinc.com/v3.3/configuration/action/unregister_property
Required scopesproperties--configuration:rw
Request
ParameterRequiredData typeNotes
nameYesstringProperty name
owner_client_idYesstringClient Id that owns the property; must be owned by your organization
Response

No response payload (200 OK).

REQUEST
Copied!
curl -X POST \
  https://api.livechatinc.com/v3.3/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 URLhttps://api.livechatinc.com/v3.3/configuration/action/publish_property
Required scopesproperties--configuration:rw
Request
ParameterRequiredData typeNotes
nameYesstringProperty name
owner_client_idYesstringClient Id that owns the property; must be owned by your organization.
access_typeYes[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
Copied!
curl -X POST \
  https://api.livechatinc.com/v3.3/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 URLhttps://api.livechatinc.com/v3.3/configuration/action/list_properties
Required scopesproperties--configuration:rw
Request
ParameterRequiredData typeNotes
owner_client_idYesstringClient Id that owns the properties; must be owned by your organization.
REQUEST
Copied!
curl -X POST \
  https://api.livechatinc.com/v3.3/configuration/action/list_properties \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <your_access_token>' \
  -d '{
    "owner_client_id": "0805e283233042b37f460ed8fbf22160"
  }'
Response
Copied!
{
	"string_property": {
		"type": "string",
		"description": "",
		"access": {
			"thread": {
				"agent": [
					"read",
					"write"
				],
				"customer": [
					"read"
				]
			},
			"chat": {
				"agent": [
					"write"
				],
				"customer": [
					"read",
					"write"
				]
			}
		}
	}
}

Update License Properties

Updates a property value within a license. This operation doesn't overwrite the existing values.

Specifics
Method URLhttps://api.livechatinc.com/v3.3/configuration/action/update_license_properties
Required scopes*-

*) If the requester's Client ID matches the namespace, setting license properties is always allowed. Otherwise, the permission depends on how the property was configured during registration; parameter: <property_name>.locations.<location>.access.<user>.write.

Request
ParameterRequiredData typeNotes
propertiesYesobjectAn object with namespaces as keys and properties (grouped in objects) as values.
Response

No response payload (200 OK).

REQUEST
Copied!
curl -X POST \
  https://api.livechatinc.com/v3.3/configuration/action/update_license_properties \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <your_access_token>' \
  -d '{
        "properties": {
            "0805e283233042b37f460ed8fbf22160": {
                "string_property": "string value"
              }
          }
      }'
Response
Copied!
{}

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 URLhttps://api.livechatinc.com/v3.3/configuration/action/list_license_properties
Required scopes*-

*) If the requester's Client ID matches the namespace, retrieving license properties is always allowed. Otherwise, the permission depends on how the property was configured during registration; parameter: <property_name>.locations.<location>.access.<user>.read.

Request
ParameterRequiredData typeNotes
namespaceNostringProperties namespace
name_prefixNostringProperties name prefix
REQUEST
Copied!
curl -X POST \
  https://api.livechatinc.com/v3.3/configuration/action/list_license_properties \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <your_access_token>' \
  -d '{
      "namespace": "0805e283233042b37f460ed8fbf22160",
      "name_prefix": "string"
      }'
Response
Copied!
{
	"0805e283233042b37f460ed8fbf22160": {
		"string_property": "string value"
	}
}

Delete License Properties

Deletes the properties set within a license.

Specifics
Method URLhttps://api.livechatinc.com/v3.3/configuration/action/delete_license_properties
Required scopes*-

*) If the requester's Client ID matches the namespace, deleting license properties is always allowed. Otherwise, the permission depends on how the property was configured during registration; parameter: <property_name>.locations.<location>.access.<user>.write.

Request
ParameterRequiredData typeNotes
propertiesYesobjectAn object with namespaces as keys and property_names (in an array) as values.
Response

No response payload (200 OK).

REQUEST
Copied!
curl -X POST \
  https://api.livechatinc.com/v3.3/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 URLhttps://api.livechatinc.com/v3.3/configuration/action/update_group_properties
Required scopes*-

*) If the requester's Client ID matches the namespace, setting group properties is always allowed. Otherwise, the permission depends on how the property was configured during registration; parameter: <property_name>.locations.<location>.access.<user>.write.

Request
ParameterRequiredData typeNotes
group_idYesnumberID of the group you set the properties for.
propertiesYesobjectAn object with namespaces as keys and properties (grouped in objects) as values.
Response

No response payload (200 OK).

REQUEST
Copied!
curl -X POST \
  https://api.livechatinc.com/v3.3/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"
              }
          }
      }'
Response
Copied!
{}

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 URLhttps://api.livechatinc.com/v3.3/configuration/action/list_group_properties
Required scopes*-

*) If the requester's Client ID matches the namespace, retrieving group properties is always allowed. Otherwise, the permission depends on how the property was configured during registration; parameter: <property_name>.locations.<location>.access.<user>.read.

Request
ParameterRequiredData typeNotes
idYesnumberID of the group you retrieve properties from.
namespace NostringProperties namespace
name_prefixNostringProperties name prefix
REQUEST
Copied!
curl -X POST \
  https://api.livechatinc.com/v3.3/configuration/action/list_group_properties \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <your_access_token>' \
  -d '{
      "id": 1,
      "namespace": "0805e283233042b37f460ed8fbf22160",
      "name_prefix": "string"
      }'
Response
Copied!
{
	"0805e283233042b37f460ed8fbf22160": {
		"string_property": "group property value"
	}
}

Delete Group Properties

Deletes the properties set within a group.

Specifics
Method URLhttps://api.livechatinc.com/v3.3/configuration/action/delete_group_properties
Required scopes*-

*) If the requester's Client ID matches the namespace, deleting group properties is always allowed. Otherwise, the permission depends on how the property was configured during registration; parameter: <property_name>.locations.<location>.access.<user>.write.

Request
ParameterRequiredData typeNotes
idYesnumberID of the group you delete properties from.
propertiesYesobjectAn object with namespaces as keys and property_names (in an array) as values.
Response

No response payload (200 OK).

REQUEST
Copied!
curl -X POST \
  https://api.livechatinc.com/v3.3/configuration/action/delete_group_properties \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <your_access_token>' \
  -d '{
      "id": 1,
      "properties": {
        "0805e283233042b37f460ed8fbf22160": ["string_property"]
          }
      }'

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.
general webhook format
Copied!
{
  "webhook_id": "<webhook_id>",
  "secret_key": "<secret_key>",
  "action": "<action>",
  "license_id": "<license_id>",
  "payload": {
  },
  "additional_data": {
    "chat_properties": { //optional
        // chat properties
    },
    "chat_presence_user_ids": [ //optional
      // User IDs
    ]
  }
}

Methods

HTTP methodThe Webhooks API endpoint
POSThttps://api.livechatinc.com/v3.3/configuration/action/<action>
Required headerValue
Content-Typeapplication/json

Register Webhook

Registers a webhook for the Client ID (application) provided in the request. To activate license webhooks, you can enable registered webhooks for a given license. To activate bot webhooks, you need to create a bot, and then, use Set Routing Status method. One Client ID can register up to three webhooks for every action.

Specifics
Method URLhttps://api.livechatinc.com/v3.3/configuration/action/register_webhook
Required scopeswebhooks.configuration:rw
ParameterRequiredData typeNotes
action*yesstringThe action that triggers sending a webhook.
secret_keyyesstringThe secret key sent in webhooks to verify the source of a webhook.
urlyesstringDestination URL for the webhook
additional_datano[]stringAdditional data arriving with the webhook. Value: chat properties, chat_presence_user_ids (all actions except for agent_status_changed, agent_deleted, incoming_customer)
descriptionnostringWebhook description
filtersnoobjectFilters to check if a webhook should be triggered.
filters.author_typenostringPossible values: customer, agent; allowed only for the incoming_event and event_updated actions.
filters.only_my_chatsnobooltrue or false; triggers webhooks only for chats with the property source.client_id set to my client_id.
filters.chat_presencenoobjectFilters to check if a webhook should be triggered based on user's presence in the chat.
filters.chat_presence.user_idsnoobjectOnly one filter (values or exclude_values) is allowed. Supports every user type (Agent, Customer, Bot).
filters.chat_presence.user_ids.valuesno[]stringArray of Users' ids; if any specified User is in the chat, the webhook will be triggered.
filters.chat_presence.user_ids.exclude_valuesno[]stringArray of Users' ids; if any specified Users is in the chat, the webhook will not be triggered.
filters.chat_presence.my_botsnoboolIf any bot owned by owner_client_id is in the chat, the webhook will be triggered.
owner_client_idyesstringThe Client ID for which the webhook will be registered. What is Client ID and where to find it?
typeyesstringbot or license
Triggering actions

* The table below presents the possible values for the action parameter.

Possible actionAvailable filters
incoming_chatchat_presence, only_my_chats
chat_deactivatedchat_presence, only_my_chats
chat_access_grantedchat_presence, only_my_chats
chat_access_revokedchat_presence, only_my_chats
user_added_to_chatchat_presence, only_my_chats
user_removed_from_chatchat_presence, only_my_chats
incoming_eventchat_presence, author_type, only_my_chats
event_updatedchat_presence, author_type, only_my_chats
incoming_rich_message_postbackchat_presence, only_my_chats
chat_properties_updatedchat_presence, only_my_chats
chat_properties_deletedchat_presence, only_my_chats
thread_properties_updatedchat_presence, only_my_chats
thread_properties_deletedchat_presence, only_my_chats
event_properties_updatedchat_presence, only_my_chats
event_properties_deletedchat_presence, only_my_chats
thread_taggedchat_presence, only_my_chats
thread_untaggedchat_presence, only_my_chats
routing_status_set-
agent_deletedagent_ids
incoming_customer-
customer_session_fields_updatedchat_presence
events_marked_as_seenchat_presence, only_my_chats
REQUEST
Copied!
curl -X POST \
  https://api.livechatinc.com/v3.3/configuration/action/register_webhook \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <your_access_token>' \
  -d '{
        "url": "http://myservice.com/webhooks",
        "description": "Test webhook",
        "action": "chat_deactivated",
        "secret_key": "laudla991lamda0pnoaa0",
        "owner_client_id": "asXdesldiAJSq9padj",
        "type": "license"
      }'
Response
Copied!
{
	"id": "pqi8oasdjahuakndw9nsad9na"
}

List Webhooks

Lists all webhooks registered for the given Client ID.

Specifics
Method URLhttps://api.livechatinc.com/v3.3/configuration/action/list_webhooks
Required scopeswebhooks.configuration:rw
Request
ParameterRequiredData typeNotes
owner_client_idyesstringThe webhook owner (the Client ID for which the webhook is registered).
REQUEST
Copied!
curl -X POST \
  https://api.livechatinc.com/v3.3/configuration/action/list_webhooks \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <your_access_token>' \
  -d '{
    "owner_client_id": "0805e283233042b37f460ed8fbf22160"
  }'
Response
Copied!
[
	{
		"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 URLhttps://api.livechatinc.com/v3.3/configuration/action/unregister_webhook
Required scopeswebhooks.configuration:rw
Request
ParameterRequiredData typeNotes
idYesstringWebhook ID
owner_client_idYesstringThe webhook owner (the Client ID for which the webhook is registered).
Response

No response payload (200 OK).

REQUEST
Copied!
curl -X POST \
  https://api.livechatinc.com/v3.3/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 URLhttps://api.livechatinc.com/v3.3/configuration/action/list_webhook_names
Required scopes-
Request
ParameterRequiredData typeNotes
versionNostringDefaults to the current stable API version
REQUEST
Copied!
curl -X POST \
  https://api.livechatinc.com/v3.3/configuration/action/list_webhook_names \
  -H 'Content-Type: application/json' \
  -d '{
        "version": "3.3"
      }'
Response
Copied!
[
	{
		"action": "agent_deleted",
		"filters": [
			"agent_ids"
		]
	},
	{
		"action": "chat_access_granted",
		"filters": [
			"chat_presence",
			"only_my_chats"
		],
		"additional_data": [
			"chat_properties",
			"chat_presence_user_ids"
		]
	},
	{
		"action": "incoming_customer"
	}
]

Enable License Webhooks

Enables the webhooks registered for a given Client Id (application) for the license associated with the access token used in the request.

Specifics
Method URLhttps://api.livechatinc.com/v3.3/configuration/action/enable_license_webhooks
Required scopeswebhooks.state:rw
Request
ParameterRequiredData typeNotes
owner_client_idYesstringRequired only when authorizing via PATs. The request will be rejected if you provide owner_client_id when authorizing with a Bearer Token.
Response

No response payload (200 OK).

REQUEST
Copied!
curl -X POST \
  https://api.livechatinc.com/v3.3/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 URLhttps://api.livechatinc.com/v3.3/configuration/action/disable_license_webhooks
Required scopeswebhooks.state:rw
Request
ParameterRequiredData typeNotes
owner_client_idYesstringRequired only when authorizing via PATs. The request will be rejected if you provide owner_client_id when authorizing with a Bearer Token.
Response

No response payload (200 OK).

REQUEST
Copied!
curl -X POST \
  https://api.livechatinc.com/v3.3/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 URLhttps://api.livechatinc.com/v3.3/configuration/action/get_license_webhooks_state
Required scopeswebhooks.state:ro
Request
ParameterRequiredData typeNotes
owner_client_idYesstringRequired only when authorizing via PATs. The request will be rejected if you provide owner_client_id when authorizing with a Bearer Token.
REQUEST
Copied!
curl -X POST \
  https://api.livechatinc.com/v3.3/configuration/action/get_license_webhooks_state \
  -H 'Authorization: Bearer <your_access_token>' \
  -H 'Content-Type: application/json' \
  -d '{}'
Response
Copied!
{
	"license_webhooks_enabled": true
}

Chats

incoming_chat

Informs about a chat coming with a new thread. The webhook payload contains the whole chat data structure. If the chat was started with some initial events, the thread object contains them.

Specifics
Actionincoming_chat
Push equivalent inAgent Chat API Customer Chat API
Webhook payload
FieldNotes
chatChat data structure
Sample webhook
Copied!
{
  "webhook_id": "<webhook_id>",
  "secret_key": "<secret_key>",
  "action": "incoming_chat",
  "license_id": 104130623,
  "payload": {
    "chat": {
    "id": "PJ0MRSHTDG",
    "users": [
      // array of "User" objects
    ],
    "properties": {
      // "Property" object
    },
    "thread": {
      // "Thread" object
      }
    }
  },
  "additional_data": {
    "chat_properties": { //optional
        // chat properties
    },
    "chat_presence_user_ids": [ //optional
      // User IDs
    ]
  }
}

chat_deactivated

Informs that a chat was deactivated by closing the currently open thread.

Specifics
Actionchat_deactivated
Push equivalent inAgent Chat API Customer Chat API
Webhook payload
FieldNotes
user_idMissing if a thread was closed by the router.
Sample webhook
Copied!
{
  "webhook_id": "<webhook_id>",
  "secret_key": "<secret_key>",
  "action": "chat_deactivated",
  "license_id": 104130623,
  "payload": {
    "chat_id": "PJ0MRSHTDG",
    "thread_id": "K600PKZON8",
    "user_id": "b7eff798-f8df-4364-8059-649c35c9ed0c" // optional
  },
  "additional_data": {
    "chat_properties": { //optional
        // chat properties
    },
    "chat_presence_user_ids": [ //optional
      // User IDs
    ]
  }
}

Chat access

chat_access_granted

Informs that new, single access to a chat was granted. The existing access isn't overwritten.

Specifics
Actionchat_access_granted
Push equivalent inAgent Chat API
Webhook payload
FieldNotes
idChat id
Sample webhook
Copied!
{
  "webhook_id": "<webhook_id>",
  "secret_key": "<secret_key>",
  "action": "chat_access_granted",
  "license_id": 104130623,
  "payload": {
    "id": "PJ0MRSHTDG",
    "access": {
      "group_ids": [1]
    }
  },
  "additional_data": {
    "chat_properties": { //optional
        // chat properties
    },
    "chat_presence_user_ids": [ //optional
      // User IDs
    ]
  }
}

chat_access_revoked

Informs that access to a certain chat was revoked.

Specifics
Actionchat_access_revoked
Push equivalent inAgent Chat API
Webhook payload
FieldNotes
idChat Id
Sample webhook
Copied!
{
  "webhook_id": "<webhook_id>",
  "secret_key": "<secret_key>",
  "action": "chat_access_revoked",
  "license_id": 104130623,
  "payload": {
    "id": "PJ0MRSHTDG",
    "access": {
      "group_ids": [1]
    }
  },
  "additional_data": {
    "chat_properties": { //optional
        // chat properties
    },
    "chat_presence_user_ids": [ //optional
      // User IDs
    ]
  }
}

chat_transferred

Informs that a chat was transferred to a different group or to an agent.

Specifics
Actionchat_transferred
Push equivalent inAgent Chat API
Webhook payload
FieldNotes
thread_idPresent if the chat is active.
transferred_toIDs of the groups and agents the chat is assigned to after the transfer.
reason *Informs why the chat was transferred.
queuePresent if the chat is queued after the transfer.

*) Possible reasons: manual, inactive, assigned, unassigned, other.

Sample webhook
Copied!
{
  "webhook_id": "<webhook_id>",
  "secret_key": "<secret_key>",
  "action": "chat_access_revoked",
  "license_id": 104130623,
  "payload": {
    "chat_id": "PJ0MRSHTDG",
    "thread_id": "K600PKZON8",
    "requester_id": "jones@example.com",
    "reason": "manual",
    "transferred_to": {
      "group_ids": [ 19 ],
      "agent_ids": ["smith@example.com"],
    },
    "queue": {
      "position": 42,
      "wait_time": 1337,
      "queued_at": "2019-12-09T12:01:18.909000Z"
    }
  }
}

Chat users

user_added_to_chat

Informs that a user (Customer or Agent) was added to a chat.

Specifics
Actionuser_added_to_chat
Push equivalent inAgent Chat API Customer Chat API
Webhook payload
FieldNotes
user_typePossible values: agent, customer
Sample webhook
Copied!
{
  "webhook_id": "<webhook_id>",
  "secret_key": "<secret_key>",
  "action": "user_added_to_chat",
  "license_id": 104130623,
  "payload": {
    "chat_id": "PJ0MRSHTDG",
    "thread_id": "K600PKZON8",
    "user": {
      // "User > Customer" or "User > Agent" object
    },
    "reason": "manual",
    "requester_id": "smith@example.com"
  },
  "additional_data": {
    "chat_properties": { //optional
      // chat properties
    },
    "chat_presence_user_ids": [ //optional
      // User IDs
    ]
  }
}

user_removed_from_chat

Informs that a user (Customer or Agent) was removed from a chat.

Specifics
Actionuser_removed_from_chat
Push equivalent inAgent Chat API Customer Chat API
Webhook payload
FieldNotes
user_typePossible values: agent, customer
Sample webhook
Copied!
{
  "webhook_id": "<webhook_id>",
  "secret_key": "<secret_key>",
  "action": "user_removed_from_chat",
  "license_id": 104130623,
  "payload": {
    "chat_id": "PJ0MRSHTDG",
    "thread_id": "K600PKZON8",
    "user_id": "agent@example.com",
    "reason": "manual",
    "requester_id": "smith@example.com"
  },
  "additional_data": {
    "chat_properties": { //optional
      // chat properties
    },
    "chat_presence_user_ids": [ //optional
      // User IDs
    ]
  }
}

Events

incoming_event

Informs about an incoming event sent to a chat.

Specifics
Actionincoming_event
Push equivalent inAgent Chat API Customer Chat API
Sample webhook
Copied!
{
  "webhook_id": "<webhook_id>",
  "secret_key": "<secret_key>",
  "action": "incoming_event",
  "license_id": 104130623,
  "payload": {
    "chat_id": "PJ0MRSHTDG",
    "thread_id": "K600PKZON8",
    "event": {
      // "Event" object
    }
  },
  "additional_data": {
    "chat_properties": { //optional
        // chat properties
    },
    "chat_presence_user_ids": [ //optional
      // User IDs
    ]
  }
}

event_updated

Informs that an event was updated.

Specifics
Actionevent_updated
Push equivalent inAgent Chat API Customer Chat API
Sample webhook
Copied!
{
  "webhook_id": "<webhook_id>",
  "secret_key": "<secret_key>",
  "action": "event_updated",
  "license_id": 104130623,
  "payload": {
    "chat_id": "PJ0MRSHTDG",
    "thread_id": "K600PKZON8",
    "event": {
      // "Event" object
    }
  },
  "additional_data": {
    "chat_properties": { //optional
        // chat properties
    },
    "chat_presence_user_ids": [ //optional
      // User IDs
    ]
  }
}

incoming_rich_message_postback

Informs about an incoming rich message postback. The webhook payload contains the info on the postback itself, as well as the chat it was sent in.

Specifics
Actionincoming_rich_message_postback
Push equivalent inAgent Chat API Customer Chat API
Sample webhook
Copied!
{
  "webhook_id": "<webhook_id>",
  "secret_key": "<secret_key>",
  "action": "incoming_rich_message_postback",
  "license_id": 104130623,
  "payload": {
    "user_id": "b7eff798-f8df-4364-8059-649c35c9ed0c",
    "chat_id": "PJ0MRSHTDG",
    "thread_id": "K600PKZON8",
    "event_id": "0affb00a-82d6-4e07-ae61-56ba5c36f743",
    "postback": {
      "id": "action_yes",
      "toggled": true
    }
  },
  "additional_data": {
    "chat_properties": { //optional
        // chat properties
    },
    "chat_presence_user_ids": [ //optional
      // User IDs
    ]
  }
}

Properties

chat_properties_updated

Informs about those chat properties that were updated.

Specifics
Actionchat_properties_updated
Push equivalent inAgent Chat API Customer Chat API
Webhook payload
FieldNotes
propertiesNot a full properties object. This push shows only the properties that have been recently updated.
Sample webhook
Copied!
{
  "webhook_id": "<webhook_id>",
  "secret_key": "<secret_key>",
  "action": "chat_properties_updated",
  "license_id": 104130623,
  "payload": {
    "chat_id": "PJ0MRSHTDG",
    "properties": {
      "0805e283233042b37f460ed8fbf22160": {
        "string_property": "string value"
      }
    }
  },
  "additional_data": {
    "chat_properties": { //optional
        // chat properties
    },
    "chat_presence_user_ids": [ //optional
      // User IDs
    ]
  }
}

chat_properties_deleted

Informs about those chat properties that were deleted.

Specifics
Actionchat_properties_deleted
Push equivalent inAgent Chat API Customer Chat API
Webhook payload
FieldNotes
propertiesNot a full properties object. This push shows only the properties that have been recently updated.
Sample webhook
Copied!
{
  "webhook_id": "<webhook_id>",
  "secret_key": "<secret_key>",
  "action": "chat_properties_deleted",
  "license_id": 104130623,
  "payload": {
    "chat_id": "PJ0MRSHTDG",
    "properties": {
      "0805e283233042b37f460ed8fbf22160": [
        "string_property"
      ]
    }
  },
  "additional_data": {
    "chat_properties": { //optional
        // chat properties
    },
    "chat_presence_user_ids": [ //optional
      // User IDs
    ]
  }
}

thread_properties_updated

Informs about those thread properties that were updated.

Specifics
Actionthread_properties_updated
Push equivalent inAgent Chat API Customer Chat API
Webhook payload
FieldNotes
propertiesNot a full properties object. This push shows only the properties that have been recently updated.
Sample webhook
Copied!
{
  "webhook_id": "<webhook_id>",
  "secret_key": "<secret_key>",
  "action": "thread_properties_updated",
  "license_id": 104130623,
  "payload": {
    "chat_id": "PJ0MRSHTDG",
    "thread_id": "K600PKZON8",
    "properties": {
      "0805e283233042b37f460ed8fbf22160": {
        "string_property": "string value"
      }
    }
  },
  "additional_data": {
    "chat_properties": { //optional
        // chat properties
    },
    "chat_presence_user_ids": [ //optional
      // User IDs
    ]
  }
}

thread_properties_deleted

Informs about those thread properties that were deleted.

Specifics
Actionthread_properties_deleted
Push equivalent inAgent Chat API Customer Chat API
Webhook payload
FieldNotes
propertiesNot a full properties object. This push shows only the properties that have been recently updated.
Sample webhook
Copied!
{
  "webhook_id": "<webhook_id>",
  "secret_key": "<secret_key>",
  "action": "thread_properties_deleted",
  "license_id": 104130623,
  "payload": {
    "chat_id": "PJ0MRSHTDG",
    "thread_id": "K600PKZON8",
    "properties": {
      "0805e283233042b37f460ed8fbf22160": [
        "string_property"
          ]
      }
  },
  "additional_data": {
    "chat_properties": { //optional
        // chat properties
    },
    "chat_presence_user_ids": [ //optional
      // User IDs
    ]
  }
}

event_properties_updated

Informs about those event properties that were updated.

Specifics
Actionevent_properties_updated
Push equivalent inAgent Chat API Customer Chat API
Webhook payload
FieldNotes
propertiesThis is not a full properties object. This webhook shows only the properties that have been recently updated.
Sample webhook
Copied!
{
  "webhook_id": "<webhook_id>",
  "secret_key": "<secret_key>",
  "action": "event_properties_updated",
  "license_id": 104130623,
  "payload": {
    "chat_id": "PJ0MRSHTDG",
    "thread_id": "K600PKZON8",
    "event_id": "0affb00a-82d6-4e07-ae61-56ba5c36f743",
    "properties": {
      "0805e283233042b37f460ed8fbf22160": {
        "string_property": "property_value"
      }
    }
  },
  "additional_data": {
    "chat_properties": { //optional
        // chat properties
    },
    "chat_presence_user_ids": [ //optional
      // User IDs
    ]
  }
}

event_properties_deleted

Informs about those event properties that were deleted.

Specifics
Actionevent_properties_deleted
Push equivalent inAgent Chat API Customer Chat API
Webhook payload
FieldNotes
propertiesThis is not a full properties object. This webhook shows only the properties that have been recently updated.
Sample webhook
Copied!
{
  "webhook_id": "<webhook_id>",
  "secret_key": "<secret_key>",
  "action": "event_properties_deleted",
  "license_id": 104130623,
  "payload": {
    "chat_id": "PJ0MRSHTDG",
    "thread_id": "K600PKZON8",
    "event_id": "0affb00a-82d6-4e07-ae61-56ba5c36f743",
    "properties": {
      "0805e283233042b37f460ed8fbf22160": [
        "string_property"
          ]
      }
  },
  "additional_data": {
    "chat_properties": { //optional
        // chat properties
    },
    "chat_presence_user_ids": [ //optional
      // User IDs
    ]
  }
}

Thread tags

thread_tagged

Informs that a thread was tagged.

Specifics
Actionthread_tagged
Push equivalent inAgent Chat API
Sample webhook
Copied!
{
  "webhook_id": "<webhook_id>",
  "secret_key": "<secret_key>",
  "action": "thread_tagged",
  "license_id": 104130623,
  "payload": {
    "chat_id": "PJ0MRSHTDG",
    "thread_id": "K600PKZON8",
    "tag": "bug_report"
  },
  "additional_data": {
    "chat_properties": { //optional
        // chat properties
    },
    "chat_presence_user_ids": [ //optional
      // User IDs
    ]
  }
}

thread_untagged

Informs that a thread was untagged.

Specifics
Actionthread_untagged
Push equivalent inAgent Chat API
Sample webhook
Copied!
{
  "webhook_id": "<webhook_id>",
  "secret_key": "<secret_key>",
  "action": "thread_untagged",
  "license_id": 104130623,
  "payload": {
    "chat_id": "PJ0MRSHTDG",
    "thread_id": "K600PKZON8",
    "tag": "bug_report"
  },
  "additional_data": {
    "chat_properties": { //optional
        // chat properties
    },
    "chat_presence_user_ids": [ //optional
      // User IDs
    ]
  }
}

Status

routing_status_set

Informs that an Agent's or Bot's status has changed.

Specifics
Actionrouting_status_set
Push equivalent inAgent Chat API
Webhook payload
FieldNotes
statusPossible values: accepting chats, not accepting chats, offline (for Bots only)
Sample webhook
Copied!
{
  "webhook_id": "<webhook_id>",
  "secret_key": "<secret_key>",
  "action": "routing_status_set",
  "license_id": 104130623,
  "payload": {
    "agent_id":"agent1@example.com",
    "status": "accepting chats"
  },
  "additional_data": {
    "chat_properties": { //optional
        // chat properties
    },
    "chat_presence_user_ids": [ //optional
      // User IDs
    ]
  }
}

agent_deleted

Informs that an Agent's account was deleted.

Specifics
Actionagent_deleted
Push equivalent in-
Sample webhook
Copied!
{
  "webhook_id": "<webhook_id>",
  "secret_key": "<secret_key>",
  "action": "agent_deleted",
  "license_id": 104130623,
  "payload": {
    "agent_id": "agent1@example.com"
  },
  "additional_data": {
    "chat_properties": { //optional
        // chat properties
    },
    "chat_presence_user_ids": [ //optional
      // User IDs
    ]
  }
}

Customers

incoming_customer

Informs that a new Customer registered.

Specifics
Actionincoming_customer
Push equivalent inAgent Chat API
Sample webhook
Copied!
{
  "webhook_id": "<webhook_id>",
  "secret_key": "<secret_key>",
  "action": "incoming_customer",
  "license_id": 104130623,
  "payload": {
    "customer": {
    // "User > Customer" object
    }
  },
  "additional_data": {
    "chat_properties": { //optional
        // chat properties
    },
    "chat_presence_user_ids": [ //optional
      // User IDs
    ]
  }
}

customer_session_fields_updated

Informs that a chatting Customer's session fields were updated. The webhook will be sent for each active chat the Customer has.

Specifics
Actioncustomer_session_fields_updated
Sample webhook
Copied!
{
  "webhook_id": "<webhook_id>",
  "secret_key": "<secret_key>",
  "action": "customer_session_fields_updated",
  "license_id": 104130623,
  "payload": {
    "id": "5280e68c-9692-4212-4ba9-85f7d8af55cd",
    "active_chat": {
        "chat_id": "PJ0MRSHTDG",
        "thread_id": "K600PKZON8"
    }
    ],
    "session_fields": [
      {
        "key": "value"
      }
    ]
  },
  "additional_data": {
    "chat_properties": { //optional
        // chat properties
    },
    "chat_presence_user_ids": [ //optional
      // User IDs
    ]
  }
}

Other

events_marked_as_seen

Informs that a user has seen events up to a specific time.

Specifics
Actionevents_marked_as_seen
Push equivalent inAgent Chat API Customer Chat API
Sample webhook
Copied!
{
  "webhook_id": "<webhook_id>",
  "secret_key": "<secret_key>",
  "action": "events_marked_as_seen",
  "license_id": 104130623,
  "payload": {
    "user_id": "b7eff798-f8df-4364-8059-649c35c9ed0c",
    "chat_id": "PJ0MRSHTDG",
    "seen_up_to": "2017-10-12T15:19:21.010200Z"
  },
  "additional_data": {
    "chat_properties": { //optional
        // chat properties
    },
    "chat_presence_user_ids": [ //optional
      // User IDs
    ]
  }
}

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!