Audit log

Who did what in your organization, when, and from which session.

The log records every sign-in, every change to how a person signs in, every record written by a person, an agent or the API, every file handed to someone, and every read through Discovery. It says that something changed and which fields, never what they hold: content is read through Discovery.

  • The log begins when the organization joins Enterprise and is never trimmed. Nothing is recorded while an organization is on another plan.
  • Events are never changed or removed once written.
  • Admins can also read it in Manage org › Audit Log, and event streaming pushes it to a SIEM as it is written.
A message sent
{
  "id": "5f0c9a1e2b7d4c3a8e6f1b20",
  "at": "2026-11-10T14:03:22.481Z",
  "action": "notes.created",
  "category": "resource",
  "actor": {
    "type": "user",
    "id": "8c1d…"
  },
  "session": "b7e4…",
  "entity": {
    "type": "notes",
    "id": "41aa…"
  },
  "context": {
    "organization": "2f9b…",
    "scope": "resource",
    "resource": "c05e…"
  },
  "details": {
    "fields": [
      "body",
      "sender_user_id",
      "sender_name"
    ]
  }
}

GET /audit/events

Read events

Events oldest first, from a cursor you keep. Needs a token with the audit scope.

Without a cursor, reading starts at oldest, or 24 hours ago. Every answer carries next_cursor, which is never null: store it and pass it on the next request to read on from exactly where you stopped. Nothing is ever added before a cursor you were given.

Query

cursor string
The next_cursor of your last request.
oldest string
Where to start without a cursor, as an ISO 8601 time. Default: 24 hours ago.
latest string
Read no later than this time.
limit integer
Events per page, 1 to 1000. Default 100.
action string
Only this action, such as user.login, or a prefix ending in *, such as user.*.
actor string
Only events by this actor: an account, agent or token id.
category string
Only events of this category, such as sign_in.
resource string
Only events in this resource: its id.

Returns

data object[]
The events. See the event object.
next_cursor string
Where to read on from. Never null.
has_more boolean
Whether more events are waiting now. When false, wait before asking again.

An event becomes readable a moment after it happens (about two seconds), once every earlier event is certain to be there before it.

The last day's sign-ins
curl "https://tensorworks.net/enterprise/v1/audit/events?action=user.*" \
  -H "Authorization: Bearer $TENSORWORKS_TOKEN"
Read on
curl "https://tensorworks.net/enterprise/v1/audit/events?cursor=$CURSOR" \
  -H "Authorization: Bearer $TENSORWORKS_TOKEN"
200 OK
{
  "data": [
    {
      "id": "0a4e7c11d2f3b5a6c7d8e9f0",
      "at": "2026-11-10T13:58:02.117Z",
      "action": "user.login",
      "category": "sign_in",
      "actor": {
        "type": "user",
        "id": "8c1d…"
      },
      "session": "b7e4…",
      "entity": {
        "type": "session",
        "id": "b7e4…"
      },
      "context": {
        "organization": "2f9b…"
      },
      "details": {
        "method": "sso",
        "ip": "198.51.100.7",
        "user_agent": "Mozilla/5.0 …",
        "browser": "Chrome"
      }
    }
  ],
  "next_cursor": "MjAyNi0xMS0xMFQxMzo1ODowMi4xMTdaLzBhNGU3YzEx…",
  "has_more": false
}

Audit log

The event object

Fields

id string
The event’s id, 24 hexadecimal characters. Unique: keep each event once by it.
at string
When it happened.
action string
What happened. See the actions below.
category string
What kind of event it is, whatever its action. See categories.
actor object
Who did it: type and id. A user is an account, an agent an agent of the team, api one of the organization’s API tokens, and system Tensorworks acting for the organization (directory sync, billing), with a null id.
session string | null
The browser session it came from. Null for agents, tokens and the system. Look it up in the person’s sessions for its IP address and browser.
entity object | null
What it was done to: type (a collection’s name, session, api_token or stream) and id.
context object
organization, and where it happened: scope (such as resource, project, team or org) with the project or resource id where there is one.
details object
What else the action records, described with each action. Never content.

IP addresses and browsers are kept on the session, recorded once at sign-in, not on each event. Sign-in events carry them in details as well, so a SIEM can alert on a sign-in without a lookup.

A sign-in
{
  "id": "0a4e7c11d2f3b5a6c7d8e9f0",
  "at": "2026-11-10T13:58:02.117Z",
  "action": "user.login",
  "category": "sign_in",
  "actor": {
    "type": "user",
    "id": "8c1d…"
  },
  "session": "b7e4…",
  "entity": {
    "type": "session",
    "id": "b7e4…"
  },
  "context": {
    "organization": "2f9b…"
  },
  "details": {
    "method": "sso",
    "ip": "198.51.100.7",
    "user_agent": "Mozilla/5.0 …",
    "browser": "Chrome"
  }
}

Audit log

Categories

Every event falls in one category, recorded with it. Four are of nothing in a resource; the last two say where a record was written.

CategoryIts events
sign_inSigning in and out, and sign-ins refused.
account_securityA person's own password, authenticator app, passkeys and recovery codes.
organizationThe organization's own records: its settings, branding, plan and list of projects.
teamIts people, agents, roles and what each may open.
apiAPI tokens, event streams and reads through Discovery.
projectRecords written in a project: what it is and the resources it lists. context.project names it.
resourceRecords written in a resource, and its files handed out. context.resource names it.
One resource's events
curl "https://tensorworks.net/enterprise/v1/audit/events?resource=$RESOURCE" \
  -H "Authorization: Bearer $TENSORWORKS_TOKEN"
