Productmind API

The audit log records who created, changed and deleted what in your workspace, and every change to your organization's members, roles, teams and sign-in settings. List events, open one to see each field's value before and after, or read one record's whole history. You can also export the events that match your filters as CSV or JSON, and read or change how long events are kept. See Audit log.


List audit events

GET
https://api.productmind.ai
/workspaces/{workspaceId}/audit-logs

Who changed what, and when: every create, update and delete on this workspace's data, plus the organization's governance changes (roles, memberships, teams, SSO), newest first. Each row carries the per-field before/after diff inline (changes) and the resolved actor. The read is bounded to an event-time window — the last 90 days unless from/to are given — echoed back as windowFrom/windowTo; page with cursor. Events appear within about two minutes of the change.

List audit events › path Parameters

workspaceId
​string · required

Workspace UUID

List audit events › query Parameters

from
​string

Start of the event-time window, ISO-8601. Default: 90 days before to.

to
​string

End of the event-time window, ISO-8601. Default: now.

actorUserId
​string · uuid · pattern: ^([0-9a-fA-F]{8}-[0-…

Only changes made by this user (UUID).

actorKind
​string · enum

Only changes by this kind of caller: browser = a person signed in themselves, agent = a coding session, local_agent = a person's own Productmind agent, mcp_client = another coding agent a person connected, service = a machine caller, impersonated = a service acting for a user, support = a Productmind Architect through a support grant.

Enum values:
browser
agent
service
impersonated
legacy
support
local_agent
mcp_client
entityType
​string · enum

Only changes to this entity type (registry key), e.g. task, feature, workspace_membership.

Enum values:
feature
feature_request
bug_report
task
note
application
sandbox
knowledge_base_document
entityId
​string · uuid · pattern: ^([0-9a-fA-F]{8}-[0-…

Only changes to this entity (UUID); pair with entityType.

action
​string · enum

Only this action, e.g. create, update, delete, or access (a recorded read).

Enum values:
create
update
delete
soft_delete
bulk_delete
purge
workspace_reset
workspace_provision
phase
​string · enum

Only this phase: completed (every ordinary change), or attempted / failed (the write-ahead bracket of a destructive operation).

Enum values:
attempted
completed
failed
operationId
​string · minLength: 1 · maxLength: 200

Only the events of one operation (operationId of a row): its other phases and, for a bulk operation, its sibling subjects.

q
​string · minLength: 1 · maxLength: 200

Free-text search: a case-insensitive substring of the entity's label, or its whole display id (e.g. TASK-12, any case).

cursor
​string · minLength: 1

The cursor from the previous page's response; omit for the first page.

limit
​integer · min: 1 · max: 200

Page size, 1–200 (default 50).

Default: 50

List audit events › Responses

A page of audit events

​AuditEventListItemDTO[] · required
​required

Pass back as cursor for the next page; null on the last page.

​required

The Athena execution the page came from (result reuse); null for the local store.

windowFrom
​string · required

The event-time window the read was bounded to, ISO-8601 — 90 days ending at to unless from was given.

windowTo
​string · required

Get one audit event

GET
https://api.productmind.ai
/workspaces/{workspaceId}/audit-logs/{eventId}

One audit event with its full diff and its related rows — the other phases of the same operation (an attempted beside its completed or failed) and the sibling subjects of a bulk operation. Pass at (the event's time, from a list row) so the store finds it in one pruned read; without it, an event older than the default 90-day window costs a second, unbounded read.

Get one audit event › path Parameters

workspaceId
​string · required

Workspace UUID

eventId
​string · uuid · pattern: ^([0-9a-fA-F]{8}-[0-… · required

The event id (id of a list row).

Get one audit event › query Parameters

at
​string

The event's time, ISO-8601, as a lookup hint — narrows the read to ±1 day around it.

Get one audit event › Responses

The audit event

​AuditEventDetailDTO · required

List one entity's audit history

GET
https://api.productmind.ai
/workspaces/{workspaceId}/audit-logs/entities/{entityType}/{entityId}

Every recorded change to one entity — a task, a feature, a membership — newest first, with the per-field diff of each. Not bounded to a window: the entity's whole history within the workspace's retention.

List one entity's audit history › path Parameters

workspaceId
​string · required

Workspace UUID

entityType
​string · enum · required

The audited entity type, e.g. task, feature, bug_report, workspace_membership.

Enum values:
feature
feature_request
bug_report
task
note
application
sandbox
knowledge_base_document
entityId
​string · uuid · pattern: ^([0-9a-fA-F]{8}-[0-… · required

The entity's UUID.

List one entity's audit history › query Parameters

limit
​integer · min: 1 · max: 200

Maximum number of events to return, newest first (1–200, default 100).

Default: 100

List one entity's audit history › Responses

200

The entity's events

​AuditEventListItemDTO[] · required

Start a CSV or JSON export of the audit log

POST
https://api.productmind.ai
/workspaces/{workspaceId}/audit-logs/exports

Starts an export of every event matching the filters. Poll GET /audit-logs/exports/{executionId} for the download URL.

Start a CSV or JSON export of the audit log › path Parameters

workspaceId
​string · required

Workspace UUID

Start a CSV or JSON export of the audit log › Request Body

format
​string · enum · required

csv = one file, columns in wire order; json = newline-delimited wire records (several parts for a large window).

Enum values:
csv
json
​object

The same filters as the list endpoint; the export covers every matching event, not one page.

Default: {}

Start a CSV or JSON export of the audit log › Responses

Export started

​AuditExportStatusDTO · required

Poll an audit export

GET
https://api.productmind.ai
/workspaces/{workspaceId}/audit-logs/exports/{executionId}

The export's status; when succeeded, a download URL valid for about an hour (re-issued on every poll).

Poll an audit export › path Parameters

workspaceId
​string · required

Workspace UUID

executionId
​string · uuid · pattern: ^([0-9a-fA-F]{8}-[0-… · required

The export's execution id.

Poll an audit export › Responses

Export status

​AuditExportStatusDTO · required

Download a finished audit export

GET
https://api.productmind.ai
/workspaces/{workspaceId}/audit-logs/exports/{executionId}/download

Streams the file when the export was produced by the local store; redirects to the presigned URL otherwise.

Download a finished audit export › path Parameters

workspaceId
​string · required

Workspace UUID

executionId
​string · uuid · pattern: ^([0-9a-fA-F]{8}-[0-… · required

The export's execution id.

Download a finished audit export › Responses

The export file

string

Get the audit log's retention setting

GET
https://api.productmind.ai
/workspaces/{workspaceId}/audit-logs/settings

Get the audit log's retention setting › path Parameters

workspaceId
​string · required

Workspace UUID

Get the audit log's retention setting › Responses

200

The setting

​AuditSettingsDTO · required

Set the audit log's retention

PUT
https://api.productmind.ai
/workspaces/{workspaceId}/audit-logs/settings

Days of audit history to keep (30–3650), or null for indefinite. Owner/admin only (audit-log:manage).

Set the audit log's retention › path Parameters

workspaceId
​string · required

Workspace UUID

Set the audit log's retention › Request Body

​required

Days of audit history to keep, 30–3650; null keeps events indefinitely.

Set the audit log's retention › Responses

200

The setting

​AuditSettingsDTO · required