post https://sandbox1-api.unit21.com/v1/alerts/create
Creates a new alert, sending alert data in the request body.
To create an Alert, you MUST include the following fields: alert_id
, alert_type
, created_at
, title
, and status
. The other top-level fields are optional.
If we receive a request to create an alert for an alert_id
that already exists in our system, we will respond with a 409 error code indicating that this alert cannot be created/updated. You must use the /alert/update
endpoint to update an alert.
You can add the following objects to an alert:
Field | Type | Description |
---|---|---|
rules | String[] | Unique identifier of the rules/triggers/scenarios that triggered this alert |
events | Object[] | Transactions affiliated with the alert. Each object must consist of a event_id and event_type field |
entities | Object[] | Users or businesses affiliated with the alert. Each object must consist of an entity_id and entity_type field |
instruments | String[] | Unique identifiers of any instruments affiliated with the alert |
watchlist | Object | Watchlist affiliated with the alert. Watchlist must be accompanied with one and only one entity matched against to |
Updates to an alert's alert_id
are not allowed.
Follow the links for more information:
The response will consist of the following fields:
Field | Type | Description |
---|---|---|
alert_id | String | Unique identifier of the alert on your platform |
unit21_id | String | Internal ID of the alert within Unit21's system |
previously_existed | Boolean | If alert (with the same alert_id ) already exists |