Schemas-Conversations

BadRequestDTO

statusCode
number
Example:
400
message
string
Example:
Bad Request
Example
{
  "statusCode": 400,
  "message": "Bad Request"
}

UnauthorizedDTO

statusCode
number
Example:
401
message
string
Example:
Invalid token: access token is invalid
error
string
Example:
Unauthorized
Example
{
  "statusCode": 401,
  "message": "Invalid token: access token is invalid",
  "error": "Unauthorized"
}

StartAfterNumberSchema

startAfterDate
number

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

Example:
1600854
Example
{
  "startAfterDate": 1600854
}

StartAfterArrayNumberSchema

startAfterDate
array[string]

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

Example:
[1600854,1600851]
Example
{
  "startAfterDate": [
    1600854,
    1600851
  ]
}

ConversationSchema

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
Example
 {
  "id": "ABCHkzuJQ8ZMd4Te84GK",
  "contactId": "ABCHkzuJQ8ZMd4Te84GK",
  "locationId": "ABCHkzuJQ8ZMd4Te84GK",
  "lastMessageBody": "This is a sample message body",
  "lastMessageType": "TYPE_CALL",
  "type": "TYPE_PHONE",
  "unreadCount": 1,
  "fullName": "John Doe",
  "contactName": "John Doe Company",
  "email": "johndoe@mailingdomain.com",
  "phone": "+15550001234"
}

SendConversationResponseDto

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
Example
{
  "conversations": [
    {
      "id": "ABCHkzuJQ8ZMd4Te84GK",
      "contactId": "ABCHkzuJQ8ZMd4Te84GK",
      "locationId": "ABCHkzuJQ8ZMd4Te84GK",
      "lastMessageBody": "This is a sample message body",
      "lastMessageType": "TYPE_SMS",
      "type": "TYPE_PHONE",
      "unreadCount": 1,
      "fullName": "John Doe",
      "contactName": "John Doe Company",
      "email": "johndoe@mailingdomain.com",
      "phone": "+15550001234"
    }
  ],
  "total": 100
}

CreateConversationDto

locationId
string
required

Location ID as string

Example:
tDtDnQdgm2LXpyiqYvZ6
contactId
string
required

Contact ID as string

Example:
tDtDnQdgm2LXpyiqYvZ6
Example
{
  "locationId": "tDtDnQdgm2LXpyiqYvZ6",
  "contactId": "tDtDnQdgm2LXpyiqYvZ6"
}

ConversationCreateResponseDto

id
string
required

Unique identifier for the conversation

Example:
tDtDnQdgm2LXpyiqYvZ6
dateUpdated
string
required

Date when the conversation was last updated

Example:
2023-10-01T12:00:00Z
dateAdded
string
required

Date when the conversation was created

Example:
2023-10-01T12:00:00Z
deleted
boolean
required

Flag indicating if this conversation has been deleted

Example:
false
contactId
string
required

Unique identifier of the contact associated with this conversation

Example:
ve9EPM428kjkvShlRW1KT
locationId
string
required

Unique identifier of the business location where this conversation takes place

Example:
ve9EPM428kjkvShlRW1KT
lastMessageDate
string
required

Date of the last message in the conversation

Example:
2023-10-01T12:00:00Z
assignedTo
string

Unique identifier of the team member assigned to this conversation

Example:
ve9EPM428kjkvShlRW1KT
Example
{
  "id": "tDtDnQdgm2LXpyiqYvZ6",
  "dateUpdated": "2023-10-01T12:00:00Z",
  "dateAdded": "2023-10-01T12:00:00Z",
  "deleted": false,
  "contactId": "ve9EPM428kjkvShlRW1KT",
  "locationId": "ve9EPM428kjkvShlRW1KT",
  "lastMessageDate": "2023-10-01T12:00:00Z",
  "assignedTo": "ve9EPM428kjkvShlRW1KT"
}

CreateConversationSuccessResponse

success
boolean
required

Indicates whether the API request was successful.

Example:
true
conversation
object
required

Conversation data of the provided conversation ID.

id
string
required

Unique identifier for the conversation

Example:
tDtDnQdgm2LXpyiqYvZ6
dateUpdated
string
required

Date when the conversation was last updated

Example:
2023-10-01T12:00:00Z
dateAdded
string
required

Date when the conversation was created

Example:
2023-10-01T12:00:00Z
deleted
boolean
required

Flag indicating if this conversation has been deleted

Example:
false
contactId
string
required

Unique identifier of the contact associated with this conversation

