Events represent activity that has occurred within WorkOS or within third-party identity and directory providers. They are used to keep your app in sync with WorkOS data. For more details on consuming events in your app, check out the data syncing guide.
Refer to the Events page for a full list of events that WorkOS emits.
List events for the current environment.
import { WorkOS } from '@workos-inc/node'; const workos = new WorkOS(process.env.WORKOS_API_KEY); const listOfEvents = await workos.events.listEvents({ events: [ 'dsync.activated', 'dsync.deleted', 'dsync.user.created', 'dsync.user.updated', 'dsync.user.deleted', ], });
GET/eventsParameters Returns object