Skip to main content
GET
/
audit-events
JavaScript
import Courier from '@trycourier/courier';

const client = new Courier({
  apiKey: process.env['COURIER_API_KEY'], // This is the default and can be omitted
});

const auditEvents = await client.auditEvents.list();

console.log(auditEvents.paging);
{
  "paging": {
    "cursor": "MTpFWUNFRkRRN0c1WERTRTU2",
    "more": true
  },
  "results": [
    {
      "auditEventId": "abc-123",
      "actor": {
        "id": "abc-123",
        "email": "user@example.com"
      },
      "target": "string",
      "source": "string",
      "timestamp": "2024-01-15T10:30:00.000Z",
      "type": "string"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

cursor
string | null

A unique identifier that allows for fetching the next set of audit events.

Response

200 - application/json
paging
Paging · object
required
results
AuditEvent · object[]
required