Rule request bodies
{
"unit21_id": 11533652,
"rule_id": null,
"change": "CREATED",
"object_type": "RULE",
"title": "Webhook test",
"description": "Test",
"changed_by": "[email protected]",
"change_time": 1661966004,
"created_by": "[email protected]",
"flagged_entities": [],
"flagged_events": [],
"flagged_instruments": [],
"tags": []
}
For the webhook CREATED
, the following fields are sent:
Field Name | Value Type | Details |
---|---|---|
unit21_id | Number | A Unit21 internally-assigned unique identifier for the alert within our system |
rule_id | String | A non-Unit21 identifier for the rule |
change | String | A Unit21-defined value describing the nature of the change to this rule. For more details on this, see above section Change trigger types |
object_type | String | RULE |
title | String | Title assigned to the rule |
description | String | A high level descriptive phrase about the rule |
changed_by | String | Email address of the agent that triggered the status change (if applicable) |
change_time | Number | Time the change was triggered in Epoch time format (number of seconds elapsed since 1 Jan 1970 00:00:00 UTC) |
created_by | String | Email address of the agent that created this rule initially |
flagged_entities | Object[] | An object list of entities flagged by the rule. Each object contains a Unit21 ID, the entity type (user or business ), a non-Unit21 identifier, and a resolution |
flagged_events | Object[] | An object list of events flagged by the rule. Each object contains a Unit21 ID, the event type (transaction or action ), a non-Unit21 identifier, and a resolution |
flagged_instruments | Object[] | An object list of instruments flagged by the rule. Each object contains a Unit21 ID, the instrument type, a non-Unit21 identifier, and a resolution |
tags | String[] | A list of tags that are associated with this rule, always of the format key:value |
{
"unit21_id": 11484957,
"rule_id": null,
"change": "TRIGGERED",
"object_type": "RULE",
"title": "RTR $5k amount threshold",
"description": "sample real time rule",
"changed_by": null,
"change_time": 1661967668,
"created_by": "[email protected]",
"flagged_entities": [
{
"entity_id": "u-d8e1d453-c205-4996-a935-ff08be01bcd1",
"entity_type": null,
"unit21_id": 625240968,
"resolution": null
}
],
"flagged_events": [
{
"event_id": "re5terg54g4",
"event_type": "transaction",
"unit21_id": 2492941026,
"resolution": null
}
],
"flagged_instruments": [],
"tags": [],
"deploy_start_date": 1661967668,
"deploy_end_date": 1661967668
}
For the webhook TRIGGERED
, the following fields are sent in addition to the ones above:
Field Name | Value Type | Details |
---|---|---|
deploy_start_date | Number | Start datetime of the rule deployment in Epoch time format (number of seconds elapsed since 1 Jan 1970 00:00:00 UTC) |
deploy_end_date | Number | End datetime of the rule deployment in Epoch time format (number of seconds elapsed since 1 Jan 1970 00:00:00 UTC) |