Skip to content

Audit events API

The audit events endpoints, each in TypeScript, Python, the CLI and curl.

Terminal window
npm install @limitry/sdk
export LIMITRY_API_KEY="lim_test_…"

To pass the key yourself, use createClient({ apiKey: key }) in TypeScript or Limitry(api_key=key) in Python.

Scope: workspace.audit:read.

Lists the workspace’s audit events, newest first.

import { createClient } from "@limitry/sdk";
// Uses the LIMITRY_API_KEY environment variable.
const limitry = createClient();
const auditEvents = await limitry.workspace.auditEvents.list();
console.log(auditEvents);

Returns:

{
"items": [
{
"id": "aud_6b2f9e1c-3d4a-4f8b-9e7c-1a2b3c4d5e6f",
"action": "workspace.member.invited",
"actorType": "user",
"actor": {
"id": "usr_4f8a2c1e-7b3d-4e9f-a6c5-2d1b0e9f8a7c"
},
"credential": {
"id": "pat_8a1b2c3d-4e5f-4061-8a7b-9c0d1e2f3a4b",
"type": "pat",
"name": "ci"
},
"createdAt": "2026-08-19T12:00:00.000Z"
}
],
"nextCursor": null
}
Field Description
limit number, query Items per page, 1–100 (default 25).
cursor string, query Opaque token from a previous page's nextCursor.
before string, query Start from this moment: items older than it, newest first. Ignored with cursor, which already says where to go on.
action string, query Only events of this action.
actor string, query Only what one person did (user: and the item's actor.id), or one key or token (credential: and the item's credential.id).
More about this endpoint

Paginate with the opaque nextCursor token. limit takes 1 to 100 and defaults to 25. before starts from a moment. action keeps one kind of event, and actor what one person, key or token did. With a personal access token, only workspace owners and admins can call this, as with the audit page in the app. A workspace API key always can, because it acts as the workspace itself.