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

# Update topic

> Update a single topic. Supports changing priority, lifecycle state, issue type, keywords, archiving (archived=true), and unarchiving (archived=false). At least one field must be provided.



## OpenAPI

````yaml /api-reference/openapi.json patch /topics/{topicId}
openapi: 3.1.1
info:
  description: >-
    The public Modem API. Authenticate with an organization API key:
    `Authorization: Bearer modem_…`.
  title: Modem API
  version: 1.0.0
servers:
  - description: Production
    url: https://api.modem.dev/v1
security:
  - bearerAuth: []
paths:
  /topics/{topicId}:
    patch:
      tags:
        - Topics
      summary: Update topic
      description: >-
        Update a single topic. Supports changing priority, lifecycle state,
        issue type, keywords, archiving (archived=true), and unarchiving
        (archived=false). At least one field must be provided.
      operationId: topics.update
      parameters:
        - in: path
          name: topicId
          required: true
          schema:
            anyOf:
              - format: uuid
                type: string
              - format: uuid
                type: string
      requestBody:
        content:
          application/json:
            schema:
              properties:
                archived:
                  description: Set to true to archive the topic, false to unarchive it.
                  title: Archived
                  type: boolean
                archivedReason:
                  description: Optional reason for archiving. Only used when archived=true.
                  maxLength: 4000
                  title: Archived Reason
                  type: string
                issueType:
                  anyOf:
                    - description: Classification for the topic as a type of issue.
                      enum:
                        - bug_report
                        - complaint
                        - discussion
                        - feature_request
                        - praise
                      title: Issue Type
                      type: string
                    - type: 'null'
                  description: >-
                    Update the topic issue type classification. Valid values:
                    bug_report, feature_request, complaint, praise, or null to
                    clear.
                  title: Issue Type
                keywords:
                  description: >-
                    Replace the topic keywords/categories. Provide the full list
                    of keywords.
                  items:
                    maxLength: 50
                    minLength: 1
                    type: string
                  maxItems: 20
                  title: Keywords
                  type: array
                lifecycleState:
                  description: >-
                    Update the topic lifecycle state. Valid values: open,
                    in_progress, completed, dismissed. The unknown state is
                    AI-assessed and cannot be set directly.
                  enum:
                    - completed
                    - dismissed
                    - in_progress
                    - open
                  title: Lifecycle State
                  type: string
                priority:
                  description: >-
                    Update the topic priority. Valid values: very_low, low,
                    default, high, very_high.
                  enum:
                    - default
                    - high
                    - low
                    - very_high
                    - very_low
                  title: Priority
                  type: string
              required: []
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                description: Detailed topic fields including archived status.
                properties:
                  archivedAt:
                    anyOf:
                      - format: date-time
                        type: string
                      - type: 'null'
                    description: Timestamp when the topic was archived.
                    title: Archived At
                  archivedByUserId:
                    anyOf:
                      - anyOf:
                          - type: string
                          - type: string
                      - type: 'null'
                    description: User who archived the topic.
                    title: Archived By User ID
                  archivedReason:
                    anyOf:
                      - maxLength: 4000
                        type: string
                      - type: 'null'
                    description: Optional reason for archiving.
                    title: Archived Reason
                  createdAt:
                    format: date-time
                    type: string
                  eventCount:
                    description: Number of events grouped under this topic.
                    title: Event Count
                    type: integer
                  id:
                    anyOf:
                      - format: uuid
                        type: string
                      - format: uuid
                        type: string
                  issueType:
                    anyOf:
                      - description: Classification for the topic as a type of issue.
                        enum:
                          - bug_report
                          - complaint
                          - discussion
                          - feature_request
                          - praise
                        title: Issue Type
                        type: string
                      - type: 'null'
                    description: Optional issue classification for the topic.
                    title: Issue Type
                  keywords:
                    description: Keywords associated with the topic.
                    items:
                      type: string
                    title: Keywords
                    type: array
                  lifecycleState:
                    anyOf:
                      - description: LLM-assessed lifecycle state for a topic.
                        enum:
                          - completed
                          - dismissed
                          - in_progress
                          - open
                          - unknown
                        title: Topic Lifecycle State
                        type: string
                      - type: 'null'
                    description: Most recent LLM-assessed lifecycle state for this topic.
                    title: Lifecycle State
                  lifecycleStateConfidence:
                    anyOf:
                      - maximum: 1
                        minimum: 0
                        type: number
                      - type: 'null'
                    description: Confidence for the most recent lifecycle assessment.
                    title: Lifecycle State Confidence
                  priority:
                    description: 'Priority level: very_low, low, default, high, or very_high'
                    enum:
                      - default
                      - high
                      - low
                      - very_high
                      - very_low
                    title: Priority
                    type: string
                  priorityReasoning:
                    anyOf:
                      - type: string
                      - type: 'null'
                    description: >-
                      Reasoning from the most recent automatic topic-priority
                      scoring decision. Null when priority was manually
                      overridden or never auto-scored.
                    title: Priority Reasoning
                  summary:
                    description: Descriptive summary of the topic.
                    title: Summary
                    type: string
                  timeRangeEnd: {}
                  timeRangeStart: {}
                  title:
                    description: Short human-readable title of the topic.
                    title: Title
                    type: string
                  updatedAt:
                    description: Timestamp when the topic was last updated.
                    format: date-time
                    title: Updated At
                    type: string
                required:
                  - archivedByUserId
                  - archivedReason
                  - eventCount
                  - id
                  - issueType
                  - keywords
                  - lifecycleState
                  - lifecycleStateConfidence
                  - priority
                  - priorityReasoning
                  - summary
                  - title
                title: Topic Detail
                type: object
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Invalid request (validation failed).
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Missing or invalid API key.
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: The API key does not have access to this resource.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: The requested resource was not found.
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Rate limit exceeded.
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Internal server error.
components:
  schemas:
    Error:
      properties:
        code:
          description: Machine-readable error code, e.g. `NOT_FOUND`.
          examples:
            - NOT_FOUND
          type: string
        data:
          description: Optional structured error details.
        defined:
          description: True if the error was declared in the procedure contract.
          type: boolean
        message:
          description: Human-readable error message.
          type: string
        status:
          description: HTTP status code.
          examples:
            - 404
          type: integer
      required:
        - code
        - defined
        - message
        - status
      type: object
  securitySchemes:
    bearerAuth:
      description: Organization API key (`modem_…`).
      scheme: bearer
      type: http

````