Skip to content
Esc
↑↓navigate↵open⌘Jpreview

Update topic

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.

PATCH/topics/{topicId}
Authorization
AuthorizationBearer token · headerrequired

Organization API key (modem_…).

Path parameters
topicIdstring<uuid>required
Header parameters
Idempotency-Keystring

Replays a successful mutating request for 24 hours. Reuse with a different payload returns 409.

max length 255
Request body
requiredapplication/json
archivedboolean

Set to true to archive the topic, false to unarchive it.

archivedReasonstring

Optional reason for archiving. Only used when archived=true.

max length 4000
issueTypestring | null

Not supported: the topic pipeline derives the issue type. Sending this field returns 400.

Show properties
Any of:
string
string
null
null
keywordsstring[]

Not supported: the topic pipeline derives the keywords. Sending this field returns 400.

max items 20
lifecycleStatestring

Update the topic lifecycle state. Valid values: open, in_progress, completed, dismissed. The unknown state is AI-assessed and cannot be set directly.

Allowed:completeddismissedin_progressopen
prioritystring

Update the topic priority. Valid values: very_low, low, default, high, very_high.

Allowed:defaulthighlowvery_highvery_low
Responses
200

OK

archivedAtstring<date-time> | null

Timestamp when the topic was archived.

Show properties
Any of:
string<date-time>
string<date-time>
null
null
archivedByUserIdstring | nullrequired

User who archived the topic.

Show properties
Any of:
string
Any of:
string
string
string
string
null
null
archivedReasonstring | nullrequired

Optional reason for archiving.

Show properties
Any of:
string
string
null
null
createdAtstring<date-time>
eventCountintegerrequired

Number of events grouped under this topic.

idstring<uuid>required
Show properties
Any of:
string<uuid>
string<uuid>
string<uuid>
string<uuid>
issueTypestring | nullrequired

Optional issue classification for the topic.

Show properties
Any of:
string
string
null
null
keywordsstring[]required

Keywords associated with the topic.

lifecycleStatestring | nullrequired

Most recent LLM-assessed lifecycle state for this topic.

Show properties
Any of:
string
string
null
null
lifecycleStateConfidencenumber | nullrequired

Confidence for the most recent lifecycle assessment.

Show properties
Any of:
number
number
null
null
prioritystringrequired

Priority level: very_low, low, default, high, or very_high

Allowed:defaulthighlowvery_highvery_low
priorityReasoningstring | nullrequired

Reasoning from the most recent automatic topic-priority scoring decision. Null when priority was manually overridden or never auto-scored.

Show properties
Any of:
string
string
null
null
summarystringrequired

Descriptive summary of the topic.

timeRangeEndany
timeRangeStartany
titlestringrequired

Short human-readable title of the topic.

updatedAtstring<date-time>

Timestamp when the topic was last updated.

400

Invalid request (validation failed).

codestringrequired

Machine-readable error code, e.g. NOT_FOUND.

dataany

Optional structured error details.

definedbooleanrequired

True if the error was declared in the procedure contract.

messagestringrequired

Human-readable error message.

statusintegerrequired

HTTP status code.

401

Missing or invalid API key.

codestringrequired

Machine-readable error code, e.g. NOT_FOUND.

dataany

Optional structured error details.

definedbooleanrequired

True if the error was declared in the procedure contract.

messagestringrequired

Human-readable error message.

statusintegerrequired

HTTP status code.

403

The API key does not have access to this resource.

codestringrequired

Machine-readable error code, e.g. NOT_FOUND.

dataany

Optional structured error details.

definedbooleanrequired

True if the error was declared in the procedure contract.

messagestringrequired

Human-readable error message.

statusintegerrequired

HTTP status code.

404

The requested resource was not found.

codestringrequired

Machine-readable error code, e.g. NOT_FOUND.

dataany

Optional structured error details.

definedbooleanrequired

True if the error was declared in the procedure contract.

messagestringrequired

Human-readable error message.

statusintegerrequired

HTTP status code.

409

The request conflicts with an existing resource or idempotency operation.

codestringrequired

Machine-readable error code, e.g. NOT_FOUND.

dataany

Optional structured error details.

definedbooleanrequired

True if the error was declared in the procedure contract.

messagestringrequired

Human-readable error message.

statusintegerrequired

HTTP status code.

429

Rate limit exceeded.

codestringrequired

Machine-readable error code, e.g. NOT_FOUND.

dataany

Optional structured error details.

definedbooleanrequired

True if the error was declared in the procedure contract.

messagestringrequired

Human-readable error message.

statusintegerrequired

HTTP status code.

500

Internal server error.

codestringrequired

Machine-readable error code, e.g. NOT_FOUND.

dataany

Optional structured error details.

definedbooleanrequired

True if the error was declared in the procedure contract.

messagestringrequired

Human-readable error message.

statusintegerrequired

HTTP status code.

Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X PATCH 'https://api.modem.dev/v1/topics/497f6eca-6276-4993-bfeb-53cbbbba6f08' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "archived": true,
  "archivedReason": "string",
  "issueType": "bug_report",
  "keywords": [
    "string"
  ],
  "lifecycleState": "completed",
  "priority": "default"
}'
Response
{
  "archivedAt": "2019-08-24T14:15:22Z",
  "archivedByUserId": "string",
  "archivedReason": "string",
  "createdAt": "2019-08-24T14:15:22Z",
  "eventCount": 0,
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "issueType": "bug_report",
  "keywords": [
    "string"
  ],
  "lifecycleState": "completed",
  "lifecycleStateConfidence": 0,
  "priority": "default",
  "priorityReasoning": "string",
  "summary": "string",
  "timeRangeEnd": null,
  "timeRangeStart": null,
  "title": "string",
  "updatedAt": "2019-08-24T14:15:22Z"
}

Was this page helpful?