curl --request POST \
--url https://services.leadconnectorhq.com/conversations/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Version: <version>' \
--data '
{
"type": "Email",
"contactId": "abc123def456",
"appointmentId": "appt123",
"attachments": [
"https://storage.com/file1.pdf",
"https://storage.com/file2.jpg"
],
"emailFrom": "sender@company.com",
"emailCc": [
"cc1@company.com",
"cc2@company.com"
],
"emailBcc": [
"bcc1@company.com",
"bcc2@company.com"
],
"html": "<p>Hello World</p>",
"message": "Hello, how can I help you today?",
"subject": "Important Update",
"replyMessageId": "msg123",
"templateId": "template123",
"threadId": "thread123",
"scheduledTimestamp": 1669287863,
"conversationProviderId": "provider123",
"emailTo": "recipient@company.com",
"emailReplyMode": "reply_all",
"fromNumber": "+1499499299",
"toNumber": "+1439499299"
}
'{
"conversationId": "ABC12h2F6uBrIkfXYazb",
"messageId": "t22c6DQcTDf3MjRhwf77",
"emailMessageId": "rnGyqh2F6uBrIkfhFo9A",
"messageIds": [
"<string>"
],
"msg": "Message queued successfully."
}Post the necessary fields for the API to send a new message.
curl --request POST \
--url https://services.leadconnectorhq.com/conversations/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Version: <version>' \
--data '
{
"type": "Email",
"contactId": "abc123def456",
"appointmentId": "appt123",
"attachments": [
"https://storage.com/file1.pdf",
"https://storage.com/file2.jpg"
],
"emailFrom": "sender@company.com",
"emailCc": [
"cc1@company.com",
"cc2@company.com"
],
"emailBcc": [
"bcc1@company.com",
"bcc2@company.com"
],
"html": "<p>Hello World</p>",
"message": "Hello, how can I help you today?",
"subject": "Important Update",
"replyMessageId": "msg123",
"templateId": "template123",
"threadId": "thread123",
"scheduledTimestamp": 1669287863,
"conversationProviderId": "provider123",
"emailTo": "recipient@company.com",
"emailReplyMode": "reply_all",
"fromNumber": "+1499499299",
"toNumber": "+1439499299"
}
'{
"conversationId": "ABC12h2F6uBrIkfXYazb",
"messageId": "t22c6DQcTDf3MjRhwf77",
"emailMessageId": "rnGyqh2F6uBrIkfhFo9A",
"messageIds": [
"<string>"
],
"msg": "Message queued successfully."
}Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.
API Version
2021-04-15 Type of message being sent
SMS, Email, WhatsApp, IG, FB, Custom, Live_Chat "Email"
ID of the contact receiving the message
"abc123def456"
ID of the associated appointment
"appt123"
Array of attachment URLs
[
"https://storage.com/file1.pdf",
"https://storage.com/file2.jpg"
]Email address to send from
"sender@company.com"
Array of CC email addresses
["cc1@company.com", "cc2@company.com"]Array of BCC email addresses
["bcc1@company.com", "bcc2@company.com"]HTML content of the message
"<p>Hello World</p>"
Text content of the message
"Hello, how can I help you today?"
Subject line for email messages
"Important Update"
ID of message being replied to
"msg123"
ID of message template
"template123"
ID of message thread. For email messages, this is the message ID that contains multiple email messages in the thread
"thread123"
UTC Timestamp (in seconds) at which the message should be scheduled
1669287863
ID of conversation provider
"provider123"
Email address to send to, if different from contact's primary email. This should be a valid email address associated with the contact.
"recipient@company.com"
Mode for email replies
reply, reply_all "reply_all"
Phone number used as the sender number for outbound messages
"+1499499299"
Recipient phone number for outbound messages
"+1439499299"
Created the message
Conversation ID.
"ABC12h2F6uBrIkfXYazb"
This is the main Message ID
"t22c6DQcTDf3MjRhwf77"
This contains the email message id (only for Email type). Use this ID to send inbound replies to Hoop to create a threaded email.
"rnGyqh2F6uBrIkfhFo9A"
When sending via the GMB channel, we will be returning list of messageIds instead of single messageId.
Additional response message when sending a workflow message
"Message queued successfully."
Was this page helpful?