curl --request POST \
--url https://productlane.com/api/v2/threads/{thread_id}/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "<string>",
"cc": [
{
"email": "jsmith@example.com",
"name": "",
"mailboxHash": ""
}
],
"bcc": [
{
"email": "jsmith@example.com",
"name": "",
"mailboxHash": ""
}
],
"attachments": [
{
"Name": "<string>",
"ContentType": "<string>",
"Content": "<string>",
"ContentLength": 1,
"ContentID": "<string>"
}
],
"channel_id": "<string>",
"external_message_id": "<string>"
}
'import requests
url = "https://productlane.com/api/v2/threads/{thread_id}/messages"
payload = {
"content": "<string>",
"cc": [
{
"email": "jsmith@example.com",
"name": "",
"mailboxHash": ""
}
],
"bcc": [
{
"email": "jsmith@example.com",
"name": "",
"mailboxHash": ""
}
],
"attachments": [
{
"Name": "<string>",
"ContentType": "<string>",
"Content": "<string>",
"ContentLength": 1,
"ContentID": "<string>"
}
],
"channel_id": "<string>",
"external_message_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
content: '<string>',
cc: [{email: 'jsmith@example.com', name: '', mailboxHash: ''}],
bcc: [{email: 'jsmith@example.com', name: '', mailboxHash: ''}],
attachments: [
{
Name: '<string>',
ContentType: '<string>',
Content: '<string>',
ContentLength: 1,
ContentID: '<string>'
}
],
channel_id: '<string>',
external_message_id: '<string>'
})
};
fetch('https://productlane.com/api/v2/threads/{thread_id}/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://productlane.com/api/v2/threads/{thread_id}/messages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'content' => '<string>',
'cc' => [
[
'email' => 'jsmith@example.com',
'name' => '',
'mailboxHash' => ''
]
],
'bcc' => [
[
'email' => 'jsmith@example.com',
'name' => '',
'mailboxHash' => ''
]
],
'attachments' => [
[
'Name' => '<string>',
'ContentType' => '<string>',
'Content' => '<string>',
'ContentLength' => 1,
'ContentID' => '<string>'
]
],
'channel_id' => '<string>',
'external_message_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://productlane.com/api/v2/threads/{thread_id}/messages"
payload := strings.NewReader("{\n \"content\": \"<string>\",\n \"cc\": [\n {\n \"email\": \"jsmith@example.com\",\n \"name\": \"\",\n \"mailboxHash\": \"\"\n }\n ],\n \"bcc\": [\n {\n \"email\": \"jsmith@example.com\",\n \"name\": \"\",\n \"mailboxHash\": \"\"\n }\n ],\n \"attachments\": [\n {\n \"Name\": \"<string>\",\n \"ContentType\": \"<string>\",\n \"Content\": \"<string>\",\n \"ContentLength\": 1,\n \"ContentID\": \"<string>\"\n }\n ],\n \"channel_id\": \"<string>\",\n \"external_message_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://productlane.com/api/v2/threads/{thread_id}/messages")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"<string>\",\n \"cc\": [\n {\n \"email\": \"jsmith@example.com\",\n \"name\": \"\",\n \"mailboxHash\": \"\"\n }\n ],\n \"bcc\": [\n {\n \"email\": \"jsmith@example.com\",\n \"name\": \"\",\n \"mailboxHash\": \"\"\n }\n ],\n \"attachments\": [\n {\n \"Name\": \"<string>\",\n \"ContentType\": \"<string>\",\n \"Content\": \"<string>\",\n \"ContentLength\": 1,\n \"ContentID\": \"<string>\"\n }\n ],\n \"channel_id\": \"<string>\",\n \"external_message_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://productlane.com/api/v2/threads/{thread_id}/messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"content\": \"<string>\",\n \"cc\": [\n {\n \"email\": \"jsmith@example.com\",\n \"name\": \"\",\n \"mailboxHash\": \"\"\n }\n ],\n \"bcc\": [\n {\n \"email\": \"jsmith@example.com\",\n \"name\": \"\",\n \"mailboxHash\": \"\"\n }\n ],\n \"attachments\": [\n {\n \"Name\": \"<string>\",\n \"ContentType\": \"<string>\",\n \"Content\": \"<string>\",\n \"ContentLength\": 1,\n \"ContentID\": \"<string>\"\n }\n ],\n \"channel_id\": \"<string>\",\n \"external_message_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"thread_id": "<string>",
"channel": "email",
"custom_channel": "<string>",
"deduplicated": true
}{
"message": "<string>",
"code": "<string>",
"issues": [
{
"message": "<string>"
}
]
}Send a message
Send a message on a thread. The channel (email, Slack, live chat, Microsoft Teams) is auto-detected from the thread’s origin and the response includes the channel that was used. Returns 400 with code validation_failed when the matching integration is not configured for the workspace. Requires the messages:write scope; Slack replies need the Pro plan and Teams replies the Scale plan.
curl --request POST \
--url https://productlane.com/api/v2/threads/{thread_id}/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "<string>",
"cc": [
{
"email": "jsmith@example.com",
"name": "",
"mailboxHash": ""
}
],
"bcc": [
{
"email": "jsmith@example.com",
"name": "",
"mailboxHash": ""
}
],
"attachments": [
{
"Name": "<string>",
"ContentType": "<string>",
"Content": "<string>",
"ContentLength": 1,
"ContentID": "<string>"
}
],
"channel_id": "<string>",
"external_message_id": "<string>"
}
'import requests
url = "https://productlane.com/api/v2/threads/{thread_id}/messages"
payload = {
"content": "<string>",
"cc": [
{
"email": "jsmith@example.com",
"name": "",
"mailboxHash": ""
}
],
"bcc": [
{
"email": "jsmith@example.com",
"name": "",
"mailboxHash": ""
}
],
"attachments": [
{
"Name": "<string>",
"ContentType": "<string>",
"Content": "<string>",
"ContentLength": 1,
"ContentID": "<string>"
}
],
"channel_id": "<string>",
"external_message_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
content: '<string>',
cc: [{email: 'jsmith@example.com', name: '', mailboxHash: ''}],
bcc: [{email: 'jsmith@example.com', name: '', mailboxHash: ''}],
attachments: [
{
Name: '<string>',
ContentType: '<string>',
Content: '<string>',
ContentLength: 1,
ContentID: '<string>'
}
],
channel_id: '<string>',
external_message_id: '<string>'
})
};
fetch('https://productlane.com/api/v2/threads/{thread_id}/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://productlane.com/api/v2/threads/{thread_id}/messages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'content' => '<string>',
'cc' => [
[
'email' => 'jsmith@example.com',
'name' => '',
'mailboxHash' => ''
]
],
'bcc' => [
[
'email' => 'jsmith@example.com',
'name' => '',
'mailboxHash' => ''
]
],
'attachments' => [
[
'Name' => '<string>',
'ContentType' => '<string>',
'Content' => '<string>',
'ContentLength' => 1,
'ContentID' => '<string>'
]
],
'channel_id' => '<string>',
'external_message_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://productlane.com/api/v2/threads/{thread_id}/messages"
payload := strings.NewReader("{\n \"content\": \"<string>\",\n \"cc\": [\n {\n \"email\": \"jsmith@example.com\",\n \"name\": \"\",\n \"mailboxHash\": \"\"\n }\n ],\n \"bcc\": [\n {\n \"email\": \"jsmith@example.com\",\n \"name\": \"\",\n \"mailboxHash\": \"\"\n }\n ],\n \"attachments\": [\n {\n \"Name\": \"<string>\",\n \"ContentType\": \"<string>\",\n \"Content\": \"<string>\",\n \"ContentLength\": 1,\n \"ContentID\": \"<string>\"\n }\n ],\n \"channel_id\": \"<string>\",\n \"external_message_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://productlane.com/api/v2/threads/{thread_id}/messages")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"<string>\",\n \"cc\": [\n {\n \"email\": \"jsmith@example.com\",\n \"name\": \"\",\n \"mailboxHash\": \"\"\n }\n ],\n \"bcc\": [\n {\n \"email\": \"jsmith@example.com\",\n \"name\": \"\",\n \"mailboxHash\": \"\"\n }\n ],\n \"attachments\": [\n {\n \"Name\": \"<string>\",\n \"ContentType\": \"<string>\",\n \"Content\": \"<string>\",\n \"ContentLength\": 1,\n \"ContentID\": \"<string>\"\n }\n ],\n \"channel_id\": \"<string>\",\n \"external_message_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://productlane.com/api/v2/threads/{thread_id}/messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"content\": \"<string>\",\n \"cc\": [\n {\n \"email\": \"jsmith@example.com\",\n \"name\": \"\",\n \"mailboxHash\": \"\"\n }\n ],\n \"bcc\": [\n {\n \"email\": \"jsmith@example.com\",\n \"name\": \"\",\n \"mailboxHash\": \"\"\n }\n ],\n \"attachments\": [\n {\n \"Name\": \"<string>\",\n \"ContentType\": \"<string>\",\n \"Content\": \"<string>\",\n \"ContentLength\": 1,\n \"ContentID\": \"<string>\"\n }\n ],\n \"channel_id\": \"<string>\",\n \"external_message_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"thread_id": "<string>",
"channel": "email",
"custom_channel": "<string>",
"deduplicated": true
}{
"message": "<string>",
"code": "<string>",
"issues": [
{
"message": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
Message body (HTML).
1Applied only to email-channel threads.
Show child attributes
Show child attributes
Applied only to email-channel threads.
Show child attributes
Show child attributes
Applied only to email-channel threads.
Show child attributes
Show child attributes
Slack channel id. Required for Slack threads unless one is stored on the thread.
user (default) sends the message as your workspace user. On a custom thread nothing is delivered: message.sent carries the reply to your integration. contact records the message as inbound from the thread's contact. On email and live chat threads that triggers nothing; on a custom thread it works like an inbound email: the thread reopens, notifications fire and the AI agent may answer. Not supported on Slack and Teams threads.
user, contact Custom channel threads only: your id for an inbound message. A repeat with the same id returns the stored message and creates nothing.
1 - 255Response
Successful response
email, slack, live_chat, teams, custom Channel name on a custom thread, such as whatsapp.
True when external_message_id matched a stored message and nothing new was created.