---
title: Events
description: Respond to activity that occurs within WorkOS and third-party providers.
originalPath: .tmp-workos-clone/packages/docs/content/events/index.mdx
---

Events represent activity that has occurred within WorkOS or within third-party identity and directory providers. Your app can [sync the data](/events/data-syncing) via either the events API or webhooks.

#### Event object

All event objects share a similar structure.

| Attribute    | Description                                                                |
| ------------ | -------------------------------------------------------------------------- |
| `event`      | A string that distinguishes the event type.                                |
| `id`         | Unique identifier for the event.                                           |
| `data`       | Event payload. Payloads match the corresponding [API objects](/reference). |
| `created_at` | Timestamp of when the event occurred.                                      |
| `context`    | An optional object of extra information relevant to the event.             |

## API key events {{ "url": "api-key" }}

Events emitted when [API keys](/authkit/api-keys) are created or revoked.

<Event.Root>
  <Event.Details name="api_key.created">
    <CodeBlock title="API key created event" file="event-api-key-created" />
  </Event.Details>
  <Event.Description>Triggered when an API key is created.</Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="api_key.revoked">
    <CodeBlock title="API key revoked event" file="event-api-key-revoked" />
  </Event.Details>
  <Event.Description>Triggered when an API key is revoked.</Event.Description>
</Event.Root>

## Authentication events {{ "url": "authentication" }}

Each step in the [authentication](/reference/authkit/authentication) flow emits an authentication event. Authentication success events are emitted even when additional steps, such as MFA, are required to complete the process.

<Event.Root mt="5">
  <Event.Details name="authentication.email_verification_failed" comingSoon>
    <CodeBlock
      title="Email verification failed event"
      file="event-authentication-email-verification-failed"
    />
  </Event.Details>
  <Event.Description>
    Triggered when a user fails to verify their email.
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="authentication.email_verification_succeeded">
    <CodeBlock
      title="Email verification succeeded event"
      file="event-authentication-email-verification-succeeded"
    />
  </Event.Details>
  <Event.Description>
    Triggered when a user successfully verifies their email.
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="authentication.magic_auth_failed">
    <CodeBlock
      title="Magic Auth failed event"
      file="event-authentication-magic-auth-failed"
    />
  </Event.Details>
  <Event.Description>
    Triggered when a user fails to authenticate via Magic Auth.
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="authentication.magic_auth_succeeded">
    <CodeBlock
      title="Magic Auth succeeded event"
      file="event-authentication-magic-auth-succeeded"
    />
  </Event.Details>
  <Event.Description>
    Triggered when a user successfully authenticates via Magic Auth.
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="authentication.mfa_failed" comingSoon>
    <CodeBlock
      title="MFA failed event"
      file="event-authentication-mfa-failed"
    />
  </Event.Details>
  <Event.Description>
    Triggered when a user fails to authenticate with a multi-factor
    authentication code.
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="authentication.mfa_succeeded">
    <CodeBlock
      title="MFA succeeded event"
      file="event-authentication-mfa-succeeded"
    />
  </Event.Details>
  <Event.Description>
    Triggered when a user successfully authenticates with a multi-factor
    authentication code.
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="authentication.oauth_failed">
    <CodeBlock
      title="OAuth failed event"
      file="event-authentication-oauth-failed"
    />
  </Event.Details>
  <Event.Description>
    Triggered when a user fails to authenticate via OAuth.
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="authentication.oauth_succeeded">
    <CodeBlock
      title="OAuth succeeded event"
      file="event-authentication-oauth-succeeded"
    />
  </Event.Details>
  <Event.Description>
    Triggered when a user successfully authenticates via OAuth.
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="authentication.password_failed">
    <CodeBlock
      title="Password authentication failed event"
      file="event-authentication-password-failed"
    />
  </Event.Details>
  <Event.Description>
    Triggered when a user fails to authenticate with password credentials.
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="authentication.password_succeeded">
    <CodeBlock
      title="Password authentication succeeded event"
      file="event-authentication-password-succeeded"
    />
  </Event.Details>
  <Event.Description>
    Triggered when a user successfully authenticates with password credentials.
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="authentication.passkey_failed">
    <CodeBlock
      title="Passkey authentication failed event"
      file="event-authentication-passkey-failed"
    />
  </Event.Details>
  <Event.Description>
    Triggered when a user fails to authenticate with a passkey.
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="authentication.passkey_succeeded">
    <CodeBlock
      title="Passkey authentication succeeded event"
      file="event-authentication-passkey-succeeded"
    />
  </Event.Details>
  <Event.Description>
    Triggered when a user successfully authenticates with a passkey.
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="authentication.sso_failed">
    <CodeBlock
      title="SSO failed event"
      file="event-authentication-sso-failed"
    />
  </Event.Details>
  <Event.Description>
    Triggered when a user fails to authenticate with Single Sign-On.
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="authentication.sso_succeeded">
    <CodeBlock
      title="SSO succeeded event"
      file="event-authentication-sso-succeeded"
    />
  </Event.Details>
  <Event.Description>
    Triggered when a user successfully authenticates with Single Sign-On.
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="authentication.radar_risk_detected">
    <CodeBlock
      title="Radar risk detected event"
      file="event-authentication-radar-risk-detected"
    />
  </Event.Details>
  <Event.Description>
    Triggered when an authentication succeeds but is flagged by Radar. For
    example, the authentication may have succeeded at passing a Radar challenge.
  </Event.Description>
