Retrieve a list of omnichannel contacts based on search criteria like name, email or phone number.
Permission required: view-livechat-contact
.
Note: Ensure to URL-encode special characters such as @
, +
, /
, and *
in query parameters to prevent issues with the endpoint. For example, encode email addresses as mail%40example.com
instead of [email protected]
.
The authToken
of the authenticated user.
The userId
of the authenticated user.
Number of items to "skip" in the query, i.e. requests return count items, skipping the first offset items. Refer to the official documentation to learn more.
List of fields to order by, and in which direction. JSON object, with properties listed in desired order, with values of 1 for ascending, or -1 for descending. For example, sort = {"value": -1, "_id": 1}
. Refer to the official documentation to learn more.
Text to search for in contact details.
Filter by contact's unknown status.
OK
{
"contacts": [
{
"_id": "673be1711e2e6feb77939a7b",
"createdAt": "2024-11-19T00:53:05.468Z",
"name": "Boris Doe",
"emails": [
{
"address": "[email protected]"
}
],
"phones": [],
"channels": [
{
"name": "widget",
"visitor": {
"visitorId": "673be2101e2e6feb77939a7f",
"source": {
"type": "widget"
}
},
"blocked": false,
"verified": false,
"details": {
"type": "widget",
"destination": "example.com"
},
"lastChat": {
"_id": "NMee5zFPv62N7RAhh",
"ts": "2024-11-19T00:55:46.723Z"
}
}
],
"customFields": {
"social-number": "45600-00"
},
"unknown": false,
"_updatedAt": "2024-11-19T00:56:43.140Z",
"conflictingFields": [],
"lastChat": {
"_id": "NMee5zFPv62N7RAhh",
"ts": "2024-11-19T00:55:46.723Z"
},
"contactManager": {
"_id": "mAwAgmNndK7SHnQ89",
"name": "Jane",
"username": "Jane"
}
}
],
"count": 1,
"offset": 0,
"total": 1,
"success": true
}
Bad Request
{
"success": false,
"error": "must be number [invalid-params]",
"errorType": "invalid-params"
}
{
"success": false,
"error": "must be boolean [invalid-params]",
"errorType": "invalid-params"
}
Unauthorized
{
"status": "error",
"message": "You must be logged in to do this."
}
Forbidden
{
"success": false,
"error": "User does not have the permissions required for this action [error-unauthorized]"
}
{
"success": false,
"error": "unauthorized"
}