Update a Monitor by ID
⚠️ This endpoint is currently in beta and may be subject to change. It is supported by New Monitors and Alerts and may not be viewable in the UI today.
Update an existing monitor
Path Parameters
organization_id_or_slug(string)REQUIREDThe ID or slug of the organization the resource belongs to.
detector_id(integer)REQUIREDThe ID of the monitor you'd like to query.
Body Parameters
name(string)REQUIREDName of the monitor.
type(string)REQUIREDThe type of monitor -
metric_issue.data_sources(array(undefined))The data sources for the monitor to use based on what you want to measure.
Number of Errors Metric Monitor
Copied[ { "aggregate": "count()", "dataset" : "events", "environment": "prod", "eventTypes": ["default", "error"], "query": "is:unresolved", "queryType": 0, "timeWindow": 3600, }, ],Users Experiencing Errors Metric Monitor
Copied[ { "aggregate": "count_unique(tags[sentry:user])", "dataset" : "events", "environment": "prod", "eventTypes": ["default", "error"], "query": "is:unresolved", "queryType": 0, "timeWindow": 3600, }, ],Throughput Metric Monitor
Copied[ { "aggregate":"count(span.duration)", "dataset":"events_analytics_platform", "environment":"prod", "eventTypes":["trace_item_span"] "query":"", "queryType":1, "timeWindow":3600, "extrapolationMode":"unknown", }, ],Duration Metric Monitor
Copied[ { "aggregate":"p95(span.duration)", "dataset":"events_analytics_platform", "environment":"prod", "eventTypes":["trace_item_span"] "query":"", "queryType":1, "timeWindow":3600, "extrapolationMode":"unknown", }, ],Failure Rate Metric Monitor
Copied[ { "aggregate":"failure_rate()", "dataset":"events_analytics_platform", "environment":"prod", "eventTypes":["trace_item_span"] "query":"", "queryType":1, "timeWindow":3600, "extrapolationMode":"unknown", }, ],Largest Contentful Paint Metric Monitor
Copied[ { "aggregate":"p95(measurements.lcp)", "dataset":"events_analytics_platform", "environment":"prod", "eventTypes":["trace_item_span"] "query":"", "queryType":1, "timeWindow":3600, "extrapolationMode":"unknown", }, ],config(object)The issue detection type configuration.
detectionTypestatic: Threshold based monitorpercent: Change based monitordynamic: Dynamic monitor
comparisonDelta: If selecting a change detection type, the comparison delta is the time period at which to compare against in minutes. For example, a value of 3600 compares the metric tracked against data 1 hour ago.300: 5 minutes900: 15 minutes3600: 1 hour86400: 1 day604800: 1 week2592000: 1 month
Threshold
Copied{ "detectionType": "static", }Change
Copied{ "detectionType": "percent", "comparisonDelta": 3600, }Dynamic
Copied{ "detectionType": "dynamic", }condition_groupIssue detection configuration for when to create an issue and at what priority level.
-
logicType:any -
type: Any ofgt(greater than),lte(less than or equal), oranomaly_detection(dynamic) -
comparison: Any positive integer. This is threshold that must be crossed for the monitor to create an issue, e.g. "Create a metric issue when there are more than 5 unresolved error events".- If creating a dynamic monitor, see the options below.
seasonality:autosensitivity: Level of responsiveness. Options are one oflow,medium, orhighthresholdType: If you want to be alerted to anomalies that are moving above, below, or in both directions in relation to your threshold.0: Above1: Below2: Above and below
- If creating a dynamic monitor, see the options below.
-
conditionResult: The issue state change when the threshold is crossed.75: High priority50: Low priority0: Resolved
Threshold and Change Monitor
Copied"logicType": "any", "conditions": [ { "type": "gt", "comparison": 10, "conditionResult": 75 }, { "type": "lte", "comparison": 10, "conditionResult": 0 } ], "actions": []Threshold Monitor with Medium Priority
Copied"logicType": "any", "conditions": [ { type: "gt", comparison: 5, conditionResult: 75 }, { type: "gt", comparison: 2, conditionResult: 50 }, { type: "lte", comparison: 2, conditionResult: 0 } ], "actions": []Dynamic Monitor
Copied"logicType": "any", "conditions": [ { "type": "anomaly_detection", "comparison": { "seasonality": "auto", "sensitivity": "medium", "thresholdType": 2 }, "conditionResult": 75 } ], "actions": []-
owner(string)The user or team who owns the monitor.
User
Copied"type": "user", "id": "12345", "name": "Jane Doe", "email": "jane.doe@sentry.io"Team
Copied"type": "team", "id": "123456789", "name": "example-team"description(string)A description of the monitor. Will be used in the resulting issue.
enabled(boolean)Set to False if you want to disable the monitor.
Scopes
<auth_token> requires one of the following scopes:alerts:writeorg:adminorg:readorg:write
curl https://sentry.io/api/0/organizations/{organization_id_or_slug}/detectors/{detector_id}/ \ -H 'Authorization: Bearer <auth_token>' \ -X PUT \ -H 'Content-Type: application/json' \ -d '{}'
Copied{ "id": "12345", "projectId": "1", "name": "Updated monitor", "description": null, "type": "metric_issue", "workflowIds": [], "owner": { "type": "user", "id": "4567", "name": "Jane Doe", "email": "jane@example.io" }, "createdBy": "45678", "dateCreated": "2026-01-09T18:47:41.596427Z", "dateUpdated": "2026-01-12T21:30:07.354861Z", "dataSources": [ { "id": "2345", "organizationId": "1", "type": "snuba_query_subscription", "sourceId": "1234", "queryObj": { "id": "3456", "status": 0, "subscription": "55/abc123def456ghi789", "snubaQuery": { "id": "56789", "dataset": "events_analytics_platform", "query": "", "aggregate": "p95(measurements.lcp)", "timeWindow": 3600, "environment": null, "eventTypes": [ "trace_item_span" ], "extrapolationMode": "unknown" } } } ], "conditionGroup": { "id": "12345678", "organizationId": "1", "logicType": "any", "conditions": [ { "id": "234567", "type": "gt", "comparison": 5, "conditionResult": 75 }, { "id": "234568", "type": "lte", "comparison": 5, "conditionResult": 0 } ], "actions": [] }, "config": { "detectionType": "static" }, "enabled": true, "latestGroup": { "id": "123456789", "title": "Test monitor", "culprit": "", "shortId": "SENTRY-1A2B", "level": "error", "status": "resolved", "substatus": null, "platform": "python", "project": { "id": "1", "name": "Backend", "slug": "sentry", "platform": "python" }, "type": "generic", "issueType": "metric_issue", "issueCategory": "metric", "metadata": { "title": "Test monitor", "value": "Critical: Number of events in the last hour above 5", "initial_priority": 75 }, "numComments": 0, "firstSeen": "2026-01-09T18:48:15.250134Z", "lastSeen": "2026-01-09T18:48:15.250134Z" }, "openIssues": 0 }