WorkOS Docs Homepage
Events
API referenceDashboardSign In
Event typesOverviewOverviewAuthentication eventsAuthentication eventsConnection eventsConnection eventsDirectory Sync eventsDirectory Sync eventsEmail verification eventsEmail verification eventsFeature flag eventsFeature flag eventsInvitation eventsInvitation eventsMagic Auth eventsMagic Auth eventsOrganization eventsOrganization eventsOrganization domain eventsOrganization domain eventsOrganization membership eventsOrganization membership eventsPassword reset eventsPassword reset eventsRole eventsRole eventsSession eventsSession eventsUser eventsUser eventsData syncingOverviewOverviewSyncing with events APISyncing with events APISyncing with webhooksSyncing with webhooksData reconciliationData reconciliationObservabilityStreaming to DatadogStreaming to Datadog
API Reference
API Reference
Integrations
Integrations
Migrate to WorkOS
Migrate to WorkOS
SDKs
SDKs

Invitation events

Events emitted when users are invited to join an organization.

On this page

  • Invitation accepted
  • Invitation created
  • Invitation resent
  • Invitation revoked

Events emitted when an AuthKit user is invited to join an organization.

Invitation accepted

Event name: invitation.accepted

Triggered when a user accepts an invitation.

Payload data corresponds to the Invitation object with the token and accept_invitation_url omitted.

Invitation accepted event
JSON
{
"event": "invitation.accepted",
"id": "event_01HWWSM92W0M1GE0DV8BZS00E5",
"data": {
"object": "invitation",
"id": "invitation_01HWWSMMQSP0FAN9PF071E77W9",
"email": "todd@example.com",
"state": "accepted",
"accepted_at": "2023-11-16T21:32:25.235Z",
"revoked_at": null,
"expires_at": "2023-11-23T21:32:25.235Z",
"organization_id": "org_01HWWSSTF0QKDCXMZC911T8BTG",
"inviter_user_id": "user_01HYGAVW79Z32XVDXZJV0WM6Y9",
"accepted_user_id": "user_01HYGAVW79Z32XVDXZJV0WM6Y9",
"created_at": "2023-11-16T21:32:25.235Z",
"updated_at": "2023-11-16T21:32:25.235Z"
},
"created_at": "2023-11-16T22:32:25.239Z",
"context": {
"client_id": "client_123456789"
}
}

Invitation created

Event name: invitation.created

Triggered when a user is invited to sign up or to join an organization.

Payload data corresponds to the Invitation object with the token and accept_invitation_url omitted.

Invitation created event
JSON
{
"event": "invitation.created",
"id": "event_01HWWSM92W0M1GE0DV8BZS00E5",
"data": {
"object": "invitation",
"id": "invitation_01HWWSMMQSP0FAN9PF071E77W9",
"email": "todd@example.com",
"state": "pending",
"accepted_at": null,
"revoked_at": null,
"expires_at": "2023-11-23T21:32:25.235Z",
"organization_id": "org_01HWWSSTF0QKDCXMZC911T8BTG",
"inviter_user_id": "user_01HYGAVW79Z32XVDXZJV0WM6Y9",
"accepted_user_id": null,
"created_at": "2023-11-16T21:32:25.235Z",
"updated_at": "2023-11-16T21:32:25.235Z"
},
"created_at": "2023-11-16T21:32:25.239Z",
"context": {
"client_id": "client_123456789"
}
}

Invitation resent

Event name: invitation.resent

Triggered when an invitation is resent.

Payload data corresponds to the Invitation object with the token and accept_invitation_url omitted.

Invitation resent event
JSON
{
"event": "invitation.resent",
"id": "event_01HWWSM92W0M1GE0DV8BZS00E5",
"data": {
"object": "invitation",
"id": "invitation_01HWWSMMQSP0FAN9PF071E77W9",
"email": "todd@example.com",
"state": "pending",
"accepted_at": null,
"revoked_at": null,
"expires_at": "2023-11-23T21:32:25.235Z",
"organization_id": "org_01HWWSSTF0QKDCXMZC911T8BTG",
"inviter_user_id": "user_01HYGAVW79Z32XVDXZJV0WM6Y9",
"accepted_user_id": null,
"created_at": "2023-11-16T21:32:25.235Z",
"updated_at": "2023-11-16T21:32:25.235Z"
},
"created_at": "2023-11-16T22:32:25.239Z",
"context": {
"client_id": "client_123456789"
}
}

Invitation revoked

Event name: invitation.revoked

Triggered when an invitation is revoked.

Payload data corresponds to the Invitation object with the token and accept_invitation_url omitted.

Invitation revoked event
JSON
{
"event": "invitation.revoked",
"id": "event_01HWWSM92W0M1GE0DV8BZS00E5",
"data": {
"object": "invitation",
"id": "invitation_01HWWSMMQSP0FAN9PF071E77W9",
"email": "todd@example.com",
"state": "revoked",
"accepted_at": null,
"revoked_at": "2023-11-16T21:32:25.235Z",
"expires_at": "2023-11-23T21:32:25.235Z",
"organization_id": "org_01HWWSSTF0QKDCXMZC911T8BTG",
"inviter_user_id": "user_01HYGAVW79Z32XVDXZJV0WM6Y9",
"accepted_user_id": null,
"created_at": "2023-11-16T21:32:25.235Z",
"updated_at": "2023-11-16T21:32:25.235Z"
},
"created_at": "2023-11-16T22:32:25.239Z",
"context": {
"client_id": "client_123456789"
}
}
© WorkOS, Inc.
FeaturesAuthKitSingle Sign-OnDirectory SyncAdmin PortalFine-Grained Authorization
DevelopersDocumentationChangelogAPI Status
ResourcesBlogPodcastPricingSecuritySupport
CompanyAboutCustomersCareersLegalPrivacy
© WorkOS, Inc.