> ## Documentation Index
> Fetch the complete documentation index at: https://productlane.mintlify.site/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Create thread

> Create a thread and upsert its contact by email. Requires the threads:write scope.



## OpenAPI

````yaml openapi-v2.json post /threads
openapi: 3.0.3
info:
  title: Productlane API
  description: Productlane API v2.
  version: 2.0.0
servers:
  - url: https://productlane.com/api/v2
security: []
paths:
  /threads:
    post:
      tags:
        - threads
      summary: Create thread
      description: >-
        Create a thread and upsert its contact by email. Requires the
        threads:write scope.
      operationId: threads-create
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  maxLength: 512
                text:
                  type: string
                  minLength: 1
                  description: Thread body (HTML).
                pain_level:
                  type: string
                  enum:
                    - UNKNOWN
                    - LOW
                    - MEDIUM
                    - HIGH
                status:
                  type: string
                  enum:
                    - open
                    - snoozed
                    - done
                  description: Initial status. Defaults to `open`.
                origin:
                  type: string
                  enum:
                    - in_app
                    - portal
                    - support_portal
                    - email
                    - slack
                    - slack_connect
                    - intercom
                    - intercom_attachment
                    - zendesk
                    - zendesk_attachment
                    - front_attachment
                    - zapier
                    - hubspot
                    - plain
                    - productboard
                    - api
                    - live_chat
                  description: Defaults to `api`.
                contact_email:
                  type: string
                  format: email
                  description: >-
                    Email of the contact. The contact is upserted by email
                    within the workspace.
                contact_name:
                  type: string
                  description: Applied only when the contact is newly created.
                assignee_id:
                  type: string
                  description: Workspace user id (not a Linear user id).
                company_id:
                  type: string
                project_id:
                  type: string
                issue_id:
                  type: string
                created_at:
                  type: string
                  format: date-time
                updated_at:
                  type: string
                  format: date-time
                notify:
                  type: object
                  properties:
                    slack:
                      type: boolean
                    email:
                      type: boolean
                  additionalProperties: false
                  description: >-
                    Side-channel notifications to fire alongside the write
                    (Slack and/or email).
              required:
                - text
                - pain_level
                - contact_email
              additionalProperties: false
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  created_at:
                    type: string
                  updated_at:
                    type: string
                  title:
                    type: string
                    nullable: true
                  text:
                    type: string
                  pain_level:
                    type: string
                    enum:
                      - UNKNOWN
                      - LOW
                      - MEDIUM
                      - HIGH
                  origin:
                    type: string
                  status:
                    type: string
                    enum:
                      - open
                      - snoozed
                      - done
                  tab:
                    type: string
                    enum:
                      - open
                      - new
                      - needs-response
                      - my
                      - snoozed
                      - done
                  snoozed_until:
                    type: string
                    nullable: true
                  last_inbound_message_at:
                    type: string
                    nullable: true
                  last_outbound_message_at:
                    type: string
                    nullable: true
                  last_state_change_at:
                    type: string
                    nullable: true
                  is_read:
                    type: boolean
                  contact:
                    type: object
                    properties:
                      id:
                        type: string
                      email:
                        type: string
                      name:
                        type: string
                        nullable: true
                      image_url:
                        type: string
                        nullable: true
                      company_id:
                        type: string
                        nullable: true
                      is_subscribed:
                        type: boolean
                      external_ids:
                        type: object
                        properties:
                          intercom:
                            type: string
                          front:
                            type: string
                          zendesk:
                            type: string
                          hubspot:
                            type: string
                          plain:
                            type: string
                          productboard:
                            type: string
                          slack_channel:
                            type: string
                        additionalProperties: false
                      created_at:
                        type: string
                      updated_at:
                        type: string
                    required:
                      - id
                      - email
                      - name
                      - image_url
                      - company_id
                      - is_subscribed
                      - external_ids
                      - created_at
                      - updated_at
                    additionalProperties: false
                    nullable: true
                  company:
                    type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      logo_url:
                        type: string
                        nullable: true
                      domains:
                        type: array
                        items:
                          type: string
                      size:
                        type: number
                        nullable: true
                      revenue:
                        type: number
                        nullable: true
                      status_id:
                        type: string
                        nullable: true
                      status_name:
                        type: string
                        nullable: true
                      tier_id:
                        type: string
                        nullable: true
                      tier_name:
                        type: string
                        nullable: true
                      owner:
                        type: object
                        properties:
                          id:
                            type: string
                          name:
                            type: string
                            nullable: true
                          avatar_url:
                            type: string
                            nullable: true
                        required:
                          - id
                          - name
                          - avatar_url
                        additionalProperties: false
                        nullable: true
                      external_ids:
                        type: array
                        items:
                          type: string
                        description: >-
                          Caller-owned cross-system identifiers (CRM ids, etc.).
                          Replaced wholesale on create/update.
                      created_at:
                        type: string
                      updated_at:
                        type: string
                    required:
                      - id
                      - name
                      - logo_url
                      - domains
                      - size
                      - revenue
                      - status_id
                      - status_name
                      - tier_id
                      - tier_name
                      - owner
                      - external_ids
                      - created_at
                      - updated_at
                    additionalProperties: false
                    nullable: true
                  assignee:
                    type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                        nullable: true
                      email:
                        type: string
                      image_url:
                        type: string
                        nullable: true
                    required:
                      - id
                      - name
                      - email
                      - image_url
                    additionalProperties: false
                    nullable: true
                  reporter:
                    type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                        nullable: true
                      email:
                        type: string
                      image_url:
                        type: string
                        nullable: true
                    required:
                      - id
                      - name
                      - email
                      - image_url
                    additionalProperties: false
                    nullable: true
                  tags:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        color:
                          type: string
                        icon:
                          type: string
                          nullable: true
                          description: >-
                            Name of a Nucleo icon (PascalCase, e.g. `Notepad`,
                            `Atom`). Must be a valid icon from
                            https://nucleoapp.com - unknown names will not
                            render in the dashboard or portal.
                        tag_group_id:
                          type: string
                          nullable: true
                        created_at:
                          type: string
                        updated_at:
                          type: string
                      required:
                        - id
                        - name
                        - color
                        - icon
                        - tag_group_id
                        - created_at
                        - updated_at
                      additionalProperties: false
                  customer_needs:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        thread_id:
                          type: string
                        project_id:
                          type: string
                          nullable: true
                        issue_id:
                          type: string
                          nullable: true
                        priority:
                          type: number
                        created_at:
                          type: string
                        updated_at:
                          type: string
                      required:
                        - id
                        - thread_id
                        - project_id
                        - issue_id
                        - priority
                        - created_at
                        - updated_at
                      additionalProperties: false
                  external_ids:
                    type: object
                    properties:
                      intercom:
                        type: string
                      front:
                        type: string
                      zendesk:
                        type: string
                      hubspot:
                        type: string
                      plain:
                        type: string
                      productboard:
                        type: string
                      slack_channel:
                        type: string
                    additionalProperties: false
                  ai_draft_html:
                    type: string
                    nullable: true
                  ai_draft_sources:
                    type: array
                    nullable: true
                  ai_draft_generated_at:
                    type: string
                    nullable: true
                  ai_draft_started_at:
                    type: string
                    nullable: true
                  ai_draft_error_at:
                    type: string
                    nullable: true
                required:
                  - id
                  - created_at
                  - updated_at
                  - title
                  - text
                  - pain_level
                  - origin
                  - status
                  - tab
                  - snoozed_until
                  - last_inbound_message_at
                  - last_outbound_message_at
                  - last_state_change_at
                  - is_read
                  - contact
                  - company
                  - assignee
                  - reporter
                  - tags
                  - customer_needs
                  - external_ids
                  - ai_draft_html
                  - ai_draft_sources
                  - ai_draft_generated_at
                  - ai_draft_started_at
                  - ai_draft_error_at
                additionalProperties: false
        default:
          $ref: '#/components/responses/error'
      security:
        - Authorization: []
components:
  responses:
    error:
      description: Error response
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
              code:
                type: string
              issues:
                type: array
                items:
                  type: object
                  properties:
                    message:
                      type: string
                  required:
                    - message
                  additionalProperties: false
            required:
              - message
              - code
            additionalProperties: false
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer

````