</Event.Root>

## Connection events {{ "url": "connection" }}

Events emitted when Single Sign-On connections are activated, deactivated, or deleted. Also emitted when a SAML certificate is renewed for the connection.

<Event.Root mt="5">
  <Event.Details name="connection.activated">
    <CodeBlock
      title="Connection activated event"
      file="event-connection-activated"
    />
    <Event.Description>
      Payload `data` corresponds to the [Connection](/reference/sso/connection)
      object.
    </Event.Description>
  </Event.Details>
  <Event.Description>
    Triggered when a connection is activated.
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="connection.deactivated">
    <CodeBlock
      title="Connection deactivated event"
      file="event-connection-deactivated"
    />
    <Event.Description>
      Payload `data` corresponds to the [Connection](/reference/sso/connection)
      object.
    </Event.Description>
  </Event.Details>
  <Event.Description>
    Triggered when a connection is deactivated.
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="connection.deleted">
    <CodeBlock
      title="Connection deleted event"
      file="event-connection-deleted"
    />
    <Event.Description>
      Payload `data` corresponds to the [Connection](/reference/sso/connection)
      object.
    </Event.Description>
  </Event.Details>
  <Event.Description>
    Triggered when a connection is deleted. The `state` attribute indicates
    connection state before deletion.
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="connection.saml_certificate_renewed">
    <CodeBlock
      title="Connection certificate renewed event"
      file="event-connection-renewed"
    />
    <Event.Description>
      The `certificate_type` can be one of `ResponseSigning`, `RequestSigning`,
      or `ResponseEncryption`.
    </Event.Description>
  </Event.Details>
  <Event.Description>
    Triggered when a SAML certificate is renewed either in the Dashboard or
    Admin Portal.
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="connection.saml_certificate_renewal_required">
    <CodeBlock
      title="Connection certificate renewal required event"
      file="event-connection-renewal-required"
    />
    <Event.Description>
      The `certificate_type` can be one of `ResponseSigning`, `RequestSigning`,
      or `ResponseEncryption`.
    </Event.Description>
  </Event.Details>
  <Event.Description>
    Triggered when a SAML certificate is expiring (multiple events are sent out
    as it approaches expiry), or expired (once every 7 days after expiry).
  </Event.Description>
</Event.Root>

## Directory Sync events {{ "url": "directory-sync" }}

Events emitted when directory-related resources are changed. To learn what exactly each of these events represents, see the [in-depth Directory Sync events guide](/directory-sync/understanding-events).

