vercel alerts
The vercel alerts command lists recent alerts for the linked project, a specific project, or an entire team. The inspect subcommand shows details for a single alert group, and the rules subcommand tree manages alert rules from the terminal.
By default, vercel alerts reads alerts for the linked project from the last 24 hours. You can change the scope with --project or --all, filter by alert type, change the time range, and switch between table, AI investigation, or JSON output.
Use this command when you want to inspect alert activity from the terminal without opening the dashboard.
# List alerts for the linked project from the last 24 hours
vercel alerts
# List team-wide alerts
vercel alerts --all
# Filter by alert type and time range
vercel alerts --type usage_anomaly --since 2026-03-01T00:00:00.000ZUsing the vercel alerts command to list recent alerts for a project or team.
These options only apply to the vercel alerts command.
The --project option, shorthand -p, lists alerts for a specific project and overrides the linked project. Pass the project name (the name shown in the dashboard and vercel project ls) or its ID, for example my-app or prj_abc123.
vercel alerts --project my-appYou can't combine --project with --all.
The --all option, shorthand -a, lists team-wide alerts instead of using the linked project.
vercel alerts --allYou must be in team scope to use --all.
The --type option filters by alert type. You can repeat the flag or pass comma-separated values.
vercel alerts --type usage_anomaly
vercel alerts --type usage_anomaly,error_anomaly
vercel alerts --type usage_anomaly --type error_anomalyThe --ai option prints AI investigation sections instead of the default table output.
This view includes the alert title, resolved time, summary, and key findings when that data is available.
vercel alerts --aiThe --since option sets the start of the time range. Use an ISO 8601 timestamp.
If you don't pass --since or --until, the command defaults to the last 24 hours.
vercel alerts --since 2026-03-01T00:00:00.000ZThe --until option sets the end of the time range. Use an ISO 8601 timestamp.
vercel alerts --since 2026-03-01T00:00:00.000Z --until 2026-03-02T00:00:00.000Z--since must be earlier than --until.
The --limit option sets the maximum number of alert groups to return.
The supported range is 1 through 100.
vercel alerts --limit 25The --format option supports json output for scripting and automation.
vercel alerts --format jsonWhen you use --format json, the command returns a groups array with the alert group payload from the API.
List alerts for the linked project:
vercel alertsList team-wide alerts:
vercel alerts --allFilter by usage and error anomalies:
vercel alerts --type usage_anomaly --type error_anomalyPrint AI investigation summaries for a custom time range:
vercel alerts --ai --since 2026-03-01T00:00:00.000Z --until 2026-03-02T00:00:00.000ZExport alerts as JSON:
vercel alerts --format jsonShow details for a single alert group.
vercel alerts inspect <groupId>| Name | Description |
|---|---|
groupId | Required. ID of the alert group to inspect. |
| Option | Description |
|---|---|
--format | Output format. Supports json. |
-p, --project | Project name or ID to filter by, for example my-app or prj_abc123. Overrides the auto-detected linked project. |
-a, --all | Use team-wide scope. Ignores linked project auto-scoping. |
Inspect a group in the linked project:
vercel alerts inspect grp_abc123Inspect as JSON:
vercel alerts inspect grp_abc123 --format jsonUse rule schemas to inspect the fields available to your selected team, then create, list, inspect, update, or delete alert rules.
Use vercel alerts rules --help to see the rules command tree.
Rule IDs are returned by rules add and shown by rules ls. Use those IDs with rules inspect, rules update, and rules rm.
| Command | Aliases | Description |
|---|---|---|
rules ls | list | List alert rules for a project or team. |
rules schema | None | Show available rule types, request fields, constraints, and examples. |
rules add | create | Create an alert rule from a JSON body file. |
rules inspect | get | Show one alert rule by ID. |
rules rm | remove, delete | Delete an alert rule. |
rules update | patch | Patch an alert rule or change its project scope. |
List alert rules that affect the linked project. Use --project to select another project or --all to list every accessible rule in the selected team.
Aliases: list.
vercel alerts rules ls| Option | Description |
|---|---|
-p, --project | List rules that affect a project by name or ID, for example my-app or prj_abc123. |
-a, --all | List every accessible rule in the selected team. |
--type | Filter by rule type. The option is repeatable and accepts comma-separated values. |
--format | Output format. Supports json. |
Use built-in to list built-in rules. For compatibility with previous CLI versions, rules ls --type also accepts supported built-in trigger types such as usage_anomaly and error_anomaly. Use vercel alerts rules schema --type built-in to inspect the trigger types available to your team.
# List rules for the linked project
vercel alerts rules ls
# List every rule in the selected team
vercel alerts rules ls --all
# JSON output
vercel alerts rules ls --all --format jsonrules ls retrieves every available page before printing results. JSON output contains a rules array with the matching rule objects.
Fetch the API-owned authoring schema for the rule types available to the selected team. Run the command without --type to list the available types, or select a type to see its create and update fields, constraints, and examples.
vercel alerts rules schema| Option | Description |
|---|---|
--type | Rule type to describe. |
--format | Output format. Supports json. |
# Show the fields and examples for built-in rules
vercel alerts rules schema --type built-inCreate an alert rule from a JSON body file. The create body must set type. For a built-in rule, set type to built-in.
Aliases: create.
vercel alerts rules add --project my-app --body ./rule.json| Option | Description |
|---|---|
--body | Path to a JSON file containing the new rule. |
-p, --project | Apply a rule to one project. |
-a, --all | Apply a built-in rule to every project in the selected team. |
--format | Output format. Supports json. |
Create a JSON file for the rule body, then select the rule's project scope in one of these ways:
- Add
ruleScopeto the body. - Pass
--project <name-or-id>. - Pass
--allfor a built-in rule.
Do not combine ruleScope with --project or --all. A linked project does not supply the scope automatically when you create a rule.
Create a built-in error anomaly rule for one project:
{
"type": "built-in",
"name": "Production server errors",
"triggers": {
"mode": "selected",
"items": [
{
"type": "error_anomaly",
"filter": "statusGroup:5xx AND route:/api/*"
}
]
},
"matchMinimumSeverityLevel": "high"
}vercel alerts rules add --project my-app --body ./rule.jsonUse vercel alerts rules schema --type built-in for additional validated examples, filter syntax, and current constraints.
The current command rejects request bodies that contain the previous alertTypes field. Rewrite saved bodies using the current schema:
| Previous shape | Current shape |
|---|---|
alertTypes | Top-level type and, for built-in rules, triggers |
projectId expression or raw project ID | ruleScope, --project, or --all |
autosubscribeOwnersInKnock | notificationSettings.enableTeamOwnerNotifications |
Built-in filters use the syntax shown by the current schema. For example, an error anomaly filter uses statusGroup:5xx instead of the previous OData expression.
Show one alert rule by ID.
Aliases: get.
Rule IDs are unique within a team. Use the global --scope <team> option when the rule belongs to a team other than your current team. The --project and --all options are deprecated for this subcommand and do not narrow the request by project.
vercel alerts rules inspect <ruleId>| Name | Description |
|---|---|
ruleId | Required. ID of the rule to inspect. |
| Option | Description |
|---|---|
--format | Output format. Supports json. |
vercel alerts rules inspect ar_abc123
vercel alerts rules inspect ar_abc123 --format jsonDelete an alert rule. The selected team's default rule cannot be deleted.
Aliases: remove, delete.
Rule IDs are unique within a team. Use the global --scope <team> option when the rule belongs to a team other than your current team. The --project and --all options are deprecated for this subcommand and do not narrow the request by project.
vercel alerts rules rm <ruleId>| Name | Description |
|---|---|
ruleId | Required. ID of the rule to delete. |
| Option | Description |
|---|---|
--format | Output format. Supports json. |
-y, --yes | Skip the confirmation prompt. |
# Delete with confirmation
vercel alerts rules rm ar_abc123
# Delete without prompt
vercel alerts rules rm ar_abc123 --yes
# Delete by using the delete alias
vercel alerts rules delete ar_abc123 --yesPatch an alert rule from a JSON body file, change its project scope, or do both. Omitted body fields remain unchanged, and type is optional because the API infers it from the stored rule.
Aliases: patch.
vercel alerts rules update <ruleId> --body ./patch.json
vercel alerts rules update <ruleId> --project my-app| Name | Description |
|---|---|
ruleId | Required. ID of the rule to update. |
| Option | Description |
|---|---|
--body | Path to a partial JSON file with fields to update. |
-p, --project | Apply a rule to one project. |
-a, --all | Apply a built-in rule to every project in the selected team. |
--format | Output format. Supports json. |
You must provide --body, --project, or --all. Do not combine a ruleScope field in the body with --project or --all.
Save the fields you want to change in a JSON file:
{
"name": "Critical production errors",
"matchMinimumSeverityLevel": "critical"
}# Update fields from a file
vercel alerts rules update ar_abc123 --body ./patch.json
# Patch by using the patch alias
vercel alerts rules patch ar_abc123 --body ./patch.json
# Change scope without a body file
vercel alerts rules update ar_abc123 --project my-appThe authoring schema includes restrictions based on the stored rule. For example, the default rule accepts notification updates only.
Use --format json for scripting and automation. Rule commands write only JSON to standard output:
| Command | Output shape |
|---|---|
rules ls | { "rules": [...] } |
rules schema | { "schemaVersion": number, "ruleTypes": [...] } |
rules add, rules inspect, rules update | { "rule": {...} } |
rules rm | { "ok": true, "ruleId": "ar_...", "deleted": true } |
Validation failures return an error object with code and message. When the API identifies individual invalid fields, the object also includes an issues array with field paths and messages.
- To learn how to configure and receive alerts, see Alerts.
- If you want to automatically investigate alerts with AI, see Agent Investigation.
The following global options can be passed when using the vercel alerts command:
--cwd--debug--global-config--help--local-config--no-color--non-interactive--scope--team--token--version
For more information on global options and their usage, refer to the options section.
Was this helpful?