Subscribing To Webhooks


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.


Moving Environments

When moving a project from one environment to another, Frontegg moves the hooks configurations for you. For instance, if moving from development to production, Frontegg moves the development hooks configurations to production.

STEP 1: Enter Basic Details

In your Frontegg Portal, go to Environments ➜ [NAME OF ENVIRONMENT] ➜ Hooks.


For instance, go to the development environment at Environments ➜ Development ➜ Hooks.

The page lists all your webhooks and has a button for adding a new webhook.

Click on the Add New button, fill the hook details for display name, description, URL, secret key, and event settings.

The display name and description can be whatever you want.


STEP 2: Enter URL Address

Enter the URL at which you will receive the webhook data. The URL acts like an address that Frontegg can send a JSON message to when the assigned events happen.

Here is an example of the structure and content of the JSON.

  "user": {
    "id": "35639902-a53d-44c3-9aea-066b06569f78",
    "email": "[email protected]",
    "verified": null,
    "name": "cheli",
    "phoneNumber": null,
    "profilePictureUrl": "",
    "provider": "local",
    "mfaEnrolled": false,
    "metadata": "{}",
    "tenantIds": [
    "tenantId": "adf4c0a5-9a5e-4c51-a228-d008050c0e15",
    "roles": [],
    "permissions": [],
    "createdAt": "2021-05-02T11:25:22.000Z",
    "lastLogin": null,
    "isLocked": false,
    "activatedForTenant": true
  "eventContext": {
    "tenantId": "adf4c0a5-9a5e-4c51-a228-d008050c0e15"
    "userId": "35639902-a53d-44c3-9aea-066b06569f78" //note: userID is optional
  "eventKey": "frontegg.user.created"

STEP 3: Add 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 webhook secret.

STEP 4: Set Event Settings

Choose any events that will be fired for this hook and any categories the hook belongs to.

Read below to learn more about the available events in Frontegg.

Authentication Events


Event Key

When do we send it?

User authenticated


a user is authenticated

User SAML authentication


a user is authenticated using SAML

User SSO authentication


a user is authenticated using SSO

User failed to authenticate


a user tries to sign in and inputs incorrect credentials

MFA Events


Event Key

When do we send it?

User MFA enroll


a user enrolls with MFA

User disabled MFA


a user disables MFA

User Management Events


Event Key

When do we send it?

User created


a user is created

User signed up


a user signs up

User deleted


a user is deleted

User invited to tenant


a user is invited to tenant

User changed password


a user changes their password

User forgot password


a user forgets their password

User removed from tenant


a user is removed from tenant

User API token created


a user API token is created

User API token deleted


a user API token is deleted

User activated


a user activates their account

Tenant Events


Event Key

When do we send it?

Tenant created


a tenant is created

Tenant deleted


a tenant is deleted

Tenant updated


a tenant is updated

Tenant API token created


a tenant API token is created

Tenant APi token deleted


a tenant API token is deleted

Did this page help you?