<Event.Root mt="5">
  <Event.Details name="dsync.activated">
    <CodeBlock title="Directory activated event" file="event-dsync-activated" />
    <Event.Description>
      Payload `data` is based on the
      [Directory](/reference/directory-sync/directory) object, but the `domain`
      property is replaced with a `domains` array of [Organization
      Domain](reference/organization-domain).
    </Event.Description>
  </Event.Details>
  <Event.Description>
    Triggered when a [directory is
    activated](/directory-sync/understanding-events/directory-events/dsync-activated).
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="dsync.deleted">
    <CodeBlock title="Directory deleted event" file="event-dsync-deleted" />
    <Event.Description>
      Payload `data` is based on the
      [Directory](/reference/directory-sync/directory) object, except the
      `domain` property is omitted.
    </Event.Description>
  </Event.Details>
  <Event.Description>
    Triggered when a [directory is
    deleted](/directory-sync/understanding-events/directory-events/dsync-deleted).
    The `state` attribute indicates directory state before deletion.
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="dsync.group.created">
    <CodeBlock
      title="Directory group created event"
      file="event-dsync-group-created"
    />
    <Event.Description>
      Payload `data` corresponds to the [Directory
      Group](/reference/directory-sync/directory-group) object.
    </Event.Description>
  </Event.Details>
  <Event.Description>
    Triggered when a [directory group is
    created](/directory-sync/understanding-events/directory-group-events/dsync-group-created).
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="dsync.group.deleted">
    <CodeBlock
      title="Directory group deleted event"
      file="event-dsync-group-deleted"
    />
    <Event.Description>
      Payload `data` corresponds to the [Directory
      Group](/reference/directory-sync/directory-group) object.
    </Event.Description>
  </Event.Details>
  <Event.Description>
    Triggered when a [directory group is
    deleted](/directory-sync/understanding-events/directory-group-events/dsync-group-deleted).
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="dsync.group.updated">
    <CodeBlock
      title="Directory group updated event"
      file="event-dsync-group-updated"
    />
    <Event.Description>
      Payload `data` corresponds to the [Directory
      Group](/reference/directory-sync/directory-group) object.
    </Event.Description>
  </Event.Details>
  <Event.Description>
    Triggered when a [directory group is
    updated](/directory-sync/understanding-events/directory-group-events/dsync-group-updated).
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="dsync.group.user_added">
    <CodeBlock
      title="Directory group user added event"
      file="event-dsync-group-user-added"
    />
    <Event.Description>
      Payload `data` contains a `user` which corresponds to the [Directory
      User](/reference/directory-sync/directory-user) object and a `group` which
      corresponds to the [Directory
      Group](/reference/directory-sync/directory-group) object. The `groups`
      field is omitted from the `user` object to avoid performance issues in
      large directories.
    </Event.Description>
  </Event.Details>
  <Event.Description>
    Triggered when a [directory group user is
    added](/directory-sync/understanding-events/directory-group-events/dsync-group-user-added).
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="dsync.group.user_removed">
    <CodeBlock
      title="Directory group user removed event"
      file="event-dsync-group-user-removed"
    />
    <Event.Description>
      Payload `data` contains a `user` which corresponds to the [Directory
      User](/reference/directory-sync/directory-user) object and a `group` which
      corresponds to the [Directory
      Group](/reference/directory-sync/directory-group) object. The `groups`
      field is omitted from the `user` object to avoid performance issues in
      large directories.
    </Event.Description>
  </Event.Details>
  <Event.Description>
    Triggered when a [directory group user is
    removed](/directory-sync/understanding-events/directory-group-events/dsync-group-user-removed).
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="dsync.user.created">
    <CodeBlock
      title="Directory user created event"
      file="event-dsync-user-created"
    />
    <Event.Description>
      Payload `data` corresponds to the [Directory
      User](/reference/directory-sync/directory-user) object. The `groups` field
      is omitted to avoid performance issues in large directories.
    </Event.Description>
  </Event.Details>
  <Event.Description>
    Triggered when a [directory user is
    created](/directory-sync/understanding-events/directory-user-events/dsync-user-created).
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="dsync.user.deleted">
    <CodeBlock
      title="Directory user deleted event"
      file="event-dsync-user-deleted"
    />
    <Event.Description>
      Payload `data` corresponds to the [Directory
      User](/reference/directory-sync/directory-user) object. The `groups` field
      is omitted to avoid performance issues in large directories.
    </Event.Description>
  </Event.Details>
  <Event.Description>
    Triggered when a [directory user is
    deleted](/directory-sync/understanding-events/directory-user-events/dsync-user-deleted).
    The `state` attribute indicates directory user state at time of deletion.
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="dsync.user.updated">
    <CodeBlock
      title="Directory user updated event"
      file="event-dsync-user-updated"
    />
    <Event.Description>
      Payload `data` corresponds to the [Directory
      User](/reference/directory-sync/directory-user) object. The `groups` field
      is omitted to avoid performance issues in large directories.
    </Event.Description>
  </Event.Details>
  <Event.Description>
    Triggered when a [directory user is
    updated](/directory-sync/understanding-events/directory-user-events/dsync-user-updated).
  </Event.Description>
