Skip to content

Webhooks

Getting started with webhooks

Be sure to verify the signatures of POST requests sent to your server.

Verifying Webhook Signatures

Webhooks notify your application on your server of events on AuthRamp that your code may want to take action upon. Currently, AuthRamp supports four webhook endpoints, which are configured on the AuthRamp dashboard.

Webhook Configuration Section

  • User created: Invoked upon new user creation
  • User updated: Invoked when data about a user is changed, such as email address, name, etc
  • User recovery: Invoked on account recovery events, such as when a user has forgotten their password
  • User login: Invoked when a user has logged in

When these endpoints are specified, AuthRamp will make HTTP POST requests to their locations on those events.

Be sure to use encryption (https) for your endpoints to protect user.

Payloads

Note that user create, update, and login all have very similar payloads, while the user recovery payload is a bit different.

{
    "event": "user.create",
    "triggered": "2020-10-01T13:58:57.373810+00:00",
    "user": {
        "id": "u-69088",
        "name": "Joe User",
        "status": "Active",
        "two_factor_policy": "always",
        "has_recovery_codes": true,
        "last_login": "2020-10-01T13:51:59.227471",
        "email_addresses": [
            {
                "id": "e-626ba",
                "email": "joe.user@site",
                "is_verified": true,
                "is_primary": true
            }
        ],
        "phone_numbers": [
            {
                "id": "ph-02a5c",
                "phone": "+1 303-555-1234",
                "is_verified": true,
                "is_primary": true
            }
        ],
        "primary_verified_phone": "+1 303-555-1234",
        "primary_verified_email": "joe.user@site",
        "federated_credentials": []
    }
}
{
    "event": "user.update",
    "triggered": "2020-10-01T13:58:57.373810+00:00",
    "user": {
        "id": "u-69088",
        "name": "Joe User",
        "status": "Active",
        "two_factor_policy": "always",
        "has_recovery_codes": true,
        "last_login": "2020-10-01T13:51:59.227471",
        "email_addresses": [
            {
                "id": "e-626ba",
                "email": "joe.user@site",
                "is_verified": true,
                "is_primary": true
            }
        ],
        "phone_numbers": [
            {
                "id": "ph-02a5c",
                "phone": "+1 303-555-1234",
                "is_verified": true,
                "is_primary": true
            }
        ],
        "primary_verified_phone": "+1 303-555-1234",
        "primary_verified_email": "joe.user@site",
        "federated_credentials": []
    }
}
{
    "event": "user.login",
    "triggered": "2020-10-01T13:58:57.373810+00:00",
    "user": {
        "id": "u-69088",
        "name": "Joe User",
        "status": "Active",
        "two_factor_policy": "always",
        "has_recovery_codes": true,
        "last_login": "2020-10-01T13:51:59.227471",
        "email_addresses": [
            {
                "id": "e-626ba",
                "email": "joe.user@site",
                "is_verified": true,
                "is_primary": true
            }
        ],
        "phone_numbers": [
            {
                "id": "ph-02a5c",
                "phone": "+1 303-555-1234",
                "is_verified": true,
                "is_primary": true
            }
        ],
        "primary_verified_phone": "+1 303-555-1234",
        "primary_verified_email": "joe.user@site",
        "federated_credentials": []
    }
}
{
    "event": "recovery.start",
    "triggered": "2020-10-01T14:03:48.776093+00:00",
    "recovery": {
        "id": "r-685aa",
        "status": "Pending",
        "user_id": "u-69088"
    }
}

Refer to our reference pages for possible status values.