Example:
ve9EPM428kjkvShlRW1KT
locationId
string
required

Unique identifier of the business location where this conversation takes place

Example:
ve9EPM428kjkvShlRW1KT
lastMessageDate
string
required

Date of the last message in the conversation

Example:
2023-10-01T12:00:00Z
assignedTo
string

Unique identifier of the team member assigned to this conversation

Example:
ve9EPM428kjkvShlRW1KT
Example
{
  "success": true,
  "conversation": {
    "id": "tDtDnQdgm2LXpyiqYvZ6",
    "dateUpdated": "2023-10-01T12:00:00Z",
    "dateAdded": "2023-10-01T12:00:00Z",
    "deleted": false,
    "contactId": "ve9EPM428kjkvShlRW1KT",
    "locationId": "ve9EPM428kjkvShlRW1KT",
    "lastMessageDate": "2023-10-01T12:00:00Z",
    "assignedTo": "ve9EPM428kjkvShlRW1KT"
  }
}

GetConversationByIdResponse

contactId
string
required

Unique identifier of the contact associated with this conversation

Example:
ve9EPM428kjkvShlRW1KT
locationId
string
required

Unique identifier of the business location where this conversation takes place

Example:
ve9EPM428kjkvShlRW1KT
deleted
boolean
required

Flag indicating if this conversation has been moved to trash/deleted

Example:
false
inbox
boolean
required

Flag indicating if this conversation is currently in the main inbox view

Example:
true
type
number
required

Communication channel type for this conversation: 1 (Phone), 2 (Email), 3 (Facebook Messenger), 4 (Review), 5 (Group SMS), 6 (Internal Chat - coming soon)

unreadCount
number
required

Number of messages in this conversation that have not been read by the user

Example:
1
assignedTo
string

Unique identifier of the team member currently responsible for handling this conversation

Example:
ve9EPM428kjkvShlRW1KT
id
string
required

Unique identifier for this specific conversation thread

Example:
ve9EPM428kjkvShlRW1KT
starred
boolean

Flag indicating if this conversation has been marked as important/starred by the user

Example:
true
Example
{
  "contactId": "ve9EPM428kjkvShlRW1KT",
  "locationId": "ve9EPM428kjkvShlRW1KT",
  "deleted": false,
  "inbox": true,
  "type": 0,
  "unreadCount": 1,
  "assignedTo": "ve9EPM428kjkvShlRW1KT",
  "id": "ve9EPM428kjkvShlRW1KT",
  "starred": true
}

UpdateConversationDto

locationId
string
required

Location ID as string

Example:
tDtDnQdgm2LXpyiqYvZ6
unreadCount
number

Count of unread messages in the conversation

Example:
1
starred
boolean

Starred status of the conversation.

Example:
true
feedback
object
Example
{
  "locationId": "tDtDnQdgm2LXpyiqYvZ6",
  "unreadCount": 1,
  "starred": true,
  "feedback": {}
}

ConversationDto

id
string

Contact ID as string

Example:
tDtDnQdgm2LXpyiqYvZ6
locationId
string
required

Location ID as string

Example:
tDtDnQdgm2LXpyiqYvZ6
contactId
string
required

Contact ID as string

Example:
tDtDnQdgm2LXpyiqYvZ6
assignedTo
string

Assigned User ID as string

Example:
tDtDnQdgm2LXpyiqYvZ6
userId
string

User ID as string

Example:
tDtDnQdgm2LXpyiqYvZ6
lastMessageBody
string

Last message body as string

Example:
Hello, this is the message body
lastMessageDate
string

Last message date as UTC

Example:
1628008053263
lastMessageType
string

Type of the last message sent/received in the conversation.

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_CALL
unreadCount
number

Count of unread messages in the conversation

Example:
1
inbox
boolean

Inbox status of the conversation.

Example:
true
starred
boolean

Starred status of the conversation.

Example:
true
deleted
boolean
required

Deleted status of the conversation.

Example:
false
Example
{
  "id": "tDtDnQdgm2LXpyiqYvZ6",
  "locationId": "tDtDnQdgm2LXpyiqYvZ6",
  "contactId": "tDtDnQdgm2LXpyiqYvZ6",
  "assignedTo": "tDtDnQdgm2LXpyiqYvZ6",
  "userId": "tDtDnQdgm2LXpyiqYvZ6",
  "lastMessageBody": "Hello, this is the message body",
  "lastMessageDate": "1628008053263",
  "lastMessageType": "TYPE_CALL",
  "unreadCount": 1,
  "inbox": true,
  "starred": true,
  "deleted": false
}