</Event.Root>

## Email verification events {{ "url": "email-verification" }}

Events emitted when a user is required to verify their email.

<Event.Root>
  <Event.Details name="email_verification.created">
    <CodeBlock
      title="Email verification created event"
      file="event-email-verification-created"
    />
    <Event.Description>
      Payload `data` corresponds to the [Email
      verification](/authkit/email-verification) object with the `code` omitted.
    </Event.Description>
  </Event.Details>
  <Event.Description>
    Triggered when a user is required to verify their email and a code is
    created.
  </Event.Description>
</Event.Root>

## Feature flag events {{ "url": "feature-flags" }}

Events emitted when WorkOS feature flags are created, updated, deleted, or their rules are updated.

<Event.Root>
  <Event.Details name="flag.created">
    <CodeBlock
      title="Feature flag created event"
      file="event-feature-flag-created"
    />
    <Event.Description>
      Payload `data` corresponds to the [Feature Flag](/reference/feature-flags)
      object.
    </Event.Description>
  </Event.Details>
  <Event.Description>
    Triggered when a feature flag is created.
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="flag.updated">
    <CodeBlock
      title="Feature flag updated event"
      file="event-feature-flag-updated"
    />
    <Event.Description>
      Payload `data` corresponds to the [Feature Flag](/reference/feature-flags)
      object.
    </Event.Description>
  </Event.Details>
  <Event.Description>
    Triggered when a feature flag is updated.
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="flag.deleted">
    <CodeBlock
      title="Feature flag deleted event"
      file="event-feature-flag-deleted"
    />
    <Event.Description>
      Payload `data` corresponds to the [Feature Flag](/reference/feature-flags)
      object.
    </Event.Description>
  </Event.Details>
  <Event.Description>
    Triggered when a feature flag is deleted.
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="flag.rule_updated">
    <CodeBlock
      title="Feature flag rule updated event"
      file="event-feature-flag-rule-updated"
    />
    <Event.Description>
      Payload `data` corresponds to the [Feature Flag](/reference/feature-flags)
      object.
    </Event.Description>
  </Event.Details>
  <Event.Description>
    Triggered when a feature flag's rules are modified.
  </Event.Description>
</Event.Root>

## Invitation events {{ "url": "invitation" }}

Events emitted when an [AuthKit user](/reference/authkit/user) is invited to join an organization.

<Event.Root>
  <Event.Details name="invitation.accepted">
    <CodeBlock
      title="Invitation accepted event"
      file="event-invitation-accepted"
    />
    <Event.Description>
      Payload `data` corresponds to the
      [Invitation](/reference/authkit/invitation) object with the `token` and
      `accept_invitation_url` omitted.
    </Event.Description>
  </Event.Details>
  <Event.Description>
    Triggered when a user accepts an invitation.
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="invitation.created">
    <CodeBlock
      title="Invitation created event"
      file="event-invitation-created"
    />
    <Event.Description>
      Payload `data` corresponds to the
      [Invitation](/reference/authkit/invitation) object with the `token` and
      `accept_invitation_url` omitted.
    </Event.Description>
  </Event.Details>
  <Event.Description>
    Triggered when a user is invited to sign up or to join an organization.
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="invitation.resent">
    <CodeBlock title="Invitation resent event" file="event-invitation-resent" />
    <Event.Description>
      Payload `data` corresponds to the
      [Invitation](/reference/authkit/invitation) object with the `token` and
      `accept_invitation_url` omitted.
    </Event.Description>
  </Event.Details>
  <Event.Description>Triggered when an invitation is resent.</Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="invitation.revoked">
    <CodeBlock
      title="Invitation revoked event"
      file="event-invitation-revoked"
    />
    <Event.Description>
      Payload `data` corresponds to the
      [Invitation](/reference/authkit/invitation) object with the `token` and
      `accept_invitation_url` omitted.
    </Event.Description>
  </Event.Details>
  <Event.Description>
    Triggered when an invitation is revoked.
  </Event.Description>
</Event.Root>

