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

# Update thread

> Update a thread. Requires the threads:write scope.



## OpenAPI

````yaml openapi-v2.json patch /threads/{id}
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/{id}:
    patch:
      tags:
        - threads
      summary: Update thread
      description: Update a thread. Requires the threads:write scope.
      operationId: threads-update
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                text:
                  type: string
                  minLength: 1
                title:
                  type: string
                  maxLength: 512
                  nullable: true
                pain_level:
                  type: string
                  enum:
                    - UNKNOWN
                    - LOW
                    - MEDIUM
                    - HIGH
                assignee_id:
                  type: string
                  nullable: true
                  description: Workspace user id. Pass `null` to unassign.
                contact_id:
                  type: string
                company_id:
                  type: string
                  nullable: true
                  description: >-
                    Pass `null` to detach. Also propagates onto the thread's
                    contact.
                tag_ids:
                  type: array
                  items:
                    type: string
                  description: Replaces the thread's full tag set.
                project_id:
                  type: string
                  nullable: true
                status:
                  type: string
                  enum:
                    - open
                    - snoozed
                    - done
                  description: When `snoozed`, `snoozed_until` is required.
                snoozed_until:
                  type: string
                  format: date-time
                closed_loop:
                  type: boolean
                  description: With `status=done`, marks the thread as fully closed.
                ai_draft_html:
                  type: string
                  nullable: true
                  description: >-
                    HTML body prefilled into the composer for the next outbound
                    reply. Setting this stamps `ai_draft_generated_at` and
                    clears `ai_draft_started_at` + `ai_draft_error_at`. Pass
                    `null` (or an empty string) to clear the draft.
                ai_draft_sources:
                  type: array
                  nullable: true
                  description: >-
                    Sources the AI consulted while generating the draft.
                    Surfaces in the composer's "Drafted by AI" tooltip. Shape:
                    `{ type, title, identifier?, url? }[]`. Pass `null` to
                    clear.
                clear_ai_draft_error:
                  type: boolean
                  description: >-
                    When `true`, clears `ai_draft_error_at`. Use this to dismiss
                    a stuck error pill in the composer without writing a new
                    draft.
                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).
              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

````