Skip to main content
POST
/
insights
Create thread
curl --request POST \
  --url https://productlane.com/api/v1/insights \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "title": "<string>",
  "text": "<string>",
  "painLevel": "UNKNOWN",
  "origin": "API",
  "contactEmail": "jsmith@example.com",
  "contactName": "<string>",
  "projectId": "<string>",
  "notify": {
    "slack": true,
    "email": true
  }
}'
{
  "id": "<string>",
  "text": "<string>",
  "title": "<string>",
  "painLevel": "<string>",
  "origin": "<string>",
  "contactEmail": "<string>",
  "contactName": "<string>",
  "projectId": "<string>",
  "state": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "workspaceId": "<string>"
}

Create Thread

Create a new thread (note) for your workspace. The text can be HTML formatted for things like line breaks, lists, formatting and headings.

Request Body

text
string
required
Thread content (minimum 1 character). Can be HTML formatted for line breaks, lists, formatting and headings.
painLevel
string
required
Pain level associated with this thread
contactEmail
string
required
Email address of the contact who provided this thread
title
string
Optional title for the thread
origin
string
Source of the thread
contactName
string
Name of the contact who provided this thread
projectId
string
ID of the project this thread is related to
notify
object
Notification preferences
notify.slack
boolean
Whether to send Slack notification
notify.email
boolean
Whether to send email notification

Response

id
string
Unique identifier for the created thread
text
string
Thread content
title
string
Thread title
painLevel
string
Pain level of the thread
origin
string
Source of the thread
contactEmail
string
Email of the contact who provided the thread
contactName
string
Name of the contact who provided the thread
projectId
string
ID of the related project
state
string
Current state of the thread (NEW, PROCESSED, COMPLETED, SNOOZED, UNSNOOZED)
createdAt
string
Timestamp when the thread was created
updatedAt
string
Timestamp when the thread was last updated
workspaceId
string
ID of the workspace this thread belongs to

Example Request

{
  "text": "The current dashboard is too cluttered and hard to navigate. Users are struggling to find the most important metrics.",
  "painLevel": "HIGH",
  "contactEmail": "john@acme.com",
  "title": "Dashboard Navigation Issues",
  "origin": "API",
  "contactName": "John Doe",
  "projectId": "proj_123",
  "notify": {
    "slack": true,
    "email": false
  }
}

Example Response

{
  "id": "insight_123456789",
  "text": "The current dashboard is too cluttered and hard to navigate. Users are struggling to find the most important metrics.",
  "title": "Dashboard Navigation Issues",
  "painLevel": "HIGH",
  "origin": "API",
  "contactEmail": "john@acme.com",
  "contactName": "John Doe",
  "projectId": "proj_123",
  "state": "NEW",
  "createdAt": "2024-01-15T10:30:00Z",
  "updatedAt": "2024-01-15T10:30:00Z",
  "workspaceId": "ws_123456789"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
text
string
required
Minimum length: 1
painLevel
enum<string>
required
Available options:
UNKNOWN,
LOW,
MEDIUM,
HIGH
contactEmail
string<email>
required
title
string
origin
enum<string>
Available options:
API,
INAPP,
PORTAL,
SLACK,
SLACK_CONNECT,
INTERCOM,
INTERCOM_ATTACHMENT,
ZENDESK_ATTACHMENT,
FRONT_ATTACHMENT,
EMAIL,
ZAPIER,
HUBSPOT,
PLAIN,
CALENDAR,
WIDGET
contactName
string
projectId
string
notify
object

Response

Successful response

id
string
required
text
string
required
title
string
required
painLevel
string
required
origin
string
required
contactEmail
string
required
contactName
string
required
projectId
string
required
state
string
required
createdAt
string<date-time>
required
updatedAt
string<date-time>
required
workspaceId
string
required