curl -X PUT http://localhost:5080/api/v1/alerts/rules/$RULE_ID \ -H "authorization: Bearer $MS_JWT" \ -H 'content-type: application/json' \ --data-binary @- <<'EOF'{ "name": "High error rate", "description": "More than 200 errors in five minutes", "enabled": true, "kind": "scheduled", "query": { "language": "sql", "statement": "SELECT count(*) AS c FROM app WHERE level = 'error'", "period_secs": 300, "stream": { "name": "app", "stream_type": "logs" } }, "trigger": { "operator": "gt", "threshold": 200, "for_periods": 2, "silence_secs": 0 }, "severity": "critical", "labels": { "team": "checkout" }}EOF
Alerting
Update a rule
Replace the configuration of an alert rule.
curl -X PUT http://localhost:5080/api/v1/alerts/rules/$RULE_ID \ -H "authorization: Bearer $MS_JWT" \ -H 'content-type: application/json' \ --data-binary @- <<'EOF'{ "name": "High error rate", "description": "More than 200 errors in five minutes", "enabled": true, "kind": "scheduled", "query": { "language": "sql", "statement": "SELECT count(*) AS c FROM app WHERE level = 'error'", "period_secs": 300, "stream": { "name": "app", "stream_type": "logs" } }, "trigger": { "operator": "gt", "threshold": 200, "for_periods": 2, "silence_secs": 0 }, "severity": "critical", "labels": { "team": "checkout" }}EOF
PUT /api/v1/alerts/rules/{id}
Replaces the configuration of a rule. The body is the full body of Create a rule. The call keeps the rule id, organization, created_at, last_eval_at, and last_state. A changed escalation_policy_id must name a policy of the organization, or be default. The call requires alerts.manage.
The call replaces the rule and does not merge fields. An omitted field falls back to its default,
including enabled, which becomes true, and kind, which becomes scheduled. Omitted
labels, annotations, and thresholds become empty. Only an omitted escalation_policy_id
keeps the current policy. Read the rule first and send the complete body back with the change.
The fingerprint of an incident derives from the rule id and the rule labels. After a change to labels, an incident that is already open keeps its old fingerprint and no longer resolves automatically. Resolve it with Resolve an incident.
curl -X PUT http://localhost:5080/api/v1/alerts/rules/$RULE_ID \ -H "authorization: Bearer $MS_JWT" \ -H 'content-type: application/json' \ --data-binary @- <<'EOF'{ "name": "High error rate", "description": "More than 200 errors in five minutes", "enabled": true, "kind": "scheduled", "query": { "language": "sql", "statement": "SELECT count(*) AS c FROM app WHERE level = 'error'", "period_secs": 300, "stream": { "name": "app", "stream_type": "logs" } }, "trigger": { "operator": "gt", "threshold": 200, "for_periods": 2, "silence_secs": 0 }, "severity": "critical", "labels": { "team": "checkout" }}EOF
The response is the updated rule, in the shape shown in List rules.Errors
Status
Cause
400
The body fails the same checks as Create a rule, or a changed escalation_policy_id names no policy of the organization.
404
The rule does not exist.
422
A required field is missing or a value has the wrong type. The response is plain text.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"MoleSignal Docs","colors":{"primary":"#4F60E0","light":"#7682EB","dark":"#4F60E0"},"logo":{"light":"https://mintcdn.com/molesignal/UnXfA35CHCHELzmM/logo/light.svg?fit=max\u0026auto=format\u0026n=UnXfA35CHCHELzmM\u0026q=85\u0026s=6e3e3e0f3b8ba46e45ee5745c25f2cc8","dark":"https://mintcdn.com/molesignal/UnXfA35CHCHELzmM/logo/dark.svg?fit=max\u0026auto=format\u0026n=UnXfA35CHCHELzmM\u0026q=85\u0026s=376388c184d497ee9fbc624ff3e9ac9c"},"favicon":"https://mintcdn.com/molesignal/UnXfA35CHCHELzmM/favicon.svg?fit=max\u0026auto=format\u0026n=UnXfA35CHCHELzmM\u0026q=85\u0026s=9fab08b2e902e6a0498d1adc065db457","navbar":{"links":[{"href":"https://www.molesignal.com","label":"MoleSignal"}],"primary":{"type":"button","label":"MoleSignal Cloud","href":"https://www.molesignal.com/cloud"}},"errors":{"404":{"redirect":false,"title":"Page not found · 页面未找到","description":"The page does not exist or has moved. Press Cmd/Ctrl + K to search, or start from one of these pages.\u003cbr />该页面不存在或已移动。按 Cmd/Ctrl + K 搜索,或从下面的页面开始。\n\n\u003cCardGroup cols={2}>\n \u003cCard title=\"Quickstart\" icon=\"rocket\" href=\"/en-US/quickstart\">Run MoleSignal locally.\u003c/Card>\n \u003cCard title=\"快速开始\" icon=\"rocket\" href=\"/zh-Hans/quickstart\">在本地运行 MoleSignal。\u003c/Card>\n \u003cCard title=\"Documentation home\" icon=\"book\" href=\"/en-US\">Browse every guide.\u003c/Card>\n \u003cCard title=\"文档首页\" icon=\"book\" href=\"/zh-Hans\">浏览全部指南。\u003c/Card>\n\u003c/CardGroup>"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"metadata":{"timestamp":true},"styling":{"latex":false},"navigation":{"languages":[{"language":"en","default":true,"footer":{"socials":{"github":"https://github.com/molesignal/molesignal","discord":"https://discord.gg/JXG98xA6FH"},"links":[{"header":"Product","items":[{"label":"Quickstart","href":"/en-US/quickstart"},{"label":"Core concepts","href":"/en-US/concepts"},{"label":"Open source edition","href":"/en-US/editions/open-source"},{"label":"Enterprise","href":"/en-US/editions/enterprise"},{"label":"MoleSignal Cloud","href":"/en-US/editions/cloud"}]},{"header":"Developers","items":[{"label":"API reference","href":"/en-US/api-reference"},{"label":"Inbound MCP","href":"/en-US/inbound-mcp"},{"label":"Changelog","href":"/en-US/changelog"},{"label":"Releases","href":"https://github.com/molesignal/molesignal/releases"}]},{"header":"Support","items":[{"label":"Contact support","href":"mailto:[email protected]"},{"label":"Discord","href":"https://discord.gg/JXG98xA6FH"},{"label":"Report an issue","href":"https://github.com/molesignal/molesignal/issues"}]}]},"href":"en-US"},{"language":"zh-Hans","footer":{"socials":{"github":"https://github.com/molesignal/molesignal","discord":"https://discord.gg/JXG98xA6FH"},"links":[{"header":"产品","items":[{"label":"快速开始","href":"/zh-Hans/quickstart"},{"label":"核心概念","href":"/zh-Hans/concepts"},{"label":"开源版","href":"/zh-Hans/editions/open-source"},{"label":"Enterprise","href":"/zh-Hans/editions/enterprise"},{"label":"MoleSignal Cloud","href":"/zh-Hans/editions/cloud"}]},{"header":"开发者","items":[{"label":"API 参考","href":"/zh-Hans/api-reference"},{"label":"Inbound MCP","href":"/zh-Hans/inbound-mcp"},{"label":"更新日志","href":"/zh-Hans/changelog"},{"label":"版本发布","href":"https://github.com/molesignal/molesignal/releases"}]},{"header":"支持","items":[{"label":"联系支持","href":"mailto:[email protected]"},{"label":"Discord 社区","href":"https://discord.gg/JXG98xA6FH"},{"label":"反馈问题","href":"https://github.com/molesignal/molesignal/issues"}]}]},"href":"zh-Hans"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"molesignal","hasAudioNarration":false,"actualSubdomain":"molesignal","customDomains":["docs.molesignal.com"],"gitSource":{"type":"github","owner":"molesignal","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"collectionId":"ca1231ce-d240-4fce-b734-c1746886e3d6","liveDeploymentHistoryId":"6ae21e2426f5cd559eccf85f","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae21e2426f5cd559eccf85f"},"feedback":{"thumbs":true,"edits":true,"issues":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ae21e2426f5cd559eccf85f","clientVersion":"0.0.4006","searchFilterCounts":[{"language":"en","tag":"User manual","count":93},{"language":"zh-Hans","tag":"用户手册","count":93},{"language":"en","tag":"API Reference","count":61},{"language":"zh-Hans","tag":"API 参考","count":61},{"language":"en","tag":"Observe","count":25},{"language":"zh-Hans","tag":"观察","count":25},{"language":"zh-Hans","tag":"告警","count":17},{"language":"en","tag":"RUM","count":16},{"language":"zh-Hans","tag":"用户体验","count":16},{"language":"en","tag":"Alerting","count":13},{"language":"en","tag":"Intake","count":11},{"language":"en","tag":"Best practices","count":11},{"language":"zh-Hans","tag":"数据采集","count":11},{"language":"zh-Hans","tag":"最佳实践","count":11},{"language":"en","tag":"Admin","count":10},{"language":"zh-Hans","tag":"管理","count":10},{"language":"zh-Hans","tag":"查询","count":10},{"language":"en","tag":"Get started","count":9},{"language":"en","tag":"Deploy \u0026 operate","count":9},{"language":"zh-Hans","tag":"部署与运维","count":9}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"privacy":{"consentBanner":{"enabled":true}},"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":".method-nav-pill{width:auto!important;flex-shrink:0}.method-nav-pill>span{white-space:nowrap}@media (min-width:1024px){#sidebar{width:22rem!important}#content-area[class*=\"lg:pl-[23.7rem]\"]{padding-left:27.7rem!important}}#content>.card-group:last-child:has(>.card[role=link]){column-gap:2rem!important;row-gap:0!important;margin-top:1.5rem;padding-top:.75rem;border-top:1px solid rgb(var(--gray-200))}.dark #content>.card-group:last-child:has(>.card[role=link]){border-top-color:rgb(var(--gray-800))}:is(\n #content > .card-group:last-child > .card[role=\"link\"],\n #content > .card[role=\"link\"]:last-child\n){margin:0!important;border:0!important;border-radius:.5rem!important;background:0 0!important;box-shadow:none!important;overflow:visible}#content>.card[role=link]:last-child{margin-top:1rem!important}:is(\n #content > .card-group:last-child > .card[role=\"link\"],\n #content > .card[role=\"link\"]:last-child\n ) [data-component-part=card-content-container]{padding:.75rem .5rem!important}:is(\n #content > .card-group:last-child > .card[role=\"link\"],\n #content > .card[role=\"link\"]:last-child\n ) [data-component-part=card-icon]{display:none}:is(\n #content > .card-group:last-child > .card[role=\"link\"],\n #content > .card[role=\"link\"]:last-child\n ) [data-component-part=card-title]{display:inline-flex;align-items:center;gap:.35rem;margin-top:0!important;color:rgb(var(--primary));font-size:.95rem;line-height:1.4}:is(\n #content > .card-group:last-child > .card[role=\"link\"],\n #content > .card[role=\"link\"]:last-child\n ) [data-component-part=card-title]::after{content:\"→\";font-weight:400;transition:transform .15s ease}:is(\n #content > .card-group:last-child > .card[role=\"link\"],\n #content > .card[role=\"link\"]:last-child\n ) [data-component-part=card-content]{margin-top:.15rem!important;font-size:.875rem;line-height:1.45}:is(\n #content > .card-group:last-child > .card[role=\"link\"],\n #content > .card[role=\"link\"]:last-child\n):hover{border-color:transparent!important;background:rgb(var(--primary)/.055)!important}:is(\n #content > .card-group:last-child > .card[role=\"link\"],\n #content > .card[role=\"link\"]:last-child\n ):hover [data-component-part=card-title]{text-decoration:underline;text-underline-offset:.2em}:is(\n #content > .card-group:last-child > .card[role=\"link\"],\n #content > .card[role=\"link\"]:last-child\n ):hover [data-component-part=card-title]::after{transform:translateX(.15rem)}:is(\n #content > .card-group:last-child > .card[role=\"link\"],\n #content > .card[role=\"link\"]:last-child\n):focus-visible{outline:0!important;background:rgb(var(--primary)/.09)!important}@media (min-width:1280px){#content-area[class*=\"lg:pl-[23.7rem]\"]{width:calc(100% - 32rem)!important}:root{--ms-doc-width:108rem}[class*=\"peer-[.is-not-center]:max-w-8xl\"],[class~=max-w-8xl]{max-width:var(--ms-doc-width)!important}}#ms-sidebar-toggle{display:none}@media (min-width:1024px){#ms-sidebar-toggle{position:fixed;top:8rem;left:21rem;z-index:31;display:flex;align-items:center;justify-content:center;width:1.6rem;height:1.6rem;padding:0;border:1px solid rgba(0,0,0,.12);border-radius:9999px;background:var(--background-light, #ffffff);color:#475569;cursor:pointer;opacity:.45;transition:opacity .15s ease,background .15s ease,color .15s ease}#ms-sidebar-toggle:hover,html.ms-sb-hover #ms-sidebar-toggle{opacity:1}#ms-sidebar-toggle:hover{color:#1e293b;border-color:rgba(0,0,0,.22)}html.dark #ms-sidebar-toggle{background:#0f172a;border-color:rgba(255,255,255,.16);color:#94a3b8}html.dark #ms-sidebar-toggle:hover{color:#e2e8f0;border-color:rgba(255,255,255,.3)}#ms-sidebar-toggle svg,html.ms-sb-animating #sidebar{transition:transform .2s ease}html.ms-sb-animating #content-area{transition:padding-left .2s ease,width .2s ease}html.ms-sb-animating #ms-sidebar-toggle{transition:opacity .15s ease,left .2s ease,background .15s ease,color .15s ease}#navbar{transform:none!important;transition:none!important}html.ms-sidebar-collapsed #sidebar{transform:translateX(calc(-1*var(--ms-sb-shift, 26rem)))}html.ms-sidebar-collapsed #ms-sidebar-toggle{left:.4rem!important}html.ms-sidebar-collapsed #ms-sidebar-toggle svg{transform:rotate(180deg)}html.ms-sidebar-collapsed #content-area{padding-left:2.75rem!important;width:100%!important}}#navbar div:has(>#theme-preference-menu-trigger){display:none}#navbar nav li.navbar-link>a{padding:.5rem .75rem;border-radius:.75rem;box-shadow:inset 0 0 0 1px rgb(var(--gray-400)/.3);transition:background-color .15s ease}#navbar nav li.navbar-link>a:hover{background:rgb(var(--gray-400)/.12)}html.dark #navbar nav li.navbar-link>a{box-shadow:inset 0 0 0 1px rgb(255 255 255/.16)}html.dark #navbar nav li.navbar-link>a:hover{background:rgb(255 255 255/.06)}.nav-tag-pill:has(>[data-nav-tag~=cloud]),.nav-tag-pill:has(>[data-nav-tag~=enterprise]){gap:.25rem}.nav-tag-pill>[data-nav-tag~=cloud],.nav-tag-pill>[data-nav-tag~=enterprise]{display:none}.nav-tag-pill:has(>[data-nav-tag~=cloud])::after,.nav-tag-pill:has(>[data-nav-tag~=enterprise])::before{padding:.125rem .5rem;border-radius:9999px;background-color:rgb(var(--primary)/.1);color:rgb(var(--primary));font-size:.65rem;font-weight:700;line-height:.8125rem}html.dark .nav-tag-pill:has(>[data-nav-tag~=cloud])::after,html.dark .nav-tag-pill:has(>[data-nav-tag~=enterprise])::before{color:rgb(var(--primary-light))}.nav-tag-pill:has(>[data-nav-tag~=enterprise])::before{content:\"enterprise\"}.nav-tag-pill:has(>[data-nav-tag~=cloud])::after{content:\"cloud\"}"}],"page":{"pagePath":"en-US/api/alerting/update-rule","slug":"/en-US/api/alerting/update-rule","pageMetadata":{"title":"Update a rule","description":"Replace the configuration of an alert rule.","zh-Hans_link":"/zh-Hans/api/alerting/update-rule","href":"/en-US/api/alerting/update-rule"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Replace the configuration of an alert rule.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`http`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`http`,children:_jsxs(_components.code,{language:`http`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`PUT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` /api/v1/alerts/rules/{id}`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Replaces the configuration of a rule. The body is the full body of `,_jsx(_components.a,{href:`/en-US/api/alerting/create-rule`,children:`Create a rule`}),`. The call keeps the rule `,_jsx(_components.code,{children:`id`}),`, organization, `,_jsx(_components.code,{children:`created_at`}),`, `,_jsx(_components.code,{children:`last_eval_at`}),`, and `,_jsx(_components.code,{children:`last_state`}),`. A changed `,_jsx(_components.code,{children:`escalation_policy_id`}),` must name a policy of the organization, or be `,_jsx(_components.code,{children:`default`}),`. The call requires `,_jsx(_components.code,{children:`alerts.manage`}),`.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`The call replaces the rule and does not merge fields. An omitted field falls back to its default,\nincluding `,_jsx(_components.code,{children:`enabled`}),`, which becomes `,_jsx(_components.code,{children:`true`}),`, and `,_jsx(_components.code,{children:`kind`}),`, which becomes `,_jsx(_components.code,{children:`scheduled`}),`. Omitted\n`,_jsx(_components.code,{children:`labels`}),`, `,_jsx(_components.code,{children:`annotations`}),`, and `,_jsx(_components.code,{children:`thresholds`}),` become empty. Only an omitted `,_jsx(_components.code,{children:`escalation_policy_id`}),`\nkeeps the current policy. Read the rule first and send the complete body back with the change.`]})}),`\n`,_jsxs(_components.p,{children:[`The fingerprint of an incident derives from the rule `,_jsx(_components.code,{children:`id`}),` and the rule `,_jsx(_components.code,{children:`labels`}),`. After a change to `,_jsx(_components.code,{children:`labels`}),`, an incident that is already open keeps its old fingerprint and no longer resolves automatically. Resolve it with `,_jsx(_components.a,{href:`/en-US/api/alerting/resolve-incident`,children:`Resolve an incident`}),`.`]}),`\n`,`\n`,_jsxs(_components.p,{children:[`The response is the updated rule, in the shape shown in `,_jsx(_components.a,{href:`/en-US/api/alerting/list-rules`,children:`List rules`}),`.`]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Errors`})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Cause`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsxs(_components.td,{children:[`The body fails the same checks as `,_jsx(_components.a,{href:`/en-US/api/alerting/create-rule`,children:`Create a rule`}),`, or a changed `,_jsx(_components.code,{children:`escalation_policy_id`}),` names no policy of the organization.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`404`})}),_jsx(_components.td,{children:`The rule does not exist.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`422`})}),_jsx(_components.td,{children:`A required field is missing or a value has the wrong type. The response is plain text.`})]})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Update a rule","description":"Replace the configuration of an alert rule.","zh-Hans_link":"/zh-Hans/api/alerting/update-rule","href":"/en-US/api/alerting/update-rule"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,RequestExample,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`http`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`http`,children:_jsxs(_components.code,{language:`http`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`PUT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` /api/v1/alerts/rules/{id}`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Replaces the configuration of a rule. The body is the full body of `,_jsx(_components.a,{href:`/en-US/api/alerting/create-rule`,children:`Create a rule`}),`. The call keeps the rule `,_jsx(_components.code,{children:`id`}),`, organization, `,_jsx(_components.code,{children:`created_at`}),`, `,_jsx(_components.code,{children:`last_eval_at`}),`, and `,_jsx(_components.code,{children:`last_state`}),`. A changed `,_jsx(_components.code,{children:`escalation_policy_id`}),` must name a policy of the organization, or be `,_jsx(_components.code,{children:`default`}),`. The call requires `,_jsx(_components.code,{children:`alerts.manage`}),`.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`The call replaces the rule and does not merge fields. An omitted field falls back to its default,\nincluding `,_jsx(_components.code,{children:`enabled`}),`, which becomes `,_jsx(_components.code,{children:`true`}),`, and `,_jsx(_components.code,{children:`kind`}),`, which becomes `,_jsx(_components.code,{children:`scheduled`}),`. Omitted\n`,_jsx(_components.code,{children:`labels`}),`, `,_jsx(_components.code,{children:`annotations`}),`, and `,_jsx(_components.code,{children:`thresholds`}),` become empty. Only an omitted `,_jsx(_components.code,{children:`escalation_policy_id`}),`\nkeeps the current policy. Read the rule first and send the complete body back with the change.`]})}),`\n`,_jsxs(_components.p,{children:[`The fingerprint of an incident derives from the rule `,_jsx(_components.code,{children:`id`}),` and the rule `,_jsx(_components.code,{children:`labels`}),`. After a change to `,_jsx(_components.code,{children:`labels`}),`, an incident that is already open keeps its old fingerprint and no longer resolves automatically. Resolve it with `,_jsx(_components.a,{href:`/en-US/api/alerting/resolve-incident`,children:`Resolve an incident`}),`.`]}),`\n`,_jsx(RequestExample,{children:_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`20`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`20`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` PUT`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` http://localhost:5080/api/v1/alerts/rules/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$RULE_ID`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$MS_JWT`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'content-type: application/json'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --data-binary`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` @-`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u003c\u003c`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`'EOF'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`{`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"name\": \"High error rate\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"description\": \"More than 200 errors in five minutes\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"enabled\": true,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"kind\": \"scheduled\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"query\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"language\": \"sql\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"statement\": \"SELECT count(*) AS c FROM app WHERE level = 'error'\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"period_secs\": 300,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"stream\": { \"name\": \"app\", \"stream_type\": \"logs\" }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"trigger\": { \"operator\": \"gt\", \"threshold\": 200, \"for_periods\": 2, \"silence_secs\": 0 },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"severity\": \"critical\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"labels\": { \"team\": \"checkout\" }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`EOF`})}),`\n`]})})})}),`\n`,_jsxs(_components.p,{children:[`The response is the updated rule, in the shape shown in `,_jsx(_components.a,{href:`/en-US/api/alerting/list-rules`,children:`List rules`}),`.`]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Errors`})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Cause`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsxs(_components.td,{children:[`The body fails the same checks as `,_jsx(_components.a,{href:`/en-US/api/alerting/create-rule`,children:`Create a rule`}),`, or a changed `,_jsx(_components.code,{children:`escalation_policy_id`}),` names no policy of the organization.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`404`})}),_jsx(_components.td,{children:`The rule does not exist.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`422`})}),_jsx(_components.td,{children:`A required field is missing or a value has the wrong type. The response is plain text.`})]})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Update a rule","description":"Replace the configuration of an alert rule.","zh-Hans_link":"/zh-Hans/api/alerting/update-rule","href":"/en-US/api/alerting/update-rule"}}}},"mdxExtracts":{"tableOfContents":[],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"cURL","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"20\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -X\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> PUT\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> http://localhost:5080/api/v1/alerts/rules/\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">$RULE_ID\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"authorization: Bearer \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">$MS_JWT\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'content-type: application/json'\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> --data-binary\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> @-\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> \u0026#x3C;\u0026#x3C;\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">'EOF'\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"name\": \"High error rate\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"description\": \"More than 200 errors in five minutes\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"enabled\": true,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"kind\": \"scheduled\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"query\": {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"language\": \"sql\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"statement\": \"SELECT count(*) AS c FROM app WHERE level = 'error'\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"period_secs\": 300,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"stream\": { \"name\": \"app\", \"stream_type\": \"logs\" }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"trigger\": { \"operator\": \"gt\", \"threshold\": 200, \"for_periods\": 2, \"silence_secs\": 0 },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"severity\": \"critical\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"labels\": { \"team\": \"checkout\" }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">}\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">EOF\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}}},"jsLinks":["/_mintlify/custom/molesignal/088d4254bf118609/sidebar-toggle.js","/_mintlify/custom/molesignal/9aa78e29f544e029/changelog.js"],"subdomain":"molesignal","siteName":"MoleSignal Docs","title":"Update a rule - MoleSignal Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/en-US/api/alerting/update-rule","matchLevel":0},"zh-Hans":{"href":"/zh-Hans","matchLevel":4}}},"lastModified":"2026-10-09T12:43:49.213Z","gitLastModified":"2026-10-09T12:43:20.000Z","originalFileLocation":"en-US/api/alerting/update-rule.mdx","locale":"en"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Replace the configuration of an alert rule.\">\u003cmeta data-mint-head name=\"application-name\" content=\"MoleSignal Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/molesignal/_EFYdYuW8og8mB-1/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/molesignal/_EFYdYuW8og8mB-1/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/molesignal/_EFYdYuW8og8mB-1/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/molesignal/_EFYdYuW8og8mB-1/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/molesignal/_EFYdYuW8og8mB-1/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/molesignal/_EFYdYuW8og8mB-1/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/molesignal/_EFYdYuW8og8mB-1/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/molesignal/_EFYdYuW8og8mB-1/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/molesignal/_EFYdYuW8og8mB-1/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Update a rule - MoleSignal Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Replace the configuration of an alert rule.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"MoleSignal Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.molesignal.com/en-US/api/alerting/update-rule\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://molesignal.mintlify.app/_mintlify/api/og/v2?division=Alerting\u0026amp;title=Update+a+rule\u0026amp;description=Replace+the+configuration+of+an+alert+rule.\u0026amp;theme=9d4f83486269bebf1dbda005\u0026amp;signature=5a8a2f2e10168dd3359deb204130d6ba74d957de2ecaff47ad70327cec05abaf\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Update a rule - MoleSignal Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Replace the configuration of an alert rule.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://molesignal.mintlify.app/_mintlify/api/og/v2?division=Alerting\u0026amp;title=Update+a+rule\u0026amp;description=Replace+the+configuration+of+an+alert+rule.\u0026amp;theme=9d4f83486269bebf1dbda005\u0026amp;signature=5a8a2f2e10168dd3359deb204130d6ba74d957de2ecaff47ad70327cec05abaf\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/molesignal/_EFYdYuW8og8mB-1/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"MoleSignal Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#4F60E0\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.molesignal.com/en-US/api/alerting/update-rule\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/en-US/api/alerting/update-rule.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.molesignal.com/en-US/api/alerting/update-rule\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh-Hans\" href=\"https://docs.molesignal.com/zh-Hans/api/alerting/update-rule\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.molesignal.com/en-US/api/alerting/update-rule\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.molesignal.com/#organization\",\"name\":\"MoleSignal Docs\",\"url\":\"https://docs.molesignal.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/molesignal/UnXfA35CHCHELzmM/logo/light.svg?fit=max\u0026auto=format\u0026n=UnXfA35CHCHELzmM\u0026q=85\u0026s=6e3e3e0f3b8ba46e45ee5745c25f2cc8\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.molesignal.com#website\",\"name\":\"MoleSignal Docs\",\"url\":\"https://docs.molesignal.com\",\"publisher\":{\"@id\":\"https://docs.molesignal.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.molesignal.com/en-US/api/alerting/update-rule#webpage\",\"url\":\"https://docs.molesignal.com/en-US/api/alerting/update-rule\",\"name\":\"Update a rule\",\"description\":\"Replace the configuration of an alert rule.\",\"dateModified\":\"2026-10-09T12:43:20.000Z\",\"isPartOf\":{\"@id\":\"https://docs.molesignal.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.molesignal.com/en-US/api/alerting/update-rule#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.molesignal.com/en-US/api/alerting/update-rule#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Alerting\",\"item\":\"https://docs.molesignal.com/en-US/api/alerting/list-rules\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Update a rule\",\"item\":\"https://docs.molesignal.com/en-US/api/alerting/update-rule\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.molesignal.com/en-US/api/alerting/update-rule#article\",\"headline\":\"Update a rule\",\"name\":\"Update a rule\",\"description\":\"Replace the configuration of an alert rule.\",\"url\":\"https://docs.molesignal.com/en-US/api/alerting/update-rule\",\"mainEntityOfPage\":{\"@id\":\"https://docs.molesignal.com/en-US/api/alerting/update-rule#webpage\"},\"dateModified\":\"2026-10-09T12:43:20.000Z\",\"publisher\":{\"@id\":\"https://docs.molesignal.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.molesignal.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"MoleSignal Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"MoleSignal Docs","nav":{"global":null,"languages":[{"language":"en","default":true,"footer":{"socials":{"github":"https://github.com/molesignal/molesignal","discord":"https://discord.gg/JXG98xA6FH"},"links":[{"header":"Product","items":[{"label":"Quickstart","href":"/en-US/quickstart"},{"label":"Core concepts","href":"/en-US/concepts"},{"label":"Open source edition","href":"/en-US/editions/open-source"},{"label":"Enterprise","href":"/en-US/editions/enterprise"},{"label":"MoleSignal Cloud","href":"/en-US/editions/cloud"}]},{"header":"Developers","items":[{"label":"API reference","href":"/en-US/api-reference"},{"label":"Inbound MCP","href":"/en-US/inbound-mcp"},{"label":"Changelog","href":"/en-US/changelog"},{"label":"Releases","href":"https://github.com/molesignal/molesignal/releases"}]},{"header":"Support","items":[{"label":"Contact support","href":"mailto:[email protected]"},{"label":"Discord","href":"https://discord.gg/JXG98xA6FH"},{"label":"Report an issue","href":"https://github.com/molesignal/molesignal/issues"}]}]},"tabs":[{"tab":"User manual","pages":[{"title":"User manual","href":"/en-US"}]},{"tab":"Enterprise \u0026 Cloud","pages":[{"title":"Enterprise \u0026 Cloud","href":"/en-US/editions/iceberg-rest-catalog"}]},{"tab":"CLI","pages":[{"title":"CLI","href":"/en-US/cli"}]},{"tab":"API Reference","groups":[{"group":"Overview","pages":[{"title":"API introduction","href":"/en-US/api-reference"},{"title":"API catalog","href":"/en-US/api/catalog"}]},{"group":"Authentication","pages":[{"title":"Log in","href":"/en-US/api/auth/login"},{"title":"Select a workspace","href":"/en-US/api/auth/select-organization"},{"title":"Issue an API token","href":"/en-US/api/auth/issue-token"},{"title":"List API tokens","href":"/en-US/api/auth/list-tokens"},{"title":"Revoke an API token","href":"/en-US/api/auth/revoke-token"},{"title":"Default intake token","href":"/en-US/api/auth/default-token"},{"title":"RUM client token","href":"/en-US/api/auth/rum-token"},{"title":"Rotate JWT signing keys","href":"/en-US/api/auth/rotate-jwt"}]},{"group":"Intake","pages":[{"title":"Native JSON intake","href":"/en-US/api/intake/native-json"},{"title":"OpenTelemetry (OTLP)","href":"/en-US/api/intake/otlp"},{"title":"Prometheus remote_write","href":"/en-US/api/intake/prometheus"},{"title":"Elasticsearch _bulk","href":"/en-US/api/intake/elasticsearch"},{"title":"Loki push","href":"/en-US/api/intake/loki"},{"title":"Kinesis Firehose","href":"/en-US/api/intake/kinesis"},{"title":"Cloudflare Logpush","href":"/en-US/api/intake/cloudflare"},{"title":"Heroku log drain","href":"/en-US/api/intake/heroku"},{"title":"Create a function","href":"/en-US/api/intake/create-function"},{"title":"Create a pipeline","href":"/en-US/api/intake/create-pipeline"},{"title":"Manage pipelines","href":"/en-US/api/intake/scheduled-pipelines"}]},{"group":"Query","pages":[{"title":"Execute a query","href":"/en-US/api/query/execute"},{"title":"Streamed query","href":"/en-US/api/query/streamed"},{"title":"Search around an event","href":"/en-US/api/query/search-around"},{"title":"List saved views","href":"/en-US/api/query/list-saved-views"},{"title":"Create a saved view","href":"/en-US/api/query/create-saved-view"},{"title":"Run a saved view","href":"/en-US/api/query/run-saved-view"},{"title":"Create a dashboard","href":"/en-US/api/query/create-dashboard"},{"title":"Create a folder","href":"/en-US/api/query/create-folder"}]},{"group":"APM","pages":[{"title":"APM API","href":"/en-US/api/apm"}]},{"group":"RUM","pages":[{"title":"RUM API","href":"/en-US/api/rum"}]},{"group":"Streams","pages":[{"title":"List streams","href":"/en-US/api/streams/list"},{"title":"Create a stream","href":"/en-US/api/streams/create"},{"title":"Get a stream","href":"/en-US/api/streams/get"},{"title":"Delete a stream","href":"/en-US/api/streams/delete"},{"title":"Configure field indexes","href":"/en-US/api/streams/edit-schema"},{"title":"Edit retention and settings","href":"/en-US/api/streams/edit-retention"},{"title":"Stream runtime","href":"/en-US/api/streams/runtime"}]},{"group":"Alerting","pages":[{"title":"List rules","href":"/en-US/api/alerting/list-rules"},{"title":"Create a rule","description":"Create a scheduled, real-time, or anomaly alert rule.","href":"/en-US/api/alerting/create-rule"},{"title":"Update a rule","href":"/en-US/api/alerting/update-rule"},{"title":"Delete a rule","description":"Delete an alert rule.","href":"/en-US/api/alerting/delete-rule"},{"title":"Test a rule","href":"/en-US/api/alerting/test-rule"},{"title":"Trigger a rule","href":"/en-US/api/alerting/trigger-rule"},{"title":"Create an escalation policy","href":"/en-US/api/alerting/create-escalation"},{"title":"Manage notification connectors","href":"/en-US/api/alerting/create-channel"},{"title":"List incidents","href":"/en-US/api/alerting/list-incidents"},{"title":"Acknowledge an incident","href":"/en-US/api/alerting/ack-incident"},{"title":"Resolve an incident","href":"/en-US/api/alerting/resolve-incident"},{"title":"Root cause analysis","href":"/en-US/api/alerting/incident-rca"},{"title":"Incident insights","href":"/en-US/api/alerting/insights"}]},{"group":"Correlation \u0026 Web","pages":[{"title":"Cross-signal correlation","href":"/en-US/api/web/correlation"},{"title":"Command palette search","href":"/en-US/api/web/search"},{"title":"Service topology","href":"/en-US/api/web/topology"},{"title":"Service graph edges","href":"/en-US/api/web/service-graph"},{"title":"Trace list and details","href":"/en-US/api/web/trace"},{"title":"Store investigation stack","href":"/en-US/api/web/store-investigation"},{"title":"Fetch investigation stack","href":"/en-US/api/web/fetch-investigation"}]},{"group":"Platform \u0026 Administration","pages":[{"title":"Audit log","href":"/en-US/api/admin/audit"},{"title":"Cipher keys","href":"/en-US/api/admin/cipher-keys"},{"title":"Health \u0026 metrics","href":"/en-US/api/admin/health"}]}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/en-US/changelog"}]}]},{"language":"zh-Hans","footer":{"socials":{"github":"https://github.com/molesignal/molesignal","discord":"https://discord.gg/JXG98xA6FH"},"links":[{"header":"产品","items":[{"label":"快速开始","href":"/zh-Hans/quickstart"},{"label":"核心概念","href":"/zh-Hans/concepts"},{"label":"开源版","href":"/zh-Hans/editions/open-source"},{"label":"Enterprise","href":"/zh-Hans/editions/enterprise"},{"label":"MoleSignal Cloud","href":"/zh-Hans/editions/cloud"}]},{"header":"开发者","items":[{"label":"API 参考","href":"/zh-Hans/api-reference"},{"label":"Inbound MCP","href":"/zh-Hans/inbound-mcp"},{"label":"更新日志","href":"/zh-Hans/changelog"},{"label":"版本发布","href":"https://github.com/molesignal/molesignal/releases"}]},{"header":"支持","items":[{"label":"联系支持","href":"mailto:[email protected]"},{"label":"Discord 社区","href":"https://discord.gg/JXG98xA6FH"},{"label":"反馈问题","href":"https://github.com/molesignal/molesignal/issues"}]}]},"pages":[{"title":"zh-Hans","href":"/zh-Hans"}]}]},"title":"Update a rule - MoleSignal Docs","buildId":"dpl_2xiSHD9XEvLsPGPcfoMtkLTB3dy9","deploymentId":"dpl_2xiSHD9XEvLsPGPcfoMtkLTB3dy9","dynamics":["2b790eda92"],"chunks":["ApiExamples-CgXVLxUC.js","utils-BHQqGGOd.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","cloneDeep-izs3Hzxb.js","utils-CD-E4BIt.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BF8I5oUf.js","shallow-Byd0lWnC.js","snippetPresets-C4xAVCFP.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","getApiPlaygroundDisplay-BGOZG1OK.js","CodeSnippet-CpvQL0CY.js","CodeSnippets-B8wkBKXa.js"]}