All Skills > Feature Setup > Create Alert
Create alerts via Sentry's workflow engine API.
Use these API calls to resolve names to IDs as needed.
bash
API="https://{region}.sentry.io/api/0/organizations/{org}"
AUTH="Authorization: Bearer {token}"
# Find user ID by email
curl -s "$API/members/" -H "$AUTH" | python3 -c "
import json,sys
for m in json.load(sys.stdin):
if m.get('email')=='USER_EMAIL' or m.get('user',{}).get('email')=='USER_EMAIL':
print(m['user']['id']); break"
# List teams
curl -s "$API/teams/" -H "$AUTH" | python3 -c "
import json,sys
for t in json.load(sys.stdin):
print(t['id'], t['slug'])"
# List integrations (for Slack/PagerDuty)
curl -s "$API/integrations/" -H "$AUTH" | python3 -c "
import json,sys
for i in json.load(sys.stdin):
print(i['id'], i['provider']['key'], i['name'])"
Pick which issue events fire the workflow. Use
(triggers must always use this).
Conditions that must pass before actions execute. Use
,
, or
.
The field is polymorphic — its shape depends on the condition
:
Set
to
to invert (fire when condition is NOT met).
json
{
"name": "<Alert Name>",
"enabled": true,
"environment": null,
"config": { "frequency": 30 },
"triggers": {
"logicType": "any-short",
"conditions": [
{ "type": "first_seen_event", "comparison": true, "conditionResult": true }
],
"actions": []
},
"actionFilters": [{
"logicType": "all",
"conditions": [
{ "type": "issue_priority_greater_or_equal", "comparison": 75, "conditionResult": true },
{ "type": "event_frequency_count", "comparison": {"value": 50, "interval": "1hr"}, "conditionResult": true }
],
"actions": [{
"type": "email",
"integrationId": null,
"data": {},
"config": {
"targetType": "user",
"targetIdentifier": "<user_id>",
"targetDisplay": null
},
"status": "active"
}]
}]
}
: minutes between repeated notifications. Allowed values:
,
,
,
,
,
,
,
.
Expect HTTP
. The response contains the workflow
.
If the org lacks the
feature flag, the alert appears at: