Skip to main content

Activity

GET /api/activity returns the last 30 days of events in every workspace you belong to, newest first. Each event is a Change Sensei saw, such as a pull request merging, or an action a member took, such as starting a session. To get only what is new to you and mark it seen in the same call, pass markSeen=true.

MethodPathDescription
GET/api/activity?since=&unseen=&markSeen=&workspace=&project=&kind=&limit=&cursor=List Activity across every workspace you belong to, newest first: Changes the platform observed and what members did. Each event names its workspace. An agent token reads its own workspace only.

In the web app the same events are under Settings > your workspace > Activity, one workspace at a time. See Overview, Needs you and Activity.

Query parameters​

Every parameter is optional.

ParameterValuesDefault
sinceAn ISO date or time, or a span back from now in whole hours or days, such as 24h or 7d.The last 30 days
kindKinds from the tables below, separated by commas. Or change alone for every Change, or action alone for every Member Action.Every kind
limitEvents per page, from 1. Values above 200 are read as 200.50
cursorThe meta.pagination.nextCursor of the previous page.The first page
workspaceOne workspace id.Every workspace you belong to
projectOne project id.Every project
unseentrue returns only events that are New to you, oldest first.false
markSeentrue returns your New events, oldest first, and marks them seen. See Read only what is new.false
curl -s "https://app.kosuke.ai/api/activity?since=24h&kind=pr_merged,pr_checks_failed" \
-H "Authorization: Bearer $KOSUKE_API_KEY"
{
"data": [
{
"id": "48213",
"workspaceId": "YzH4k2P9sQ1mVx7bN3cR8tL5wD0fG6jA",
"workspaceName": "Acme",
"projectId": "3f6c1e0a-8b2d-4e57-9a41-0c2f7d9b5e18",
"projectName": "storefront",
"chatSessionId": "b1d6e2f4-7a3c-4c1e-9f0b-2e8d5a6c7b90",
"sessionUrl": "https://app.kosuke.ai/projects/3f6c1e0a-8b2d-4e57-9a41-0c2f7d9b5e18/chat-sessions?session=b1d6e2f4-7a3c-4c1e-9f0b-2e8d5a6c7b90",
"sessionPath": "/projects/3f6c1e0a-8b2d-4e57-9a41-0c2f7d9b5e18/chat-sessions?session=b1d6e2f4-7a3c-4c1e-9f0b-2e8d5a6c7b90",
"actor": null,
"kind": "pr_merged",
"category": "change",
"text": "#12 merged by Sam Rivera",
"subject": "Fix the checkout total",
"payload": {
"sessionTitle": "Fix the checkout total",
"pullRequestNumber": 12,
"mergedBy": { "login": "sam-acme", "userId": "u8Rk2mQ4xT7vB1nP9sL3cW6yD0fH5jZa", "name": "Sam Rivera" }
},
"source": null,
"createdAt": "2026-09-30T09:14:02.000Z",
"isNew": true
}
],
"meta": {
"pagination": { "pageSize": 50, "total": 1, "hasMore": false, "nextCursor": null },
"workspaces": [{ "id": "YzH4k2P9sQ1mVx7bN3cR8tL5wD0fG6jA", "name": "Acme" }]
}
}
FieldMeaning
textOne line describing the event, ready to show a person.
subjectThe session title or Cron name the event is about, or null.
actorThe member who acted, with id, name and image. null on a Change.
categorychange or action.
sessionUrlA link to the session in the web app. null once the session is deleted. The event itself stays.
payloadDetails that depend on kind, such as a pull request number or a status change's from and to.
sourceThe agent that acted for actor, such as { "kind": "sensei" }, shown as "via Sensei". null when the member acted by hand, and always null on a Change.
isNewtrue when the event is New to you.

meta.workspaces lists the workspaces the call read. When hasMore is true, pass nextCursor back as cursor for the next page.

In the CLI, run kosuke activity list --since 24h --kind pr_merged. Activity is a CLI command only. The MCP server has no tool for it.

Event kinds​

A Change is a state Sensei observed. It has no actor.

kindWhen it is recorded
job_awaiting_responseThe agent asked a Clarification and is waiting for an answer.
pr_checks_failedThe checks on a session's pull request failed.
pr_checks_passedThe checks on a session's pull request passed.
pr_mergedA session's pull request merged. payload.mergedBy names who merged it, when GitHub says.
branch_behindA session's branch fell behind its Target Branch.
pr_staleAn open pull request had no activity for 3 days.
cron_run_succeededA Cron fired and its run succeeded.
cron_run_failedA Cron's run failed. payload.error says why.
deployedA project's first Deploy succeeded. payload.deployJobId and payload.projectName identify it.
recovery_deploy_startedSensei started a Recovery Deploy after the first Deploy failed. payload.deployJobId, payload.projectName and payload.failedDeployJobId identify the transition.
workspace_device_disconnectedA workspace device was disconnected from the Mac itself, with Disconnect on its sign-in page. payload.deviceId and payload.deviceName identify it.

A Member Action names the member who did it in actor.

kindWhen it is recorded
session_startedA member created a session and started it, or started a Backlog session.
session_message_sentA member sent a message to a session. Recorded once per member, session and day.
session_archivedA member archived a session.
session_deletedA member deleted a session.
session_assignedA member set or cleared a session's Assignee, or filed a Backlog session for someone.
session_status_changedA member moved a session to any status but Archived. payload.from and payload.to name the statuses.
session_priority_changedA member changed a session's priority.
cron_createdA member created a Cron.
cron_updatedA member edited, paused or resumed a Cron. payload.change says which.
cron_deletedA member deleted a Cron.
member_invitedA member invited someone to the workspace.
member_removedA member was removed, or left. payload.self is true when they left.
member_role_changedA member's role changed. payload.transfer is true for an ownership transfer.
integration_custom_tool_savedAn admin saved a custom tool of a workspace integration: a first save (payload.created is true) or a new version. Personal custom tools write no event.
integration_custom_tool_enabledAn admin enabled a version of a custom tool. payload.access says whether it reads or writes.
integration_custom_tool_disabledAn admin disabled a custom tool.
integration_custom_tool_deletedAn admin deleted a custom tool.
integration_custom_tool_restoredAn admin restored an earlier version of a custom tool as a new version.

Read only what is new​

You have one Seen Mark per workspace. Every event after it is New to you, except your own actions. Two parameters read New events.

ParameterWhat it does
unseen=trueReturns your New events, oldest first, and leaves your Seen Mark where it is.
markSeen=trueReturns your New events, oldest first, and moves your Seen Mark past them in the same call. No event is returned twice.

markSeen needs an API key. It works across every workspace, or in one with workspace. It cannot be combined with project, kind or since, because a Seen Mark covers a whole workspace. It ignores cursor. Call it again to read the next limit events.

curl -s "https://app.kosuke.ai/api/activity?markSeen=true&limit=20" \
-H "Authorization: Bearer $KOSUKE_API_KEY"

In the CLI, run kosuke activity list --unseen to read without marking, or kosuke activity list --mark-seen to read and mark. kosuke agent summary get also marks seen the events it prints, unless you pass --peek. Opening Settings > your workspace > Activity in the web app marks that workspace's events seen too.

Errors​

StatusCodeWhen
400BAD_REQUESTA parameter has an invalid value, kind mixes a category with kinds, or markSeen was combined with project, kind or since. Also markSeen from a browser session.
403FORBIDDENYou are not a member of the workspace you named.

The full list is in Responses and errors.

Next steps​

  • Find what needs you right now with kosuke agent summary get on Sensei CLI.
  • Read or change the sessions an event names with Chat sessions.