Create thread
curl --request POST \
--url https://productlane.com/api/v2/threads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "<string>",
"contact_email": "jsmith@example.com",
"title": "<string>",
"contact_name": "<string>",
"assignee_id": "<string>",
"company_id": "<string>",
"project_id": "<string>",
"issue_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"notify": {
"slack": true,
"email": true
}
}
'import requests
url = "https://productlane.com/api/v2/threads"
payload = {
"text": "<string>",
"contact_email": "jsmith@example.com",
"title": "<string>",
"contact_name": "<string>",
"assignee_id": "<string>",
"company_id": "<string>",
"project_id": "<string>",
"issue_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"notify": {
"slack": True,
"email": True
}
}
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({
text: '<string>',
contact_email: 'jsmith@example.com',
title: '<string>',
contact_name: '<string>',
assignee_id: '<string>',
company_id: '<string>',
project_id: '<string>',
issue_id: '<string>',
created_at: '2023-11-07T05:31:56Z',
updated_at: '2023-11-07T05:31:56Z',
notify: {slack: true, email: true}
})
};
fetch('https://productlane.com/api/v2/threads', 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",
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([
'text' => '<string>',
'contact_email' => 'jsmith@example.com',
'title' => '<string>',
'contact_name' => '<string>',
'assignee_id' => '<string>',
'company_id' => '<string>',
'project_id' => '<string>',
'issue_id' => '<string>',
'created_at' => '2023-11-07T05:31:56Z',
'updated_at' => '2023-11-07T05:31:56Z',
'notify' => [
'slack' => true,
'email' => true
]
]),
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"
payload := strings.NewReader("{\n \"text\": \"<string>\",\n \"contact_email\": \"jsmith@example.com\",\n \"title\": \"<string>\",\n \"contact_name\": \"<string>\",\n \"assignee_id\": \"<string>\",\n \"company_id\": \"<string>\",\n \"project_id\": \"<string>\",\n \"issue_id\": \"<string>\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"updated_at\": \"2023-11-07T05:31:56Z\",\n \"notify\": {\n \"slack\": true,\n \"email\": true\n }\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")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"<string>\",\n \"contact_email\": \"jsmith@example.com\",\n \"title\": \"<string>\",\n \"contact_name\": \"<string>\",\n \"assignee_id\": \"<string>\",\n \"company_id\": \"<string>\",\n \"project_id\": \"<string>\",\n \"issue_id\": \"<string>\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"updated_at\": \"2023-11-07T05:31:56Z\",\n \"notify\": {\n \"slack\": true,\n \"email\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://productlane.com/api/v2/threads")
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 \"text\": \"<string>\",\n \"contact_email\": \"jsmith@example.com\",\n \"title\": \"<string>\",\n \"contact_name\": \"<string>\",\n \"assignee_id\": \"<string>\",\n \"company_id\": \"<string>\",\n \"project_id\": \"<string>\",\n \"issue_id\": \"<string>\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"updated_at\": \"2023-11-07T05:31:56Z\",\n \"notify\": {\n \"slack\": true,\n \"email\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"title": "<string>",
"text": "<string>",
"origin": "<string>",
"snoozed_until": "<string>",
"last_inbound_message_at": "<string>",
"last_outbound_message_at": "<string>",
"last_state_change_at": "<string>",
"is_read": true,
"contact": {
"id": "<string>",
"email": "<string>",
"name": "<string>",
"image_url": "<string>",
"company_id": "<string>",
"is_subscribed": true,
"external_ids": {
"intercom": "<string>",
"front": "<string>",
"zendesk": "<string>",
"hubspot": "<string>",
"plain": "<string>",
"productboard": "<string>",
"slack_channel": "<string>"
},
"created_at": "<string>",
"updated_at": "<string>"
},
"company": {
"id": "<string>",
"name": "<string>",
"logo_url": "<string>",
"domains": [
"<string>"
],
"size": 123,
"revenue": 123,
"status_id": "<string>",
"status_name": "<string>",
"tier_id": "<string>",
"tier_name": "<string>",
"owner": {
"id": "<string>",
"name": "<string>",
"avatar_url": "<string>"
},
"external_ids": [
"<string>"
],
"created_at": "<string>",
"updated_at": "<string>"
},
"assignee": {
"id": "<string>",
"name": "<string>",
"email": "<string>",
"image_url": "<string>"
},
"reporter": {
"id": "<string>",
"name": "<string>",
"email": "<string>",
"image_url": "<string>"
},
"tags": [
{
"id": "<string>",
"name": "<string>",
"color": "<string>",
"icon": "<string>",
"tag_group_id": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}
],
"customer_needs": [
{
"id": "<string>",
"thread_id": "<string>",
"project_id": "<string>",
"issue_id": "<string>",
"priority": 123,
"created_at": "<string>",
"updated_at": "<string>"
}
],
"external_ids": {
"intercom": "<string>",
"front": "<string>",
"zendesk": "<string>",
"hubspot": "<string>",
"plain": "<string>",
"productboard": "<string>",
"slack_channel": "<string>"
},
"ai_draft_html": "<string>",
"ai_draft_sources": "<array>",
"ai_draft_generated_at": "<string>",
"ai_draft_started_at": "<string>",
"ai_draft_error_at": "<string>"
}{
"message": "<string>",
"code": "<string>",
"issues": [
{
"message": "<string>"
}
]
}Threads
Create thread
Create a new thread for your workspace. Authentication is required. The “text” can be HTML formatted for things like line breaks, lists, formatting and headings.
POST
/
threads
Create thread
curl --request POST \
--url https://productlane.com/api/v2/threads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "<string>",
"contact_email": "jsmith@example.com",
"title": "<string>",
"contact_name": "<string>",
"assignee_id": "<string>",
"company_id": "<string>",
"project_id": "<string>",
"issue_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"notify": {
"slack": true,
"email": true
}
}
'import requests
url = "https://productlane.com/api/v2/threads"
payload = {
"text": "<string>",
"contact_email": "jsmith@example.com",
"title": "<string>",
"contact_name": "<string>",
"assignee_id": "<string>",
"company_id": "<string>",
"project_id": "<string>",
"issue_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"notify": {
"slack": True,
"email": True
}
}
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({
text: '<string>',
contact_email: 'jsmith@example.com',
title: '<string>',
contact_name: '<string>',
assignee_id: '<string>',
company_id: '<string>',
project_id: '<string>',
issue_id: '<string>',
created_at: '2023-11-07T05:31:56Z',
updated_at: '2023-11-07T05:31:56Z',
notify: {slack: true, email: true}
})
};
fetch('https://productlane.com/api/v2/threads', 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",
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([
'text' => '<string>',
'contact_email' => 'jsmith@example.com',
'title' => '<string>',
'contact_name' => '<string>',
'assignee_id' => '<string>',
'company_id' => '<string>',
'project_id' => '<string>',
'issue_id' => '<string>',
'created_at' => '2023-11-07T05:31:56Z',
'updated_at' => '2023-11-07T05:31:56Z',
'notify' => [
'slack' => true,
'email' => true
]
]),
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"
payload := strings.NewReader("{\n \"text\": \"<string>\",\n \"contact_email\": \"jsmith@example.com\",\n \"title\": \"<string>\",\n \"contact_name\": \"<string>\",\n \"assignee_id\": \"<string>\",\n \"company_id\": \"<string>\",\n \"project_id\": \"<string>\",\n \"issue_id\": \"<string>\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"updated_at\": \"2023-11-07T05:31:56Z\",\n \"notify\": {\n \"slack\": true,\n \"email\": true\n }\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")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"<string>\",\n \"contact_email\": \"jsmith@example.com\",\n \"title\": \"<string>\",\n \"contact_name\": \"<string>\",\n \"assignee_id\": \"<string>\",\n \"company_id\": \"<string>\",\n \"project_id\": \"<string>\",\n \"issue_id\": \"<string>\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"updated_at\": \"2023-11-07T05:31:56Z\",\n \"notify\": {\n \"slack\": true,\n \"email\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://productlane.com/api/v2/threads")
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 \"text\": \"<string>\",\n \"contact_email\": \"jsmith@example.com\",\n \"title\": \"<string>\",\n \"contact_name\": \"<string>\",\n \"assignee_id\": \"<string>\",\n \"company_id\": \"<string>\",\n \"project_id\": \"<string>\",\n \"issue_id\": \"<string>\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"updated_at\": \"2023-11-07T05:31:56Z\",\n \"notify\": {\n \"slack\": true,\n \"email\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"title": "<string>",
"text": "<string>",
"origin": "<string>",
"snoozed_until": "<string>",
"last_inbound_message_at": "<string>",
"last_outbound_message_at": "<string>",
"last_state_change_at": "<string>",
"is_read": true,
"contact": {
"id": "<string>",
"email": "<string>",
"name": "<string>",
"image_url": "<string>",
"company_id": "<string>",
"is_subscribed": true,
"external_ids": {
"intercom": "<string>",
"front": "<string>",
"zendesk": "<string>",
"hubspot": "<string>",
"plain": "<string>",
"productboard": "<string>",
"slack_channel": "<string>"
},
"created_at": "<string>",
"updated_at": "<string>"
},
"company": {
"id": "<string>",
"name": "<string>",
"logo_url": "<string>",
"domains": [
"<string>"
],
"size": 123,
"revenue": 123,
"status_id": "<string>",
"status_name": "<string>",
"tier_id": "<string>",
"tier_name": "<string>",
"owner": {
"id": "<string>",
"name": "<string>",
"avatar_url": "<string>"
},
"external_ids": [
"<string>"
],
"created_at": "<string>",
"updated_at": "<string>"
},
"assignee": {
"id": "<string>",
"name": "<string>",
"email": "<string>",
"image_url": "<string>"
},
"reporter": {
"id": "<string>",
"name": "<string>",
"email": "<string>",
"image_url": "<string>"
},
"tags": [
{
"id": "<string>",
"name": "<string>",
"color": "<string>",
"icon": "<string>",
"tag_group_id": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}
],
"customer_needs": [
{
"id": "<string>",
"thread_id": "<string>",
"project_id": "<string>",
"issue_id": "<string>",
"priority": 123,
"created_at": "<string>",
"updated_at": "<string>"
}
],
"external_ids": {
"intercom": "<string>",
"front": "<string>",
"zendesk": "<string>",
"hubspot": "<string>",
"plain": "<string>",
"productboard": "<string>",
"slack_channel": "<string>"
},
"ai_draft_html": "<string>",
"ai_draft_sources": "<array>",
"ai_draft_generated_at": "<string>",
"ai_draft_started_at": "<string>",
"ai_draft_error_at": "<string>"
}{
"message": "<string>",
"code": "<string>",
"issues": [
{
"message": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Thread body (HTML).
Minimum string length:
1Available options:
UNKNOWN, LOW, MEDIUM, HIGH Email of the contact. The contact is upserted by email within the workspace.
Maximum string length:
512Initial status. Defaults to open.
Available options:
open, snoozed, done Defaults to api.
Available options:
in_app, portal, support_portal, email, slack, slack_connect, intercom, intercom_attachment, zendesk, zendesk_attachment, front_attachment, zapier, hubspot, plain, productboard, api, live_chat Applied only when the contact is newly created.
Workspace user id (not a Linear user id).
Side-channel notifications to fire alongside the write (Slack and/or email).
Show child attributes
Show child attributes
Response
Successful response
Available options:
UNKNOWN, LOW, MEDIUM, HIGH Available options:
open, snoozed, done Available options:
open, new, needs-response, my, snoozed, done Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I