Create alert configuration
Creates a new alert configuration, or updates an existing one when id is given.
The alert filters can be given in one of two ways, but never both:
config: a structured filter object for the givennoti_type, the same configuration as returned by the alert configurations endpoint.input: a Query language expression. Use the Query language for complex filter expressions.
Before creating an alert fetch the available filters:
GET /api/alerts/filterslists per alert type (noti_type) the filter fields that can be used inconfig, their accepted values, and whether your account can create alerts of that type.GET /api/alerts/query/grammarreturns the Query language syntax.GET /api/alerts/query/grammar?target=option_tradethe full field reference for one target.
Example with a structured config:
{
"name": "FED news",
"noti_type": "news",
"config": {"symbols": "all", "contains": ["FED"]}
}
Example with a Query language input:
{
"name": "Energy sector calls",
"noti_type": "flow_alerts",
"input": "add @energy where calls and volume > 100 and (dte > 10 or (dte = 0 and ticker = 'XOM'))"
}
The created alerts are delivered like the alerts created on https://unusualwhales.com/custom-alerts
and their triggers can be fetched from the alerts endpoint or streamed over the custom_alerts websocket channel.
The alerts and usage of the websocket are the easiest way to setup and get notified on anything that matches your filter configs. The query language is a powerful tool to create complex configurations in a SQL like language.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Alert configuration
- Create alert config request
- Create alert config request
Creates a new alert configuration, or updates an existing one when id is given.
The alert filters can be given in one of two ways, but never both:
config: a structured filter object for the givennoti_type. Fetch the available filter fields per alert type fromGET /api/alerts/filters.input: a DSL expression such asadd @energy where calls and volume > 100. Fetch the DSL grammar fromGET /api/alerts/query/grammar. Thenoti_typefield is required for DSL expressions.
An alert configuration, there is no fixed schema for this as each alert will have a different configuration.
"Chain OI Chg: TGT241122C00177500"
"chain_oi_change"
When given, updates the existing alert configuration with this id instead of creating a new one.
A DSL expression describing the alert filters. Use instead of config for complex filter expressions. See the DSL grammar endpoint for the syntax.
"where calls and volume > 100 and premium > 10000"
active, rate_limit, paused "active"
Response
The created or updated alert configuration
The created or updated alert configuration
