---
title: "Update topic"
method: PATCH
path: "/topics/{topicId}"
tags: ["Topics"]
---

# Update topic

`PATCH /topics/{topicId}`

## Request

- Base URL: `https://api.modem.dev/v1`
- URL: `https://api.modem.dev/v1/topics/{topicId}`
- Auth: HTTP bearer

Update a single topic. Supports changing priority, lifecycle state, archiving (archived=true), and unarchiving (archived=false). At least one field must be provided. issueType and keywords are derived by the topic pipeline and cannot be set; sending either returns 400. A topic archived in the v1 to v2 migration returns 404 with data.reason archived_in_v1_to_v2_migration.

## Path parameters

- `topicId` union, required
  - string, uuid
  - string, uuid

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `archived` boolean: Set to true to archive the topic, false to unarchive it.
  - `archivedReason` string: Optional reason for archiving. Only used when archived=true.
  - `issueType` 'bug_report' | 'complaint' | 'discussion' | 'feature_request' | 'praise', nullable: Classification for the topic as a type of issue.
  - `keywords` string[]: Not supported: the topic pipeline derives the keywords. Sending this field returns 400.
  - `lifecycleState` 'completed' | 'dismissed' | 'in_progress' | 'open': Update the topic lifecycle state. Valid values: open, in_progress, completed, dismissed. The unknown state is AI-assessed and cannot be set directly.
  - `priority` 'default' | 'high' | 'low' | 'very_high' | 'very_low': Update the topic priority. Valid values: very_low, low, default, high, very_high.

## Response `200`

OK

- object: Detailed topic fields including archived status.
  - `archivedAt` string, date-time, nullable: Timestamp when the topic was archived.
  - `archivedByUserId` union, required: User who archived the topic.
    - string
    - string
  - `archivedReason` string, nullable, required: Optional reason for archiving.
  - `createdAt` string, date-time
  - `eventCount` integer, required: Number of events grouped under this topic.
  - `id` union, required
    - string, uuid
    - string, uuid
  - `issueType` 'bug_report' | 'complaint' | 'discussion' | 'feature_request' | 'praise', nullable, required: Classification for the topic as a type of issue.
  - `keywords` string[], required: Keywords associated with the topic.
  - `lifecycleState` 'completed' | 'dismissed' | 'in_progress' | 'open' | 'unknown', nullable, required: LLM-assessed lifecycle state for a topic.
  - `lifecycleStateConfidence` number, nullable, required: Confidence for the most recent lifecycle assessment.
  - `priority` 'default' | 'high' | 'low' | 'very_high' | 'very_low', required: Priority level: very_low, low, default, high, or very_high
  - `priorityReasoning` string, nullable, required: Reasoning from the most recent automatic topic-priority scoring decision. Null when priority was manually overridden or never auto-scored.
  - `summary` string, required: Descriptive summary of the topic.
  - `timeRangeEnd` unknown
  - `timeRangeStart` unknown
  - `title` string, required: Short human-readable title of the topic.
  - `updatedAt` string, date-time: Timestamp when the topic was last updated.

## Other responses

- `400`: Invalid request (validation failed).
- `401`: Missing or invalid API key.
- `403`: The API key does not have access to this resource.
- `404`: The requested resource was not found.
- `409`: The request conflicts with an existing resource or idempotency operation.
- `429`: Rate limit exceeded.
- `500`: Internal server error.

---

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