Search Conversations

GEThttps://services.leadconnectorhq.com/conversations/search
Returns a list of all conversations matching the search criteria along with the sort and filter options selected.

Request

Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.

Provide your bearer token in the Authorization header when making requests to protected resources.

Example: Authorization: Bearer 123
Query Parameters
assignedTo
string

User IDs that conversations are assigned to. Multiple IDs can be provided as comma-separated values. Use "unassigned" to fetch conversations not assigned to any user.

Example:
ABCHkzuJQ8ZMd4Te84GK,fGiae4CHkzoskh8thsik
contactId
string

Contact Id

Example:
9VEmS0si86GW6gXWU89b
followers
string

User IDs of followers to filter conversations by. Multiple IDs can be provided as comma-separated values.

Example:
ABCHkzuJQ8ZMd4Te84GK,fGiae4CHkzoskh8thsik
id
string

Id of the conversation

Example:
ABCHkzuJQ8ZMd4Te84GK
lastMessageAction
string

Action of the last outbound message in the conversation as string.

Allowed values:
automatedmanual
Example:
manual
lastMessageDirection
string

Direction of the last message in the conversation as string.

Allowed values:
inboundoutbound
Example:
inbound
lastMessageType
string

Type of the last message in the conversation as a string

Allowed values:
TYPE_CALLTYPE_SMSTYPE_EMAILTYPE_SMS_REVIEW_REQUESTTYPE_WEBCHATTYPE_SMS_NO_SHOW_REQUESTTYPE_CAMPAIGN_SMSTYPE_CAMPAIGN_CALLTYPE_CAMPAIGN_EMAILTYPE_CAMPAIGN_VOICEMAILTYPE_FACEBOOKTYPE_CAMPAIGN_FACEBOOKTYPE_CAMPAIGN_MANUAL_CALLTYPE_CAMPAIGN_MANUAL_SMSTYPE_GMBTYPE_CAMPAIGN_GMBTYPE_REVIEWTYPE_INSTAGRAMTYPE_WHATSAPPTYPE_CUSTOM_SMSTYPE_CUSTOM_EMAILTYPE_CUSTOM_PROVIDER_SMSTYPE_CUSTOM_PROVIDER_EMAILTYPE_IVR_CALLTYPE_ACTIVITY_CONTACTTYPE_ACTIVITY_INVOICETYPE_ACTIVITY_PAYMENTTYPE_ACTIVITY_OPPORTUNITYTYPE_LIVE_CHATTYPE_LIVE_CHAT_INFO_MESSAGETYPE_ACTIVITY_APPOINTMENTTYPE_FACEBOOK_COMMENTTYPE_INSTAGRAM_COMMENTTYPE_CUSTOM_CALLTYPE_INTERNAL_COMMENT
Example:
TYPE_SMS
limit
number

Limit of conversations - Default is 20

Example:
20
mentions
string

User Id of the mention. Multiple values are comma separated.

Example:
ABCHkzuJQ8ZMd4Te84GK,fGiae4CHkzoskh8thsik
query
string

Search paramater as a string

Example:
Search string
scoreProfile
string

Id of score profile on which conversations should get filtered out, works with scoreProfileMin & scoreProfileMax

Example:
ABCHkzuJQ8ZMd4Te84GK
scoreProfileMax
number

Maximum value for score

Example:
ABCHkzuJQ8ZMd4Te84GK
scoreProfileMin
number

Minimum value for score

Example:
ABCHkzuJQ8ZMd4Te84GK
sort
string

Sort paramater - asc or desc

Allowed values:
ascdesc
Example:
asc
sortBy
string

The sorting of the conversation to be filtered as - manual messages or all messages

Allowed values:
last_manual_message_datelast_message_datescore_profile
Example:
last_message_date
sortScoreProfile
string

Id of score profile on which sortBy.ScoreProfile should sort on

Example:
ABCHkzuJQ8ZMd4Te84GK
startAfterDate
any

Search to begin after the specified date - should contain the sort value of the last document

Example:
1600854
status
string

The status of the conversation to be filtered - all, read, unread, starred

Allowed values:
allreadunreadstarredrecents
Example:
all
locationId
string
required

Location Id

Example:
ABCHkzuJQ8ZMd4Te84GK
Headers
Authorization
string
required

Access Token

Example:
Bearer 9c48df2694a849b6089f9d0d3513efe
Version
string
required

API Version

Allowed value:
2021-07-28

Responses

Successful response

conversations
array[object]
required

The list of all conversations found for the given query

id
string
required

Conversation Id

Example:
ABCHkzuJQ8ZMd4Te84GK
contactId
string
required

Contact Id

Example:
ABCHkzuJQ8ZMd4Te84GK
locationId
string
required

Location Id

Example:
ABCHkzuJQ8ZMd4Te84GK
lastMessageBody
string
required

Content of the most recent message in the conversation

Example:
This is a sample message body
lastMessageType
string
required

Channel/type of the most recent message (SMS, Email, Call, etc)

Allowed values:
TYPE_CALLTYPE_SMSTYPE_EMAILTYPE_SMS_REVIEW_REQUESTTYPE_WEBCHATTYPE_SMS_NO_SHOW_REQUESTTYPE_CAMPAIGN_SMSTYPE_CAMPAIGN_CALLTYPE_CAMPAIGN_EMAILTYPE_CAMPAIGN_VOICEMAILTYPE_FACEBOOKTYPE_CAMPAIGN_FACEBOOKTYPE_CAMPAIGN_MANUAL_CALLTYPE_CAMPAIGN_MANUAL_SMSTYPE_GMBTYPE_CAMPAIGN_GMBTYPE_REVIEWTYPE_INSTAGRAMTYPE_WHATSAPPTYPE_CUSTOM_SMSTYPE_CUSTOM_EMAILTYPE_CUSTOM_PROVIDER_SMSTYPE_CUSTOM_PROVIDER_EMAILTYPE_IVR_CALLTYPE_ACTIVITY_CONTACTTYPE_ACTIVITY_INVOICETYPE_ACTIVITY_PAYMENTTYPE_ACTIVITY_OPPORTUNITYTYPE_LIVE_CHATTYPE_LIVE_CHAT_INFO_MESSAGETYPE_ACTIVITY_APPOINTMENTTYPE_FACEBOOK_COMMENTTYPE_INSTAGRAM_COMMENTTYPE_CUSTOM_CALLTYPE_INTERNAL_COMMENT
Example:
TYPE_SMS
type
string
required

Primary channel/type of the conversation (Phone, Email, etc)

Allowed values:
TYPE_PHONETYPE_EMAILTYPE_FB_MESSENGERTYPE_REVIEWTYPE_GROUP_SMS
Example:
TYPE_PHONE
unreadCount
number
required

Number of unread messages in this conversation

Example:
1
fullName
string
required

Complete name of the contact (first and last name)

Example:
John Doe
contactName
string
required

Alternative display name for the contact - used when full name is not available

Example:
John Doe Company
email
string
required

Primary email address of the contact

Example:
johndoe@mailingdomain.com
phone
string
required

Primary phone number of the contact

Example:
+15550001234
total
number
required

Total Number of results found for the given query

Example:
100

Unprocessable Entity

statusCode
number
Example:
422
message
array[string]
Example:
["Unprocessable Entity"]
error
string
Example:
Unprocessable Entity

Unauthorized

statusCode
number
Example:
401
message
string
Example:
Invalid token: access token is invalid
error
string
Example:
Unauthorized

Bad Request

statusCode
number
Example:
400
message
string
Example:
Bad Request