> ## 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 threads in bulk

> Apply one patch to up to 100 threads. The batch counts as a single write against the rate limit and reports per-thread rejects in `failed`. Requires the threads:write scope.



## OpenAPI

````yaml openapi-v2.json post /threads/bulk-update
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/bulk-update:
    post:
      tags:
        - threads
      summary: Update threads in bulk
      description: >-
        Apply one patch to up to 100 threads. The batch counts as a single write
        against the rate limit and reports per-thread rejects in `failed`.
        Requires the threads:write scope.
      operationId: threads-bulkUpdate
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                external_ids:
                  type: array
                  items:
                    type: string
                  description: Caller-owned identifiers. Replaces the full set.
                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).
                ids:
                  type: array
                  items:
                    type: string
                  minItems: 1
                  maxItems: 100
                  description: >-
                    Thread ids, at most 100. The whole batch counts as one write
                    against the rate limit.
              required:
                - ids
              additionalProperties: false
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  updated:
                    type: array
                    items:
                      type: string
                  failed:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        code:
                          type: string
                        message:
                          type: string
                      required:
                        - id
                        - code
                        - message
                      additionalProperties: false
                required:
                  - updated
                  - failed
                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

````