Subscribing to webhooks
Overview
Frontegg allows developers to subscribe to webhooks in order to trigger automation workflows based on actions that occur on the Frontegg servers.
Examples use cases include:
- Register user on internal DB when the user is invited
- Send marketing email to the user upon first login
- Generate specific transactional flows based on login actions
Read below to learn how to subscribe to webhooks.
Step-By-Step Guide
Follow the steps below to subscribe to webhook events.
STEP 1: Add a new hook
In your Frontegg Portal, go to Environments ➜ [NAME OF ENVIRONMENT] ➜ Hooks.
For instance, go to the development environment at Environments ➜ Development ➜ Hooks.
Click on the "Webhooks" card:

The webhooks page will open and list all your existing webhooks.
Click on the Add New hook
button:

STEP 2: Select The Triggering Events
Select one or multiple events that will trigger the webhook.
See below the list of Frontegg events and their meaning.

STEP 3: Set Up The Webhook Details
-
URL - Enter the URL at which you will receive the webhook data. The URL acts like an address to which Frontegg can send a JSON message when the assigned events happen.
-
Secret key - Enter a value that is confidential. Frontegg will generate a header called
x-webhook-secret
and sign the webhook request using the secret.
For enhanced security, Frontegg recommends that you use the secret key.
Webhook response
Any 2XX code will be registered as success
Any 4XX code will be registered as failure
The response body can remain empty.

STEP 4: Test
To pass the test, make sure your URL endpoint is up and running and will return a 200 response to the webhook request.
You can also see an example of payload data that will be set.

And you are DONE

List of Frontegg Events
Authentication Events
Event | Event Key | When do we send it? |
---|---|---|
User authenticated | frontegg.user.authenticated | a user is authenticated |
User authenticated with MFA | frontegg.user.authenticatedWithMFA | a user authenticated using MFA |
User SAML authentication | frontegg.user.authenticatedWithSAML | a user is authenticated using SAML |
User SSO authentication | frontegg.user.authenticatedWithSSO | a user is authenticated using SSO |
User failed to authenticate | frontegg.user.failedAuthentication | a user tries to sign in and inputs incorrect credentials |
MFA Events
Event | Event Key | When do we send it? |
---|---|---|
User MFA enroll | frontegg.user.enrolledMFA | a user enrolls with MFA |
User disabled MFA | frontegg.user.disabledMFA | a user disabled MFA |
User disabled the last MFA device | frontegg.user.disabledLastMFADevice | a user disabled the latest MFA device used |
User Management Events
Event | Event Key | When do we send it? |
---|---|---|
User created | frontegg.user.created | a user is created |
User signed up | frontegg.user.signedUp | a user signs up |
User deleted | frontegg.user.deleted | a user is deleted |
User invited to tenant | frontegg.user.invitedToTenant | a user is invited to tenant |
User changed password | frontegg.user.changedPassword | a user changes their password |
User forgot password | frontegg.user.forgotPassword | a user forgets their password |
User invited to tenant | frontegg.user.invitedToTenant | a user was added or invited to tenant |
User removed from tenant | frontegg.user.removedFromTenant | a user is removed from tenant |
User updated | frontegg.user.updated | a user property was updated |
User API token created | frontegg.userApiToken.created | a user API token is created |
User API token deleted | frontegg.userApiToken.deleted | a user API token is deleted |
User activated | frontegg.user.activated | a user activates their account |
User accepted an email invitation to tenant | frontegg.user.acceptedInvitationToTenant | an existing user accepted tenant invitation via email |
User joined a tenant using an invitation link | frontegg.user.joinedTenantUsingInvitationLink | a user joined tenant using an invitation link |
Tenant Events
Event | Event Key | When do we send it? |
---|---|---|
Tenant created | frontegg.tenant.created | a tenant is created |
Tenant deleted | frontegg.tenant.deleted | a tenant is deleted |
Tenant updated | frontegg.tenant.updated | a tenant is updated |
Tenant API token created | frontegg.tenantApiToken.created | a tenant API token is created |
Tenant APi token deleted | frontegg.tenantApiToken.deleted | a tenant API token is deleted |
Domain Restriction Events
Event | Event Key | When do we send it? |
---|---|---|
Domain was added to signup restriction | frontegg.account.security.domain.added | a new domain was added to a list of domains restricted for signup |
Domain was removed from signup restriction | frontegg.account.security.domain.removed | a domain was removed from a list of domains restricted for signup |
Domain was restricted from signup | frontegg.account.security.domain.restricted | a user with restricted domain was blocked or allowed to signup |
Domain restriction strategy changed | frontegg.account.security.domain.strategy.changed | domain restriction policy has changed |
Domain signup restriction enabled | frontegg.account.security.domain.enabled | domain restriction settings were enabled |
Domain signup restriction disabled | frontegg.account.security.domain.disabled | domain restriction settings were disabled |
IP Restriction Events
Event | Event Key | When do we send it? |
---|---|---|
IP restriction rule added | frontegg.account.security.ip.added | IP address was added to IP restrictions list |
IP restriction rule removed | frontegg.account.security.ip.removed | IP address was removed from IP restrictions list |
IP restriction strategy changed | frontegg.account.security.ip.strategy.changed | IP restriction policy has changed |
Creating a new environment
When copying a project from one environment to another, webhooks configurations are not being copied between the environments.
Updated about 1 month ago