---
title: "Update a thread (subject, status)"
method: PATCH
path: "/companies/{companyId}/threads/{threadId}"
tags: ["Threads"]
---

# Update a thread (subject, status)

`PATCH /companies/{companyId}/threads/{threadId}`

## Request

- Base URL: `https://api.medianfi.com/api/v1`
- URL: `https://api.medianfi.com/api/v1/companies/{companyId}/threads/{threadId}`
- Auth: HTTP bearer

## Request body

- UpdateThreadInput
  - `subject` string
  - `status` 'open' | 'resolved'

## Response `200`

Thread updated

- ThreadResponse
  - `success` boolean
  - `data` Thread
    - `id` string, uuid
    - `companyId` string, uuid
    - `subject` string
    - `status` 'open' | 'resolved'
    - `agentType` 'human' | 'ai'
    - `agentName` string, nullable
    - `initiatedByUserId` string, uuid, nullable
    - `createdBy` string, uuid, nullable
    - `resolvedBy` string, uuid, nullable
    - `resolvedAt` string, date-time, nullable
    - `lastActivityAt` string, date-time
    - `lastMessageAt` string, date-time, nullable
    - `updatedAt` string, date-time
    - `createdAt` string, date-time

## Other responses

- `401`: Authentication required
- `403`: Insufficient permissions or not a company member
- `404`: Thread not found
- `422`: Validation error

---

[API](https://skmtc.dev/medianfi/apis/median-api.md) · [All operations](https://skmtc.dev/medianfi/apis/median-api/llms.txt) · [OpenAPI document](https://skmtc.dev/medianfi/apis/median-api/revisions/20090ea32b0d?raw)
