Create thread
Create a thread and upsert its contact by email, or import a full conversation with messages. Requires the threads:write scope.
curl -X POST "https://productlane.com/api/v2/threads" \
-H "Authorization: Bearer $PRODUCTLANE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"pain_level": "UNKNOWN"
}'Authorization
AuthorizationstringheaderrequiredBearer authentication header of the form
Bearer <token>, where<token>is your auth token.
Body
external_idsstring[]Caller-owned identifiers. Replaces the full set.
titlestringtextstringThread body (HTML). Required unless
messagesis sent.messagesobject[]Imports an existing conversation instead of
text, stored as the channel's own messages. Nothing is sent, and no auto-reply, notification or Linear update runs.pain_levelenum<string>requiredOne of:UNKNOWNLOWMEDIUMHIGHstatusenum<string>Initial status. Defaults to
open.One of:opensnoozeddoneoriginenum<string>Defaults to
api. Usecustomwithcustom_channelfor a channel you connect yourself, such as WhatsApp or SMS.One of:in_appportalsupport_portalemailslackslack_connectintercomintercom_attachmentzendeskzendesk_attachmentfront_attachmentzapierhubspotplainapilive_chatai_chatcalendarwidgetteamslinearupvotecustomcustom_channelstringRequired when
originiscustom: a lowercase name such aswhatsapporsms(1 to 32 characters,a-z,0-9,_,-). The inbox shows it as the thread source.contact_emailstring<email>Email of the contact. The contact is upserted by email within the workspace. Send this or
contact_external_id.contact_external_idstringYour id for a contact without an email, such as
whatsapp:+61400111222. The contact is upserted by it and never receives email. Send this orcontact_email.contact_namestringApplied only when the contact is newly created.
assignee_idstringWorkspace user id (not a Linear user id).
company_idstringproject_idstringissue_idstringcreated_atstring<date-time>updated_atstring<date-time>notifyobjectSide-channel notifications to fire alongside the write (Slack and/or email).
Response
Successful response
idstringrequirednumberinteger | nullrequiredTicket number shown to customers as
#123. Unique per workspace.created_atstringrequiredupdated_atstringrequiredtitlestring | nullrequiredtextstringrequiredpain_levelenum<string>requiredOne of:UNKNOWNLOWMEDIUMHIGHoriginstringrequiredcustom_channelstring | nullrequiredChannel name when
originiscustom, such aswhatsapp.statusenum<string>requiredOne of:opensnoozeddonetabenum<string>requiredOne of:opennewneeds-responsemysnoozeddonesnoozed_untilstring | nullrequiredlast_inbound_message_atstring | nullrequiredlast_outbound_message_atstring | nullrequiredlast_state_change_atstring | nullrequiredis_readbooleanrequiredcontactobject | nullrequiredcompanyobject | nullrequiredassigneeobject | nullrequiredreporterobject | nullrequiredtagsobject[]requiredcustomer_needsobject[]requiredexternal_idsstring[]requiredCaller-owned cross-system identifiers (CRM ids, etc.). Replaced wholesale on create/update.
integration_idsobjectrequiredai_draft_htmlstring | nullrequiredai_draft_sourcesany[] | nullrequiredai_draft_generated_atstring | nullrequiredai_draft_started_atstring | nullrequiredai_draft_error_atstring | nullrequired
{
"id": "string",
"number": 0,
"created_at": "string",
"updated_at": "string",
"title": "string",
"text": "string",
"pain_level": "UNKNOWN",
"origin": "string",
"custom_channel": "string",
"status": "open",
"tab": "open",
"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": [
"string"
],
"integration_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": 0,
"revenue": 0,
"status_id": "string",
"status_name": "string",
"tier_id": "string",
"tier_name": "string",
"owner": {
"id": "string",
"name": "string",
"avatar_url": "string"
},
"external_ids": [
"string"
],
"integration_ids": {
"intercom": "string",
"front": "string",
"zendesk": "string",
"hubspot": "string",
"plain": "string",
"productboard": "string",
"slack_channel": "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": 0,
"created_at": "string",
"updated_at": "string"
}
],
"external_ids": [
"string"
],
"integration_ids": {
"intercom": "string",
"front": "string",
"zendesk": "string",
"hubspot": "string",
"plain": "string",
"productboard": "string",
"slack_channel": "string"
},
"ai_draft_html": "string",
"ai_draft_sources": [
null
],
"ai_draft_generated_at": "string",
"ai_draft_started_at": "string",
"ai_draft_error_at": "string"
}