Set Alert Rule
sonar_set_alertWRITE tool — create or update an alert subscription in the caller's Sonar workspace. Upserts on (type + scope): re-submitting the same type/scope updates the existing rule. Omit threshold for the per-type default; omit scope_app_id for an org-wide rule. Requires an Indie plan (trial counts) and an authorized Sonar account or an API key with the write scope.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | The alert type to subscribe to. top_chart = one of your own apps entered or left a store top chart (overall + its category, free/paid/grossing). new_review = a new App Store review arrived for an own iOS app (needs App Store Connect connected and the review responder switched on for the app). | |
| cadence | No | new_review only: email cadence. instant = within ~5 minutes of the review syncing, hourly = at most one email an hour, daily = the 08:30 UTC digest. Omit to keep the stored value (daily on create). | |
| enabled | No | Whether the rule is active. Defaults to enabled when omitted. | |
| countries | No | top_chart only: storefronts to watch (ISO 3166-1 alpha-2, e.g. ["us", "de"]), max 10. Omit to keep the stored list; null or [] = the countries you track keywords in. | |
| threshold | No | Trigger threshold; omit or null for the default. rank_drop / rank_gain: positions moved (default 5). rating_drop: tenths of a star (default 2 = a 0.2-star drop). review_spike: new reviews since the previous daily snapshot (default 25). top_chart: rank cutoff, 1-200 (default 200). new_review: highest star rating that alerts, 1-5 (default 5 = every review; 3 = only 1-3★). Ignored by entered_top10, left_top10, new_ranking, competitor_change. | |
| scope_app_id | No | Limit the alert to a single app (Sonar app UUID). Omit or null for an org-wide rule covering all tracked apps. |