Get Omnichannel Contact
- Print
- DarkLight
- PDF
Get Omnichannel Contact
- Print
- DarkLight
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Get
/api/v1/omnichannel/contacts.get
Retrieve a single omnichannel contact by providing either a contactId
or a visitor
object.
- Use
contactId
to fetch the contact directly by its unique ID. - Use the
visitor
object to fetch the contact by its visitor association.
Note: You must provide only one of these parameters in the request.
Required permission: view-livechat-contact
.
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
contactId
string
The contact's unique ID. Provide this parameter if fetching the contact directly by its ID.
Example673c76df47a6c9b89dd263d8
visitor
Visitor association for the contact. Provide this object as JSON with the required fields:
visitorId
(string): The ID of the visitor.source.type
(string): The type of the source (e.g., "web").
object
visitorId
string Required
The unique ID of the visitor.
source
object
The source of the visitor.
type
string Required
The type of the source (e.g., "widget").
id
string
The source's unique ID.
Responses
200
OK
Example 1
{
"contact": {
"_id": "673c76df47a6c9b89dd263d8",
"createdAt": "2024-11-19T11:30:39.710Z",
"name": "John Doe",
"channels": [
{
"name": "widget",
"visitor": {
"visitorId": "673c76df1e2e6feb77939c70",
"source": {
"type": "widget"
}
},
"blocked": false,
"verified": true,
"details": {
"type": "widget",
"destination": "example.com"
},
"lastChat": {
"_id": "ixnGsLNT8rTL9eYY3",
"ts": "2024-11-19T11:30:39.724Z"
},
"field": "email",
"value": "[email protected]",
"verifiedAt": "2024-11-19T11:31:58.997Z"
}
],
"customFields": {
"social-number": "123456-12345",
"address": "P.O. Box 123 3456 Home Rd. Somewhere in the world",
"zip-code": "123456-099"
},
"unknown": false,
"_updatedAt": "2024-11-19T11:33:55.424Z",
"lastChat": {
"_id": "ixnGsLNT8rTL9eYY3",
"ts": "2024-11-19T11:30:39.724Z"
},
"conflictingFields": [],
"emails": [
{
"address": "[email protected]"
}
],
"contactManager": "cbTgcixmLxYSdFmmZ",
"phones": []
},
"success": true
}
object
contact
object
_id
string
createdAt
string
name
string
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
field
string
value
string
verifiedAt
string
customFields
object
social-number
string
address
string
zip-code
string
unknown
boolean
_updatedAt
string
lastChat
object
_id
string
ts
string
conflictingFields
Array of object
object
emails
Array of object
object
address
string
contactManager
string
phones
Array of object
object
success
boolean
400
Bad Request
Example 1
{
"success": false,
"error": "must have required property 'contactId'\n must have required property 'source'\n must match exactly one schema in oneOf [invalid-params]",
"errorType": "invalid-params"
}
Example 2
{
"success": false,
"error": "must have required property 'contactId'\n must have required property 'visitor'\n must match exactly one schema in oneOf [invalid-params]",
"errorType": "invalid-params"
}
Example 3
{
"success": false,
"error": "must pass \"isNotEmpty\" keyword validation\n must have required property 'visitor'\n must match exactly one schema in oneOf [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?