Skip to content
Esc
↑↓navigate↵open⌘Jpreview

Get history

Get change history for a topic. Returns audit trail of modifications with user attribution, and the topics merged into it or that it was merged into. actions is always empty. A topic archived in the v1 to v2 migration returns 404 with data.reason archived_in_v1_to_v2_migration.

GET/topics/{topicId}/history
Authorization
AuthorizationBearer token · headerrequired

Organization API key (modem_…).

Path parameters
topicIdstring<uuid>required
Query parameters
changedByFilterstring[]

Filter by actor type. Defaults to user and agent changes (excludes system).

limitinteger

Maximum number of history records to return (default 20, max 50).

max 50 · default: 20
Responses
200

OK

actionsobject[]required
Show properties
Array of object
actionAtstring<date-time>
actionTypestringrequired

Semantic category of the action taken: started (a discrete unit of work was initiated, e.g. a PR was opened — per-artifact, not a topic-level state), merged (a code change was integrated into a canonical branch — NOT the same as deployed/shipped/released), resolved (a tracked task was completed positively, e.g. issue closed as completed), dismissed (a task was closed as wontfix / not pursued). User-initiated rows (created via dashboard, agent MCP tool, or direct API call) use the same enum values as auto rows — origin is encoded in metadata.source.

Allowed:dismissedmergedresolvedstarted
createdByUserobject | nullrequired
Show properties
Any of:
object
idstringrequired
Show properties
Any of:
string
string
string
string
imagestring | nullrequired

Optional URL to the user avatar image.

Show properties
Any of:
string
string
null
null
namestringrequired

Human-readable name of the user.

null
null
externalLinkobjectrequired
Show properties
Any of:
object
authorLoginstringrequired
createdAtstring<date-time>
draftbooleanrequired
linkTypeanyrequired
mergedbooleanrequired
numberintegerrequired
statestringrequired
Allowed:closedopen
titlestringrequired
urlstring<uri>required
object
linkTypeanyrequired
numberintegerrequired
titlestringrequired
urlstring<uri>required
object
linkTypeanyrequired
idstring<uuid>required

Unique identifier for the action record.

metadataany
notestring | nullrequired
Show properties
Any of:
string
string
null
null
historyobject[]required
Show properties
Array of object
changedAtstring<date-time>
changedBystringrequired

Actor type that initiated the change: system (internal/cascading), agent (AI), or user (manual).

Allowed:agentsystemuser
changesobjectrequired
idstring<uuid>required
Show properties
Any of:
string<uuid>
string<uuid>
string<uuid>
string<uuid>
operationstringrequired

Type of database operation that triggered the history record.

Allowed:DELETEINSERTUPDATE
previousValuesobject | nullrequired
Show properties
Any of:
object
object
null
null
userobject | nullrequired
Show properties
Any of:
object
idstringrequired
Show properties
Any of:
string
string
string
string
imagestring | nullrequired

Optional URL to the user avatar image.

Show properties
Any of:
string
string
null
null
namestringrequired

Human-readable name of the user.

null
null
mergedIntoobject | nullrequired
Show properties
Any of:
object
idstringrequired
mergedAtstring<date-time>
targetTopicobject | nullrequired
Show properties
Any of:
object
idstringrequired
titlestringrequired
null
null
userobject | nullrequired
Show properties
Any of:
object
idstringrequired
Show properties
Any of:
string
string
string
string
imagestring | nullrequired

Optional URL to the user avatar image.

Show properties
Any of:
string
string
null
null
namestringrequired

Human-readable name of the user.

null
null
null
null
mergesobject[]required
Show properties
Array of object
idstringrequired
mergedAtstring<date-time>
sourceTopicsobject[]required
Show properties
Array of object
idstringrequired
titlestringrequired
userobject | nullrequired
Show properties
Any of:
object
idstringrequired
Show properties
Any of:
string
string
string
string
imagestring | nullrequired

Optional URL to the user avatar image.

Show properties
Any of:
string
string
null
null
namestringrequired

Human-readable name of the user.

null
null
totalCountnumberrequired
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.

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
Request
curl -X GET 'https://api.modem.dev/v1/topics/497f6eca-6276-4993-bfeb-53cbbbba6f08/history' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'
Response
{
  "actions": [
    {
      "actionAt": "2019-08-24T14:15:22Z",
      "actionType": "dismissed",
      "createdByUser": {
        "id": "string",
        "image": "string",
        "name": "string"
      },
      "externalLink": {
        "authorLogin": "string",
        "createdAt": "2019-08-24T14:15:22Z",
        "draft": true,
        "linkType": "github_pull_request",
        "merged": true,
        "number": 0,
        "state": "closed",
        "title": "string",
        "url": "http://example.com"
      },
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "metadata": null,
      "note": "string"
    }
  ],
  "history": [
    {
      "changedAt": "2019-08-24T14:15:22Z",
      "changedBy": "agent",
      "changes": {
        "property1": null,
        "property2": null
      },
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "operation": "DELETE",
      "previousValues": {
        "property1": null,
        "property2": null
      },
      "user": {
        "id": "string",
        "image": "string",
        "name": "string"
      }
    }
  ],
  "mergedInto": {
    "id": "string",
    "mergedAt": "2019-08-24T14:15:22Z",
    "targetTopic": {
      "id": "string",
      "title": "string"
    },
    "user": {
      "id": "string",
      "image": "string",
      "name": "string"
    }
  },
  "merges": [
    {
      "id": "string",
      "mergedAt": "2019-08-24T14:15:22Z",
      "sourceTopics": [
        {
          "id": "string",
          "title": "string"
        }
      ],
      "user": {
        "id": "string",
        "image": "string",
        "name": "string"
      }
    }
  ],
  "totalCount": 0
}

Was this page helpful?