class Stytch::Fraud::Email
def initialize(connection)
def initialize(connection) @connection = connection end
def risk(
The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.
status_code::
The type of this field is +Integer+.
A score from 0 to 100 indicating how risky the email is. 100 is the most risky.
risk_score::
The type of this field is +RiskResponseAction+ (string enum).
* `CHALLENGE` - This email has some potentially fraudulent attributes. We recommend increased friction such as 2FA or other forms of extended user verification before allowing the privileged action to proceed.
* `BLOCK` - This email is invalid or exhibits signs of fraud. We recommend blocking the end user.
* `ALLOW` - This email is most likely safe to send to and not fraudulent.
The suggested action based on the attributes of the email address. The available actions are:
action::
The type of this field is +DomainInformation+ (+object+).
Information about the email domain.
domain_information::
The type of this field is +AddressInformation+ (+object+).
Information about the email address.
address_information::
The type of this field is +String+.
Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.
request_id::
An object with the following fields:
== Returns:
The type of this field is +String+.
The email address to check.
email_address::
== Parameters:
This feature is in beta. Reach out to us [here](mailto:fraud-team@stytch.com?subject=Email_Intelligence_Early_Access) if you'd like to request early access.
You can also check the `address_information` and `domain_information` fields for more information about the email address and email domain.
The response will contain a recommended action (`ALLOW`, `BLOCK`, or `CHALLENGE`) and a more granular `risk_score`.
Get risk information for a specific email address.
def risk( email_address: ) headers = {} request = { email_address: email_address } post_request('/v1/email/risk', request, headers) end