Webhooks
When a fraud prevention rule is triggered, SmartID sends a request to a REST endpoint hosted by your organization. You must create and expose this web service to receive and process these action requests.
ON THIS PAGE
Request Payload
SmartID sends a POST request with the following JSON payload to your webhook endpoint.
Attributes
action integer required Action to execute. Default actions:
1 = Block user2 = Close session3 = Send email4 = Send SMS5 = Send email and SMS These are the default actions. Custom actions can be defined starting from 6 onwards.
channel integer required Channel identifier.
date datetime required Date and time when the rule was triggered (ISO 8601 format).
message string required Message to send to the user, or an HTML template.
reason integer required Identifier of the rule that was triggered.
session string required Session identifier.
client string required Hashed user identifier.
clientRSA string optional RSA-encrypted user identifier.
Your Webhook Endpoint
https://your-domain.com/smartid/webhook Authorization: Bearer <license_key> Your webhook endpoint must validate the Bearer token included in every request from SmartID.
{
"action": 4,
"channel": 1,
"date": "2021-07-28T09:13:35",
"message": "Login from a new device detected",
"reason": 12,
"session": "nmunx32$dsafnwu",
"client": "bb4e31eedfecacc00cb6...",
"clientRSA": "g4IRqSFWtn54tIEtrJkA3..."
} Expected Response
Your service must return the following JSON response:
code integer required 1 = Action executed successfully, 0 = Action not executed.
message string optional Optional description of the result or error.
{
"code": 1,
"message": "Action executed successfully"
}