## Magic Auth events {{ "url": "magic-auth" }}

Events emitted when a user requests a Magic Auth code.

<Event.Root>
  <Event.Details name="magic_auth.created">
    <CodeBlock
      title="Magic Auth created event"
      file="event-magic-auth-created"
    />
    <Event.Description>
      Payload `data` corresponds to the [Magic
      Auth](/reference/authkit/magic-auth) object with the `code` omitted.
    </Event.Description>
  </Event.Details>
  <Event.Description>
    Triggered when a user initiates Magic Auth and an authentication code is
    created.
  </Event.Description>
</Event.Root>

## Organization events {{ "url": "organization" }}

Events emitted when WorkOS organizations are created, updated, or deleted.

<Event.Root>
  <Event.Details name="organization.created">
    <CodeBlock title="Organization created" file="event-organization-created" />
    <Event.Description>
      Payload `data` corresponds to the [Organization](/reference/organization)
      object.
    </Event.Description>
  </Event.Details>
  <Event.Description>
    Triggered when an organization is created.
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="organization.updated">
    <CodeBlock title="Organization updated" file="event-organization-updated" />
    <Event.Description>
      Payload `data` corresponds to the [Organization](/reference/organization)
      object.
    </Event.Description>
  </Event.Details>
  <Event.Description>
    Triggered when an organization is updated.
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="organization.deleted">
    <CodeBlock title="Organization deleted" file="event-organization-deleted" />
    <Event.Description>
      Payload `data` corresponds to the [Organization](/reference/organization)
      object.
    </Event.Description>
  </Event.Details>
  <Event.Description>
    Triggered when an organization is deleted
  </Event.Description>
</Event.Root>

## Organization domain events {{ "url": "organization-domain" }}

Events emitted when organization domains are created, updated, deleted, or their verification status changes.

<Event.Root mt="5">
  <Event.Details name="organization_domain.created">
    <CodeBlock
      title="Organization domain created event"
      file="event-organization-domain-created"
    />
    <Event.Description>
      Payload `data` corresponds to the [Organization
      Domain](/reference/domain-verification) object.
    </Event.Description>
  </Event.Details>
  <Event.Description>
    Triggered when an organization domain is created.
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="organization_domain.updated">
    <CodeBlock
      title="Organization domain updated event"
      file="event-organization-domain-updated"
    />
    <Event.Description>
      Payload `data` corresponds to the [Organization
      Domain](/reference/domain-verification) object.
    </Event.Description>
  </Event.Details>
  <Event.Description>
    Triggered when an organization domain is updated.
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="organization_domain.deleted">
    <CodeBlock
      title="Organization domain deleted event"
      file="event-organization-domain-deleted"
    />
    <Event.Description>
      Payload `data` corresponds to the [Organization
      Domain](/reference/domain-verification) object.
    </Event.Description>
  </Event.Details>
  <Event.Description>
    Triggered when an organization domain is deleted.
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="organization_domain.verified">
    <CodeBlock
      title="Organization domain verified event"
      file="event-organization-domain-verified"
    />
    <Event.Description>
      Payload `data` corresponds to the [Organization
      Domain](/reference/domain-verification) object.
    </Event.Description>
  </Event.Details>
  <Event.Description>
    Triggered when an organization domain is verified.
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="organization_domain.verification_failed">
    <CodeBlock
      title="Organization domain verification failed event"
      file="event-organization-domain-verification-failed"
    />
    <Event.Description>
      Payload `data` contains a `reason` and an `organization_domain` which
      corresponds to the [Organization Domain](/reference/domain-verification)
      object.
    </Event.Description>
  </Event.Details>
  <Event.Description>
    Triggered when an organization domain verification fails.
  </Event.Description>
</Event.Root>

## Organization membership events {{ "url": "organization-membership" }}

Events emitted when an [AuthKit user](/reference/authkit/user) joins or leaves an organization.

