Skip to main content
The formo alerts command group manages project alerts. Alerts can notify email, Slack, or webhook recipients when event or user filters match.

formo alerts list

List alerts for the active project.
Requires alerts:read scope on your API key.

Options

OptionTypeRequiredDescription
--pagenumberPage number, 1-indexed
--sizenumberPage size
formo alerts list --size 25

formo alerts get <alertId>

Get a single alert by ID.
Requires alerts:read scope on your API key.
formo alerts get alert_abc123

formo alerts create

Create a new project alert.
Requires alerts:write scope on your API key.

Options

OptionTypeRequiredDescription
--namestringAlert name
--trigger-typeenumTrigger type: event or user
--trigger-filtersstringJSON array of trigger filter objects
--recipientstringJSON array of recipient objects
--secretstringWebhook secret for the alert
--slack-property-keysstringJSON array of event/user property keys to include in Slack alerts

Recipient Shape

--recipient is a JSON array. Each entry should include a type such as email, slack, or webhook, plus a value.
[
  { "type": "email", "value": ["team@example.com"] },
  { "type": "webhook", "value": ["https://example.com/formo-webhook"] }
]

Examples

formo alerts create --name "High value tx" --trigger-type event

formo alerts create \
  --name "Whale activity" \
  --trigger-type user \
  --trigger-filters '[{"name":"net_worth_usd","operator":"gt","value":100000}]' \
  --recipient '[{"type":"email","value":["team@example.com"]}]'

formo alerts create \
  --name "Slack revenue alert" \
  --trigger-type event \
  --trigger-filters '[{"name":"revenue","operator":"gt","numericThreshold":1000}]' \
  --recipient '[{"type":"slack","value":["#alerts"]}]' \
  --slack-property-keys '["event","revenue","address"]'

formo alerts update <alertId>

Update an existing alert.
Requires alerts:write scope on your API key.
The API expects the full alert configuration, so provide the required alert fields again when updating.

Options

OptionTypeRequiredDescription
--namestringAlert name
--trigger-typeenumTrigger type: event or user
--trigger-filtersstringJSON array of trigger filter objects
--recipientstringJSON array of recipient objects
--secretstringWebhook secret for the alert
--slack-property-keysstringJSON array of event/user property keys to include in Slack alerts
formo alerts update alert_abc123 \
  --name "Renamed alert" \
  --trigger-type event \
  --recipient '[{"type":"webhook","value":["https://example.com/formo-webhook"]}]'

formo alerts toggle <alertId>

Toggle an alert status.
Requires alerts:write scope on your API key.
OptionTypeRequiredDescription
--statusenumNew status: active or inactive. paused is accepted as a deprecated alias for inactive.
formo alerts toggle alert_abc123 --status inactive
formo alerts toggle alert_abc123 --status active

formo alerts test <alertId>

Send a test delivery for an alert.
Requires alerts:write scope on your API key.

Options

OptionTypeRequiredDescription
--sample-eventstringJSON object to use as the sample event
--sample-userstringJSON object to use as the sample user/profile
--recipient-overridesstringJSON array of recipient objects to test instead of saved recipients
formo alerts test alert_abc123 \
  --sample-event '{"event":"transaction","revenue":250}' \
  --recipient-overrides '[{"type":"email","value":["team@example.com"]}]'
Webhook tests require a public webhook URL. Localhost and private-network URLs are blocked by backend SSRF protections.

formo alerts delete <alertId>

Delete an alert.
Requires alerts:write scope on your API key.
formo alerts delete alert_abc123
Deleting an alert is permanent.