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

# Update a thread

> Update a thread’s status or assignee. Each change is recorded as a timeline entry.



## OpenAPI

````yaml openapi-core.json POST /v1/threads/{id}
openapi: 3.1.0
info:
  title: Yorlet Core API
  description: Core platform APIs including buildings, customers, units, and tasks.
  version: 1.0.0
servers:
  - url: https://api.yorlet.com
    description: Production
  - url: https://api.yorlet.io
    description: Sandbox
security: []
paths:
  /v1/threads/{id}:
    post:
      tags:
        - Threads
      summary: Update a thread
      description: >-
        Update a thread’s status or assignee. Each change is recorded as a
        timeline entry.
      operationId: threads_update
      parameters:
        - schema:
            type: string
            description: The id identifier.
          required: true
          description: The id identifier.
          name: id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                assignee:
                  type:
                    - string
                    - 'null'
                  description: The user id to assign this thread to, or `null` to unassign.
                status:
                  type: string
                  enum:
                    - open
                    - closed
                  description: Whether the thread is open or closed.
      responses:
        '200':
          description: Returns the updated thread object.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Unique identifier for the object.
                  created:
                    type: number
                    description: >-
                      Time at which the object was created. Measured in seconds
                      since the Unix epoch.
                  account:
                    type: string
                    description: >-
                      The account that the object belongs to. Only returned if
                      the request is made with a valid Yorlet-Context header.
                  deleted:
                    type: boolean
                    default: false
                    description: Only returned if the object has been deleted.
                  object:
                    type: string
                    enum:
                      - thread
                  assignee:
                    type:
                      - string
                      - 'null'
                    description: The user this thread is assigned to, if any.
                  channel:
                    type: string
                    enum:
                      - email
                    description: >-
                      The communication channel for this thread. `email` today;
                      additional channels may be added later.
                  counterparty:
                    type: string
                    description: >-
                      The other party’s address on this channel (email address
                      today, phone number later).
                  customer:
                    anyOf:
                      - type: string
                      - type: object
                        additionalProperties: {}
                      - type: 'null'
                    description: The matched customer, if the counterparty resolved to one.
                  email:
                    type: object
                    properties:
                      address:
                        anyOf:
                          - type: string
                          - type: object
                            additionalProperties: {}
                        description: The account email address used on this thread.
                      subject:
                        type:
                          - string
                          - 'null'
                        description: The email subject (thread title for email today).
                    description: Email-specific fields. Present when `channel` is `email`.
                    required:
                      - address
                      - subject
                  last_message_at:
                    type:
                      - integer
                      - 'null'
                    description: When the most recent message was sent or received.
                  metadata:
                    type:
                      - object
                      - 'null'
                    additionalProperties:
                      type: string
                    description: >-
                      Set of key-value pairs that you can attach to an object.
                      This can be useful for storing additional information
                      about the object in a structured format.
                  owner:
                    anyOf:
                      - type: string
                      - type: object
                        additionalProperties: {}
                      - type: 'null'
                    description: The matched owner, if the counterparty resolved to one.
                  status:
                    type: string
                    enum:
                      - open
                      - closed
                    description: Whether the thread is open or closed.
                  timeline_entries:
                    type: object
                    properties:
                      count:
                        type: number
                        description: Total number of items in the list.
                        example: 1
                      has_more:
                        type: boolean
                        description: Whether more items are available.
                        example: false
                      object:
                        type: string
                        enum:
                          - list
                      data:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              description: Unique identifier for the object.
                            created:
                              type: number
                              description: >-
                                Time at which the object was created. Measured
                                in seconds since the Unix epoch.
                            account:
                              type: string
                              description: >-
                                The account that the object belongs to. Only
                                returned if the request is made with a valid
                                Yorlet-Context header.
                            deleted:
                              type: boolean
                              default: false
                              description: Only returned if the object has been deleted.
                            object:
                              type: string
                              enum:
                                - timeline_entry
                            assignee_change:
                              type: object
                              properties:
                                from:
                                  type:
                                    - string
                                    - 'null'
                                  description: >-
                                    The previous assignee user id, or `null` if
                                    the thread was unassigned.
                                to:
                                  type:
                                    - string
                                    - 'null'
                                  description: >-
                                    The assignee user id after the change, or
                                    `null` if the thread was unassigned.
                              description: Present when `type` is `assignee_change`.
                              required:
                                - from
                                - to
                            message:
                              anyOf:
                                - type: string
                                - type: object
                                  additionalProperties: {}
                                - type: 'null'
                              description: >-
                                Present when `type` is `message`. The message
                                id, or the message object when expanded.
                            occurred_at:
                              type: integer
                              description: >-
                                When this activity occurred. Measured in seconds
                                since the Unix epoch.
                            status_change:
                              type: object
                              properties:
                                from:
                                  type:
                                    - string
                                    - 'null'
                                  enum:
                                    - open
                                    - closed
                                    - null
                                  description: >-
                                    The previous status, or `null` if none was
                                    set.
                                to:
                                  type: string
                                  enum:
                                    - open
                                    - closed
                                  description: The status after the change.
                              description: Present when `type` is `status_change`.
                              required:
                                - from
                                - to
                            thread:
                              anyOf:
                                - type: string
                                - type: object
                                  additionalProperties: {}
                              description: The thread this entry belongs to.
                            type:
                              type: string
                              enum:
                                - message
                                - status_change
                                - assignee_change
                              description: >-
                                What this entry records. Channel activity is
                                `message`; `status_change` and `assignee_change`
                                are thread events.
                          required:
                            - id
                            - created
                            - object
                            - occurred_at
                            - thread
                            - type
                    description: >-
                      The first page of timeline entries, newest first. Omitted
                      unless `include[]=timeline_entries`.
                    required:
                      - count
                      - has_more
                      - object
                      - data
                required:
                  - id
                  - created
                  - object
                  - assignee
                  - channel
                  - counterparty
                  - customer
                  - last_message_at
                  - owner
                  - status
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: API Key authentication. Use "Bearer YOUR_API_KEY".

````