<Event.Root>
  <Event.Details name="organization_membership.created">
    <CodeBlock
      title="Organization membership created event"
      file="event-membership-created"
    />
    <Event.Description>
      Payload `data` corresponds to the [Organization
      Membership](/reference/authkit/organization-membership) object.
    </Event.Description>
  </Event.Details>
  <Event.Description>
    Triggered when an organization membership is created.
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="organization_membership.deleted">
    <CodeBlock
      title="Organization membership deleted event"
      file="event-membership-deleted"
    />
    <Event.Description>
      Payload `data` corresponds to the [Organization
      Membership](/reference/authkit/organization-membership) object.
    </Event.Description>
  </Event.Details>
  <Event.Description>
    Triggered when an organization membership is deleted.
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="organization_membership.updated">
    <CodeBlock
      title="Organization membership updated event"
      file="event-membership-updated"
    />
    <Event.Description>
      Payload `data` corresponds to the [Organization
      Membership](/reference/authkit/organization-membership) object.
    </Event.Description>
  </Event.Details>
  <Event.Description>
    Triggered when an organization membership is updated.
  </Event.Description>
</Event.Root>

## Organization role events {{ "url": "organization-role" }}

Events emitted when [organization roles](/reference/roles/organization-role) are created, updated, or deleted.

<Event.Root>
  <Event.Details name="organization_role.created">
    <CodeBlock
      title="Organization role created event"
      file="event-organization-role-created"
    />
    <Event.Description>
      Payload `data` corresponds to the organization role object.
    </Event.Description>
  </Event.Details>
  <Event.Description>
    Triggered when an organization role is created.
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="organization_role.deleted">
    <CodeBlock
      title="Organization role deleted event"
      file="event-organization-role-deleted"
    />
    <Event.Description>
      Payload `data` corresponds to the organization role object.
    </Event.Description>
  </Event.Details>
  <Event.Description>
    Triggered when an organization role is deleted.
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="organization_role.updated">
    <CodeBlock
      title="Organization role updated event"
      file="event-organization-role-updated"
    />
    <Event.Description>
      Payload `data` corresponds to the organization role object.
    </Event.Description>
  </Event.Details>
  <Event.Description>
    Triggered when an organization role is updated.
  </Event.Description>
</Event.Root>

## Password reset events {{ "url": "password-reset" }}

Events emitted when a user requests to reset their password.

<Event.Root>
  <Event.Details name="password_reset.created">
    <CodeBlock
      title="Password reset created event"
      file="event-password-reset-created"
    />
    <Event.Description>
      Payload `data` corresponds to the [Organization
      Membership](/reference/authkit/password-reset) object with the `token`
      omitted.
    </Event.Description>
  </Event.Details>
  <Event.Description>
    Triggered when a user requests to reset their password.
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="password_reset.succeeded">
    <CodeBlock
      title="Password reset succeeded event"
      file="event-password-reset-succeeded"
    />
    <Event.Description>
      Payload `data` corresponds to the [Password
      Reset](/reference/authkit/password-reset) object with the `token` omitted.
    </Event.Description>
  </Event.Details>
  <Event.Description>
    Triggered when a user successfully resets their password.
  </Event.Description>
</Event.Root>

## Permission events {{ "url": "permission" }}

Events emitted when [permissions](/reference/roles/permission) are created, updated, or deleted.

<Event.Root>
  <Event.Details name="permission.created">
    <CodeBlock
      title="Permission created event"
      file="event-permission-created"
    />
    <Event.Description>
      Payload `data` corresponds to the permission object.
    </Event.Description>
  </Event.Details>
  <Event.Description>Triggered when a permission is created.</Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="permission.deleted">
    <CodeBlock
      title="Permission deleted event"
      file="event-permission-deleted"
    />
    <Event.Description>
      Payload `data` corresponds to the permission object.
    </Event.Description>
  </Event.Details>
  <Event.Description>Triggered when a permission is deleted.</Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="permission.updated">
    <CodeBlock
      title="Permission updated event"
      file="event-permission-updated"
    />
    <Event.Description>
      Payload `data` corresponds to the permission object.
    </Event.Description>
  </Event.Details>
  <Event.Description>Triggered when a permission is updated.</Event.Description>
</Event.Root>

## Role events {{ "url": "role" }}

Events emitted when [environment roles](/reference/roles/role) are created, updated, or deleted.

<Event.Root>
  <Event.Details name="role.created">
    <CodeBlock title="Role created event" file="event-role-created" />
  </Event.Details>
  <Event.Description>Triggered when a role is created.</Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="role.deleted">
    <CodeBlock title="Role deleted event" file="event-role-deleted" />
  </Event.Details>
  <Event.Description>Triggered when a role is deleted.</Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="role.updated">
    <CodeBlock title="Role updated event" file="event-role-updated" />
  </Event.Details>
  <Event.Description>
    Triggered when a role's permissions are updated.
  </Event.Description>