Changes to the team
curl "https://tensorworks.net/enterprise/v1/audit/events?category=team" \
  -H "Authorization: Bearer $TENSORWORKS_TOKEN"

Audit log

Polling from a SIEM

To collect the log by polling, as Microsoft Sentinel's codeless connector, a Splunk modular input or a scheduled script does:

  1. Ask without a cursor the first time, with oldest set to where you want to begin.
  2. Index data, then store next_cursor.
  3. If has_more is true, ask again at once. Otherwise wait, then ask again with the stored cursor.

Reading this way misses nothing and repeats nothing. If you would rather have events pushed to you, use event streaming.

poll.js
let cursor = await load('cursor');  // null the first time

for (;;) {
  const url = new URL('https://tensorworks.net/enterprise/v1/audit/events');
  url.searchParams.set('limit', '1000');
  if (cursor) url.searchParams.set('cursor', cursor);
  const response = await fetch(url, { headers: { Authorization: `Bearer ${process.env.TENSORWORKS_TOKEN}` } });
  if (response.status === 429) { await sleep(Number(response.headers.get('Retry-After')) * 1000); continue; }
  const { data, next_cursor, has_more } = await response.json();
  await index(data);                 // keep each event once, by its id
  await save('cursor', cursor = next_cursor);
  if (!has_more) await sleep(30_000);
}

Actions

Sign-in and security

These are recorded in every Enterprise organization the person belongs to. Their actor is the person.

ActionRecorded when
user.loginA person signed in. details: method, ip, user_agent, browser. entity is the new session.
user.registeredA person created their account and was signed in. Same details.
user.login_failedA sign-in for their account was refused: a wrong password or a wrong second-step code. details: method, ip, user_agent, browser. No session.
user.logoutA person signed out. entity is the session ended.
user.password_changedA person changed their password. details.sessions_ended: how many other sessions it ended; details.agents_disconnected: how many agents they had connected with sign-in it disconnected (each leaving the team too), or null when they kept them.
user.two_factor_enabledA person set up an authenticator app.
user.two_factor_disabledA person turned their authenticator app off.
user.passkey_addedA person added a passkey.
user.passkey_removedA person removed a passkey.
user.recovery_codes_regeneratedA person replaced their recovery codes.

The method is password, code (a two-factor code after the password), passkey or sso.

Actions

Records

Everything people and agents work on is a record in a collection, and every write to one is an event named for it: <collection>.created, <collection>.updated or <collection>.deleted. entity names the record, context the project or resource it is in, and details.fields the fields written.

ActionRecorded when
notes.createdA message was sent in a chatroom or thread.
note_edits.createdA message was edited or deleted.
cards.created, .updated, .deletedA board's card was added, changed (moved, renamed, assigned) or deleted.
documents.created, .updated, .deletedA file was uploaded, renamed or moved, or deleted.
events.created, .updated, .deletedA calendar event was added, changed or deleted.
collaborators.created, .updated, .deletedA person or agent was invited or added, their access changed, or they were removed.
roles.created, .updated, .deletedA role was made, changed or deleted.
spaces.created, resource.updated, project.updatedA resource was added to a project, or a resource or project was renamed, moved or archived.
org.updated, billing.updatedThe organization's own record or its plan changed.

The list is not closed: any collection a resource lists produces events of the same three forms. Match on the prefix, such as cards.*, to follow one kind of record.

A message sent
{
  "id": "5f0c9a1e2b7d4c3a8e6f1b20",
  "at": "2026-11-10T14:03:22.481Z",
  "action": "notes.created",
  "category": "resource",
  "actor": {
    "type": "user",
    "id": "8c1d…"
  },
  "session": "b7e4…",
  "entity": {
    "type": "notes",
    "id": "41aa…"
  },
  "context": {
    "organization": "2f9b…",
    "scope": "resource",
    "resource": "c05e…"
  },
  "details": {
    "fields": [
      "body",
      "sender_user_id",
      "sender_name"
    ]
  }
}

Actions

Files

ActionRecorded when
file.accessedA file's contents were handed to a person's browser (to open, preview, download or index it for search) or to an agent. entity.id is the file's hash, and context.resource the resource holding it.

A browser keeps the files it has read, so a person opening the same file again on the same device may record nothing more. Uploads and deletions are the documents events above. Files shared in direct messages are not part of an organization's log.

A file opened
{
  "id": "7d1e02b9c4a85f6031e2d4c7",
  "at": "2026-11-10T14:09:51.006Z",
  "action": "file.accessed",
  "category": "resource",
  "actor": {
    "type": "user",
    "id": "77b0…"
  },
  "session": "e19c…",
  "entity": {
    "type": "documents",
    "id": "9f86d0…"
  },
  "context": {
    "organization": "2f9b…",
    "scope": "resource",
    "resource": "c05e…"
  },
  "details": {}
}

Actions

API and streams

ActionRecorded when
api_token.createdAn admin made an API token. details: name, scopes.
api_token.revokedAn admin revoked one. details.name.
discovery.readA token read through Discovery. details.path is the path read. The actor is the token.
audit_log.exportedAn admin downloaded events of the log as CSV from Manage org › Audit Log. details: events, how many, and what the download was narrowed to.
stream.createdAn event stream was added. details: name, kind, url.
stream.enabled, stream.disabledA stream was resumed or paused.
stream.deletedA stream was removed.

stream.test is the made-up event a stream's test sends. It is delivered to the destination only and never appears in the log.

Questions or something missing? Contact us.