Search Omnichannel Contacts
- Print
- DarkLight
- PDF
Search Omnichannel Contacts
- Print
- DarkLight
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Get
/api/v1/omnichannel/contacts.search
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].
Header parameters
X-Auth-Token
stringRequired
The authToken of the authenticated user.
ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
X-User-Id
stringRequired
The userId of the authenticated user.
ExamplerbAXPnMktTFbNpwtJ
Query parameters
searchText
string
Text to search for in contact details.
ExampleJohn
unknown
boolean
Filter by contact's unknown status.
ExampleFalse
count
number
Number of results to return per search.
Example2
offset
number
Number of results to skip for pagination.
Example5
sort
string
JSON string defining the sort order of results.
Example{"name": 1}
Responses
200
OK
Example 1
{
"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
}object
contacts
Array of object
object
_id
string
createdAt
string
name
string
emails
Array of object
object
address
string
phones
Array of object
object
channels
Array of object
object
name
string
visitor
object
visitorId
string
source
object
type
string
blocked
boolean
verified
boolean
details
object
type
string
destination
string
lastChat
object
_id
string
ts
string
customFields
object
social-number
string
unknown
boolean
_updatedAt
string
conflictingFields
Array of object
object
lastChat
object
_id
string
ts
string
contactManager
object
_id
string
name
string
username
string
count
integer
offset
integer
total
integer
success
boolean
400
Bad Request
Example 1
{
"success": false,
"error": "must be number [invalid-params]",
"errorType": "invalid-params"
}Example 2
{
"success": false,
"error": "must be boolean [invalid-params]",
"errorType": "invalid-params"
}object
success
boolean
error
string
errorType
string
401
Unauthorized
Authorization Error
{
"status": "error",
"message": "You must be logged in to do this."
}object
status
string
message
string
403
Forbidden
Example 1
{
"success": false,
"error": "User does not have the permissions required for this action [error-unauthorized]"
}Example 2
{
"success": false,
"error": "unauthorized"
}object
success
boolean
error
string
Was this article helpful?