</Event.Root>

## Session events {{ "url": "session" }}

Events emitted when AuthKit sessions are created.

<Event.Root>
  <Event.Details name="session.created">
    <CodeBlock title="Session created event" file="event-session-created" />
  </Event.Details>
  <Event.Description>
    Triggered when a session is created. Sessions started using
    [impersonation](/authkit/impersonation) will include an additional
    `impersonator` field with data about the impersonator.
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="session.revoked">
    <CodeBlock title="Session revoked event" file="event-session-revoked" />
  </Event.Details>
  <Event.Description>
    Triggered when an issued session is revoked for a user.
  </Event.Description>
</Event.Root>

## User events {{ "url": "user" }}

Events emitted when [AuthKit users](/reference/authkit/user) are created, updated, or deleted.

<Event.Root>
  <Event.Details name="user.created">
    <CodeBlock title="User created event" file="event-user-created" />
    <Event.Description>
      Payload `data` corresponds to the [User](/reference/authkit/user) object.
    </Event.Description>
  </Event.Details>
  <Event.Description>Triggered when a user is created.</Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="user.deleted">
    <CodeBlock title="User deleted event" file="event-user-deleted" />
    <Event.Description>
      Payload `data` corresponds to the [User](/reference/authkit/user) object.
    </Event.Description>
  </Event.Details>
  <Event.Description>Triggered when a user is deleted.</Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="user.updated">
    <CodeBlock title="User updated event" file="event-user-updated" />
    <Event.Description>
      Payload `data` corresponds to the [User](/reference/authkit/user) object.
    </Event.Description>
  </Event.Details>
  <Event.Description>Triggered when a user is updated.</Event.Description>
</Event.Root>

## Vault events {{ "url": "vault" }}

Events emitted when [Vault](/vault) data, keys, or metadata are accessed or modified. Each event payload includes an `actor_id`, `actor_source`, and `actor_name` identifying who performed the action.

<Event.Root mt="5">
  <Event.Details name="vault.data.created">
    <CodeBlock
      title="Vault data created event"
      file="event-vault-data-created"
    />
  </Event.Details>
  <Event.Description>
    Triggered when a new encrypted object is stored in Vault.
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="vault.data.deleted">
    <CodeBlock
      title="Vault data deleted event"
      file="event-vault-data-deleted"
    />
  </Event.Details>
  <Event.Description>
    Triggered when an encrypted object is deleted from Vault.
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="vault.data.read">
    <CodeBlock title="Vault data read event" file="event-vault-data-read" />
  </Event.Details>
  <Event.Description>
    Triggered when an encrypted object is read from Vault.
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="vault.data.updated">
    <CodeBlock
      title="Vault data updated event"
      file="event-vault-data-updated"
    />
  </Event.Details>
  <Event.Description>
    Triggered when an existing encrypted object is updated in Vault.
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="vault.dek.decrypted">
    <CodeBlock
      title="Vault DEK decrypted event"
      file="event-vault-dek-decrypted"
    />
  </Event.Details>
  <Event.Description>
    Triggered when a data encryption key (DEK) is decrypted.
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="vault.dek.read">
    <CodeBlock title="Vault DEK read event" file="event-vault-dek-read" />
  </Event.Details>
  <Event.Description>
    Triggered when one or more data encryption keys (DEKs) are read.
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="vault.kek.created">
    <CodeBlock title="Vault KEK created event" file="event-vault-kek-created" />
  </Event.Details>
  <Event.Description>
    Triggered when a new key encryption key (KEK) is created.
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="vault.metadata.read">
    <CodeBlock
      title="Vault metadata read event"
      file="event-vault-metadata-read"
    />
  </Event.Details>
  <Event.Description>
    Triggered when metadata for a Vault store is read.
  </Event.Description>
</Event.Root>

<Event.Root>
  <Event.Details name="vault.names.listed">
    <CodeBlock
      title="Vault names listed event"
      file="event-vault-names-listed"
    />
  </Event.Details>
  <Event.Description>
    Triggered when the list of Vault store names is retrieved.
  </Event.Description>
</Event.Root>
