Webhooks
Webhooks allow you to reliably receive an HTTP request when a specific action occurs, like a user signing up, joining an organization, or having their role change.
Some examples of things you can do include:
- Creating a copy of your users and organizations in your DB
- Signing up new users to your mailing list and sending them a welcome email
- Provisioning resources for a user right when they sign up
- Updating your billing information as new users join organizations within your product
You can set them up by going to the Integrations section of your dashboard followed by Webhooks. You can set up different endpoints for your test and production environments, so you can easily distinguish between the two. There's also a full event catalog with examples of what the events look like.
We use Svix for our Webhooks. To make sure that the requests are actually coming from us and not from a malicious actor, make sure to verify the messages you receive.
Here is a full list of events that you can subscribe to. Each webhook payload will include any relevant information as well as the event type:
org.api_key_deleted
: Event that happens whenever an organization API Key is deletedorg.created
: An organization was createdorg.deleted
: An organization was deletedorg.saml_removed
: A SAML connection has been removedorg.saml_setup
: An organization has set up SAMLorg.updated
: Some information about the organization has changed. To avoid the case where a webhook can be received out of order - we only record the org_id and ask you to fetch the latest information about the organization from our APIuser.added_to_org
: A user was added to an organizationuser.created
: A new user signed upuser.deleted
: A user was deleteduser.deleted_personal_api_key
: A personal API key has been deleteduser.disabled
: A user was manually disabled and can no longer log inuser.enabled
: A user was manually re-enabled and can log in againuser.impersonated
: One of your users has been impersonated by a member of your teamuser.invited_to_org
: A user has been invited to an organizationuser.locked
: A user's account has been locked for security reasonsuser.logged_out
: A user has logged outuser.login
: A user has logged in successfullyuser.removed_from_org
: A user was removed from an organizationuser.role_changed_within_org
: A user's role within an organization changeduser.updated
: Some information about the user has changed. To avoid the case where a webhook can be received out of order - we only record the user_id and ask you to fetch the latest information about the user from our API
We also provide you with the ability to send your own emails. Part of the setup process for sending your own emails is subscribing to webhook email events.
email.account_locked
: Too many incorrect login attemptsemail.confirmation_email
: A confirmation email should be sent to the useremail.merge_account_with_sso
: Logging into an account with a new sign-in method. Only required if the SSO provider doesn't validate emailsemail.mfa_account_locked
: Too many incorrect MFA attemptsemail.org_invite
: The user was invited to an organizationemail.org_now_requires_2fa
: 2FA is now required for the specified organization. The user receiving the email has not yet set up 2FAemail.otp_login
: User requested an OTP codeemail.passwordless_login
: Logging in via magic linkemail.reset_password
: Requesting a password resetemail.update_email
: User confirming their new email addressemail.waitlist_user_confirmation
: A user was invited off of the waitlistemail.waitlist_user_invitation
: A user signed up for a waitlist