# Audit events API

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

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

## Set up

* TypeScript

  ```bash
  npm install @reminix/sdk
  export REMINIX_API_KEY="<your API key>"
  ```

* Python

  ```bash
  pip install reminix
  export REMINIX_API_KEY="<your API key>"
  ```

* CLI

  ```bash
  npm install -g @reminix/cli
  reminix login
  ```

* curl

  ```bash
  export REMINIX_API_KEY="<your API key>"
  ```

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

## List workspace audit events

`GET /v1/workspace/audit-events`[ Try it in the API playground (opens in a new tab)](https://api.reminix.com/v1/docs#tag/audit-events/GET/workspace/audit-events)

Scope: `workspace.audit:read`.

Lists the workspace’s audit events, newest first.

* TypeScript

  ```ts
  import { createClient } from "@reminix/sdk";

  // Uses the REMINIX_API_KEY environment variable.
  const reminix = createClient();
  const auditEvents = await reminix.workspace.auditEvents.list();
  console.log(auditEvents);
  ```

* Python

  ```python
  from reminix import Reminix

  # Uses the REMINIX_API_KEY environment variable.
  reminix = Reminix()
  audit_events = reminix.workspace.audit_events.list()
  print(audit_events)
  ```

* CLI

  ```bash
  reminix workspace audit-events list
  ```

* curl

  ```bash
  curl -X GET "https://api.reminix.com/v1/workspace/audit-events" \
    -H "Authorization: Bearer $REMINIX_API_KEY"
  ```

**Returns:**

```json
{
  "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.
