Send a new message
Post the necessary fields for the API to send a new message.
POST
/
conversations
/
messages
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"
}
'const options = {
method: 'POST',
headers: {
Version: '<version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
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'
})
};
fetch('https://services.leadconnectorhq.com/conversations/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://services.leadconnectorhq.com/conversations/messages"
payload = {
"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"
}
headers = {
"Version": "<version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"conversationId": "ABC12h2F6uBrIkfXYazb",
"messageId": "t22c6DQcTDf3MjRhwf77",
"emailMessageId": "rnGyqh2F6uBrIkfhFo9A",
"messageIds": [
"<string>"
],
"msg": "Message queued successfully."
}{
"statusCode": 400,
"message": "Bad Request"
}{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}Authorizations
Body
application/json
Response
Created the message
Last modified on March 8, 2026
Was this page helpful?
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"
}
'const options = {
method: 'POST',
headers: {
Version: '<version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
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'
})
};
fetch('https://services.leadconnectorhq.com/conversations/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://services.leadconnectorhq.com/conversations/messages"
payload = {
"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"
}
headers = {
"Version": "<version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"conversationId": "ABC12h2F6uBrIkfXYazb",
"messageId": "t22c6DQcTDf3MjRhwf77",
"emailMessageId": "rnGyqh2F6uBrIkfhFo9A",
"messageIds": [
"<string>"
],
"msg": "Message queued successfully."
}{
"statusCode": 400,
"message": "Bad Request"
}{
"statusCode": 401,
"message": "Invalid token: access token is invalid",
"error": "Unauthorized"
}