> ## 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.

# Link thread to issues or projects

> Link a thread to one or more issues and/or projects via Linear's customer-need pipeline. Requires Linear to be connected and the threads:write scope.



## OpenAPI

````yaml post /threads/{thread_id}/customer-needs
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/{thread_id}/customer-needs:
    post:
      tags:
        - threads
      summary: Link thread to issues or projects
      description: >-
        Link a thread to one or more issues and/or projects via Linear's
        customer-need pipeline. Requires Linear to be connected and the
        threads:write scope.
      operationId: threads-linkCustomerNeed
      parameters:
        - name: thread_id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                issue_ids:
                  type: array
                  items:
                    type: string
                  description: >-
                    Productlane issue ids to link this thread to. Combined with
                    `project_ids`, at least one id must be provided.
                project_ids:
                  type: array
                  items:
                    type: string
                  description: >-
                    Productlane project ids to link this thread to. Combined
                    with `issue_ids`, at least one id must be provided.
                priority:
                  type: integer
                  minimum: 0
                  description: >-
                    Linear's `CustomerNeed.importance` applied to every created
                    link. Defaults to 0.
              additionalProperties: false
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  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
                required:
                  - customer_needs
                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

````