GetConversationSuccessfulResponse

success
boolean
required

Boolean value as the API response.

Example:
true
conversation
object
required

Conversation data of the provided conversation ID.

id
string

Contact ID as string

Example:
tDtDnQdgm2LXpyiqYvZ6
locationId
string
required

Location ID as string

Example:
tDtDnQdgm2LXpyiqYvZ6
contactId
string
required

Contact ID as string

Example:
tDtDnQdgm2LXpyiqYvZ6
assignedTo
string

Assigned User ID as string

Example:
tDtDnQdgm2LXpyiqYvZ6
userId
string

User ID as string

Example:
tDtDnQdgm2LXpyiqYvZ6
lastMessageBody
string

Last message body as string

Example:
Hello, this is the message body
lastMessageDate
string

Last message date as UTC

Example:
1628008053263
lastMessageType
string

Type of the last message sent/received in the conversation.

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_CALL
unreadCount
number

Count of unread messages in the conversation

Example:
1
inbox
boolean

Inbox status of the conversation.

Example:
true
starred
boolean

Starred status of the conversation.

Example:
true
deleted
boolean
required

Deleted status of the conversation.

Example:
false
Example
{
  "success": true,
  "conversation": {
    "id": "tDtDnQdgm2LXpyiqYvZ6",
    "locationId": "tDtDnQdgm2LXpyiqYvZ6",
    "contactId": "tDtDnQdgm2LXpyiqYvZ6",
    "assignedTo": "tDtDnQdgm2LXpyiqYvZ6",
    "userId": "tDtDnQdgm2LXpyiqYvZ6",
    "lastMessageBody": "Hello, this is the message body",
    "lastMessageDate": "1628008053263",
    "lastMessageType": "TYPE_CALL",
    "unreadCount": 1,
    "inbox": true,
    "starred": true,
    "deleted": false
  }
}

DeleteConversationSuccessfulResponse

success
boolean
required

Boolean value as the API response.

Example:
true
Example
{
  "success": true
}

GetEmailMessageResponseDto

id
string
required
Example:
ve9EPM428h8vShlRW1KT
altId
string

External Id

Example:
ve9EPM428h8vShlRW1KT
threadId
string
required

Message Id or thread Id

Example:
ve9EPM428h8vShlRW1KT
locationId
string
required
Example:
ve9EPM428h8vShlRW1KT
contactId
string
required
Example:
ve9EPM428h8vShlRW1KT
conversationId
string
required
Example:
ve9EPM428h8vShlRW1KT
dateAdded
string
required
Example:
2024-03-27T18:13:49.000Z
subject
string
Example:
Order confirm
body
string
required
Example:
Hi there
direction
string
required
Allowed values:
inboundoutbound
status
string
Allowed values:
pendingscheduledsentdeliveredreadundeliveredconnectedfailedopened
contentType
string
required
Example:
text/plain
attachments
array[string]

An array of attachment URLs.

provider
string
Examples:
Leadconnector Gmailmailgunsmtpcustom
from
string
required

Name and Email Id of the sender

to
array[string]
required

List of email Ids of the receivers

cc
array[string]

List of email Ids of the people in the cc field

bcc
array[string]

List of email Ids of the people in the bcc field

replyToMessageId
string

In case of reply, email message Id of the reply to email

source
string

Email source

Allowed values:
workflowbulk_actionscampaignapiapp
conversationProviderId
string

Conversation provider ID

Example:
cI08i1Bls3iTB9bKgF01
Example
{
  "id": "ve9EPM428h8vShlRW1KT",
  "altId": "ve9EPM428h8vShlRW1KT",
  "threadId": "ve9EPM428h8vShlRW1KT",
  "locationId": "ve9EPM428h8vShlRW1KT",
  "contactId": "ve9EPM428h8vShlRW1KT",
  "conversationId": "ve9EPM428h8vShlRW1KT",
  "dateAdded": "2024-03-27T18:13:49.000Z",
  "subject": "Order confirm",
  "body": "Hi there",
  "direction": "inbound",
  "status": "pending",
  "contentType": "text/plain",
  "attachments": [
    "string"
  ],
  "provider": "Leadconnector Gmail",
  "from": "string",
  "to": [
    "string"
  ],
  "cc": [
    "string"
  ],
  "bcc": [
    "string"
  ],
  "replyToMessageId": "string",
  "source": "workflow",
  "conversationProviderId": "cI08i1Bls3iTB9bKgF01"
}