{"docsConfig":{"theme":"maple","$schema":"https://mintlify.com/docs.json","name":"Metoro Documentation","colors":{"primary":"#3793FF","light":"#2DD881","dark":"#151F32"},"logo":{"light":"https://mintcdn.com/metoro/ZLKLeijcjMYiIwum/images/MetoroWords.png?fit=max\u0026auto=format\u0026n=ZLKLeijcjMYiIwum\u0026q=85\u0026s=0363fb20ab5603f1d78a6238f0ed9fe2","dark":"https://mintcdn.com/metoro/ZLKLeijcjMYiIwum/images/MetoroWords.png?fit=max\u0026auto=format\u0026n=ZLKLeijcjMYiIwum\u0026q=85\u0026s=0363fb20ab5603f1d78a6238f0ed9fe2"},"favicon":"https://mintcdn.com/metoro/iqFtfx-__JRaa9yb/images/Metoro.svg?fit=max\u0026auto=format\u0026n=iqFtfx-__JRaa9yb\u0026q=85\u0026s=4e4e6f152e6b2757440100c4851edf4c","appearance":{"default":"dark"},"navbar":{"links":[{"href":"https://metoro.io","label":"Back to landing page"}],"primary":{"type":"button","label":"Metoro Webapp","href":"https://us-east.metoro.io"}},"footer":{"socials":{"github":"https://github.com/metoro-io","slack":"https://join.slack.com/t/metorocommunity/shared_invite/zt-2makpjl5j-F0WcpGnPcdc8anbNGcewqw"}},"seo":{"metatags":{"canonical":"https://metoro.io/docs"}},"integrations":{"intercom":{"appId":"uhk91085"},"posthog":{"apiKey":"phc_ufzNQeTpSGgTBZJToi5riFhQR6DfUQwsiVXtFQbcrL2","apiHost":"https://e.us-east.metoro.io","sessionRecording":false}},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Community","icon":"slack","href":"https://join.slack.com/t/metorocommunity/shared_invite/zt-2makpjl5j-F0WcpGnPcdc8anbNGcewqw"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"metoro","hasAudioNarration":false,"actualSubdomain":"metoro","customDomains":["metoro.io"],"gitSource":{"type":"github","owner":"metoro-io","repo":"metoro-observability","deployBranch":"main","contentDirectory":"docs","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ad792af13cbd31e30200c1b","collectionId":"aa0e6352-04c2-49ff-8bf5-81c0bd88d1cd","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ad792af13cbd31e30200c1b"},"feedback":{"issues":true,"edits":true,"thumbs":true},"entitlements":{},"buildId":"6ad792af13cbd31e30200c1b","clientVersion":"0.0.4043","searchFilterCounts":[{"language":"default","tag":"Documentation","count":178},{"language":"default","tag":"On-Premises","count":87},{"language":"default","tag":"10.x","count":42},{"language":"default","tag":"11.x","count":39},{"language":"default","tag":"Operations","count":35},{"language":"default","tag":"Architecture","count":26},{"language":"default","tag":"API Reference","count":25},{"language":"default","tag":"Components","count":20},{"language":"default","tag":"Metoro Exporter","count":12},{"language":"default","tag":"Metoro Hub","count":12}]},"assistantConfig":{},"basePath":"/docs","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":""}],"page":{"pagePath":"api-reference/alerts/createupdate-alert","slug":"/api-reference/alerts/createupdate-alert","pageMetadata":{"title":"Create/Update Alert","description":"Create a new alert based on the provided configuration or update an existing one if the alert.metadata.id matches an existing alert. ","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /alerts/update","href":"/api-reference/alerts/createupdate-alert","autogeneratedByOpenApi":true},"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: \"Create a new alert based on the provided configuration or update an existing one if the alert.metadata.id matches an existing alert.\"\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}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create/Update Alert","description":"Create a new alert based on the provided configuration or update an existing one if the alert.metadata.id matches an existing alert. ","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /alerts/update","href":"/api-reference/alerts/createupdate-alert","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"description":"Create a new alert based on the provided configuration or update an existing one if the alert.metadata.id matches an existing alert. ","operationId":"createUpdateAlert","requestBody":"b1601be5-f39f-4c7a-8fa0-a3dc5f6cf329","responses":{"200":"ce8a5c79-6575-4381-82ec-471f219fbc2f","400":"666a411b-3be6-4039-a228-8f974398e9a9","401":"bd2a2dfd-c7a0-4dbc-a2a4-b716dcc62637","500":"fbdb1469-6c2b-4029-bffd-803e0f470a53"},"security":["ea41b4da-4738-4689-b400-3cea71f3cd81"],"summary":"Create/Update Alert","tags":["Alerts"],"method":"post","type":"path","servers":["0d91a641-ffd2-4efa-bfbb-ae60e6fec589","1a8031d7-88aa-4db0-a0b9-c68d08de5437"],"path":"/alerts/update","baseUrlOptions":["https://us-east.metoro.io/api/v1","https://demo.us-east.metoro.io/api/v1"],"title":"Create/Update Alert","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"content":{"application/json":{"schema":{"description":"Request to create a new alert or update an existing one. If alert.metadata.id is provided and matches an existing alert, that alert will be updated.","example":{"alert":{"metadata":{"name":"name","description":"description","id":"123e4567-e89b-12d3-a456-426614174000"},"timeseries":{"expression":{"metoroQLTimeseries":{"query":"count(traces)","bucketSize":60}},"evaluationRules":[{"static":{"persistenceSettings":{"datapointsToAlarm":3,"missingDatapointBehavior":"notBreaching","datapointsInEvaluationWindow":5},"operators":[{"threshold":5000,"operator":"greaterThan"}]},"name":"name","type":"static","actions":[{"slackDestination":{"channel":"my-alerts-channel"},"type":"slack"},{"emailDestination":{"emails":["user@example.com","admin@example.com"]},"type":"email"}]}]},"type":"timeseries"}},"properties":{"alert":{"example":{"metadata":{"name":"name","description":"description","id":"123e4567-e89b-12d3-a456-426614174000"},"type":"timeseries","investigateOnFire":false,"timeseries":{"expression":{"metoroQLTimeseries":{"query":"count(traces)","bucketSize":60}},"evaluationRules":[{"static":{"persistenceSettings":{"datapointsToAlarm":3,"missingDatapointBehavior":"notBreaching","datapointsInEvaluationWindow":5},"operators":[{"threshold":5000,"operator":"greaterThan"}]},"name":"name","type":"static","actions":[{"slackDestination":{"channel":"my-alerts-channel"},"type":"slack"},{"emailDestination":{"emails":["user@example.com","admin@example.com"]},"type":"email"}]}]}},"properties":{"metadata":{"example":{"name":"name","description":"description","id":"123e4567-e89b-12d3-a456-426614174000"},"properties":{"name":{"description":"Name of the alert","type":"string","isRequired":true,"uniqueKey":"alert.metadata.name","typeLabel":"string"},"id":{"description":"Unique identifier for the alert.","minLength":8,"type":"string","isRequired":true,"uniqueKey":"alert.metadata.id","typeLabel":"string"},"description":{"description":"Description of the alert with additional context","type":"string","uniqueKey":"alert.metadata.description","typeLabel":"string"},"folderPath":{"default":"/alerts/default/","description":"Path to the folder where the alert is stored. Must start with `/alerts/`. Must end with `/`. The generated filesystem path will be `{folderPath}{id}`.","pattern":"\\/alerts\\/.*","type":"string","uniqueKey":"alert.metadata.folderPath","typeLabel":"string"},"tags":{"description":"Organization-wide tags used to group and filter the alert.","items":{"maxLength":64,"minLength":1,"type":"string","uniqueKey":"alert.metadata.tags.items.[INDEX]","typeLabel":"string"},"maxItems":20,"type":"array","uniqueKey":"alert.metadata.tags","typeLabel":"string[]"}},"required":["id","name"],"type":"object","isRequired":true,"uniqueKey":"alert.metadata","typeLabel":"object"},"timeseries":{"example":{"expression":{"metoroQLTimeseries":{"query":"count(traces)","bucketSize":60}},"evaluationRules":[{"static":{"persistenceSettings":{"datapointsToAlarm":3,"missingDatapointBehavior":"notBreaching","datapointsInEvaluationWindow":5},"operators":[{"threshold":5000,"operator":"greaterThan"}]},"name":"name","type":"static","actions":[{"slackDestination":{"channel":"my-alerts-channel"},"type":"slack"},{"emailDestination":{"emails":["user@example.com","admin@example.com"]},"type":"email"}]}]},"properties":{"expression":{"example":{"metoroQLTimeseries":{"query":"count(traces)","bucketSize":60}},"properties":{"metoroQLTimeseries":{"example":{"query":"count(traces)","bucketSize":60},"properties":{"query":{"description":"MetoroQL query to use for the timeseries.","type":"string","isRequired":true,"uniqueKey":"alert.timeseries.expression.metoroQLTimeseries.query","typeLabel":"string"},"bucketSize":{"description":"The size of each bucket to aggregate data into in seconds. For example, if the bucket size is 60, the data will be aggregated into 1 minute buckets.","format":"int64","type":"integer","isRequired":true,"uniqueKey":"alert.timeseries.expression.metoroQLTimeseries.bucketSize","typeLabel":"integer\u003cint64>"}},"required":["bucketSize","query"],"type":"object","uniqueKey":"alert.timeseries.expression.metoroQLTimeseries","typeLabel":"object"}},"type":"object","isRequired":true,"uniqueKey":"alert.timeseries.expression","typeLabel":"object"},"evaluationRules":{"description":"Rules for evaluating the metrics and triggering alerts","items":{"example":{"static":{"persistenceSettings":{"datapointsToAlarm":3,"missingDatapointBehavior":"notBreaching","datapointsInEvaluationWindow":5},"operators":[{"threshold":5000,"operator":"greaterThan"}]},"name":"name","type":"static","actions":[{"slackDestination":{"channel":"my-alerts-channel"},"type":"slack"},{"emailDestination":{"emails":["user@example.com","admin@example.com"]},"type":"email"}]},"properties":{"name":{"description":"Name of the condition","type":"string","isRequired":true,"uniqueKey":"alert.timeseries.evaluationRules.items.[INDEX].name","typeLabel":"string"},"type":{"description":"Type of alert condition","enum":["static","anomaly"],"type":"string","uniqueKey":"alert.timeseries.evaluationRules.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"static":{"example":{"persistenceSettings":{"datapointsToAlarm":3,"missingDatapointBehavior":"notBreaching","datapointsInEvaluationWindow":5},"operators":[{"threshold":5000,"operator":"greaterThan"}]},"properties":{"operators":{"description":"List of operator conditions that must be met","items":{"example":{"threshold":5000,"operator":"greaterThan"},"properties":{"operator":{"description":"Type of comparison operator","enum":["greaterThan","lessThan","greaterThanOrEqual","lessThanOrEqual","equals","notEquals"],"type":"string","isRequired":true,"uniqueKey":"alert.timeseries.evaluationRules.items.[INDEX].static.operators.items.[INDEX].operator","typeLabel":"enum\u003cstring>"},"threshold":{"description":"Threshold value for comparison","format":"double","type":"number","isRequired":true,"uniqueKey":"alert.timeseries.evaluationRules.items.[INDEX].static.operators.items.[INDEX].threshold","typeLabel":"number\u003cdouble>"},"unit":{"description":"Optional UCUM unit the threshold is expressed in. When set, the threshold is converted into the queried metric's own unit before evaluation, and values reported on alert fires are converted back into this unit. Supported units: ns, us, ms, s, min, h, d, By, kBy, MBy, GBy, TBy, KiBy, MiBy, GiBy, TiBy. If the unit is not compatible with the metric's unit, the threshold is evaluated in the metric's base unit and a warning is logged to the organization's log stream.","type":"string","uniqueKey":"alert.timeseries.evaluationRules.items.[INDEX].static.operators.items.[INDEX].unit","typeLabel":"string"}},"required":["operator","threshold"],"type":"object","uniqueKey":"alert.timeseries.evaluationRules.items.[INDEX].static.operators.items.[INDEX]","typeLabel":"object"},"type":"array","isRequired":true,"uniqueKey":"alert.timeseries.evaluationRules.items.[INDEX].static.operators","typeLabel":"object[]"},"persistenceSettings":{"example":{"datapointsToAlarm":3,"missingDatapointBehavior":"notBreaching","datapointsInEvaluationWindow":5},"properties":{"datapointsToAlarm":{"description":"Number of data points that must breach the threshold within the evaluation window to trigger an alert.","format":"int64","type":"integer","isRequired":true,"uniqueKey":"alert.timeseries.evaluationRules.items.[INDEX].static.persistenceSettings.datapointsToAlarm","typeLabel":"integer\u003cint64>"},"datapointsInEvaluationWindow":{"description":"Total number of data points in the evaluation window. If your bucketSize is 60 (seconds) and datapointsInEvaluationWindow is 5, then the evaluation window is 5 minutes.","format":"int64","type":"integer","isRequired":true,"uniqueKey":"alert.timeseries.evaluationRules.items.[INDEX].static.persistenceSettings.datapointsInEvaluationWindow","typeLabel":"integer\u003cint64>"},"missingDatapointBehavior":{"default":"notBreaching","description":"Determines how missing data points are treated - either as breaching the threshold or not breaching.","enum":["breaching","notBreaching"],"type":"string","uniqueKey":"alert.timeseries.evaluationRules.items.[INDEX].static.persistenceSettings.missingDatapointBehavior","typeLabel":"enum\u003cstring>"}},"required":["datapointsInEvaluationWindow","datapointsToAlarm"],"type":"object","isRequired":true,"uniqueKey":"alert.timeseries.evaluationRules.items.[INDEX].static.persistenceSettings","typeLabel":"object"}},"required":["operators","persistenceSettings"],"type":"object","uniqueKey":"alert.timeseries.evaluationRules.items.[INDEX].static","typeLabel":"object"},"anomaly":{"properties":{"algorithm":{"description":"Algorithm to use for anomaly detection","enum":["zScore"],"type":"string","isRequired":true,"uniqueKey":"alert.timeseries.evaluationRules.items.[INDEX].anomaly.algorithm","typeLabel":"enum\u003cstring>"},"zScoreParameters":{"description":"Parameters for Z-Score anomaly detection","example":{"threshold":2,"dataPointsInBaselineWindow":30},"properties":{"threshold":{"description":"Z-Score threshold for anomaly detection (number of standard deviations from the mean to consider as an anomaly).","format":"double","type":"number","isRequired":true,"uniqueKey":"alert.timeseries.evaluationRules.items.[INDEX].anomaly.zScoreParameters.threshold","typeLabel":"number\u003cdouble>"},"dataPointsInBaselineWindow":{"description":"Number of data points to consider for calculating the the baseline normal distribution.","format":"int64","type":"integer","isRequired":true,"uniqueKey":"alert.timeseries.evaluationRules.items.[INDEX].anomaly.zScoreParameters.dataPointsInBaselineWindow","typeLabel":"integer\u003cint64>"},"dataPointsInEvaluationWindow":{"description":"Number of data points in the evaluation window, if you want to select 5 out of 10 data points, set this to 10.","format":"int64","type":"integer","isRequired":true,"uniqueKey":"alert.timeseries.evaluationRules.items.[INDEX].anomaly.zScoreParameters.dataPointsInEvaluationWindow","typeLabel":"integer\u003cint64>"},"dataPointsToAlarm":{"description":"Number of data points that must breach the threshold within the evaluation window to trigger an alert.","format":"int64","type":"integer","isRequired":true,"uniqueKey":"alert.timeseries.evaluationRules.items.[INDEX].anomaly.zScoreParameters.dataPointsToAlarm","typeLabel":"integer\u003cint64>"},"operator":{"description":"Type of anomaly threshold comparison operator","enum":["greaterThan","lessThan","greaterOrLessThan"],"type":"string","x-enum-varnames":["ANOMALY_OPERATOR_TYPE_GREATER_THAN","ANOMALY_OPERATOR_TYPE_LESS_THAN","ANOMALY_OPERATOR_TYPE_GREATER_OR_LESS_THAN"],"uniqueKey":"alert.timeseries.evaluationRules.items.[INDEX].anomaly.zScoreParameters.operator","typeLabel":"enum\u003cstring>"}},"required":["dataPointsInBaselineWindow","dataPointsInEvaluationWindow","dataPointsToAlarm","threshold"],"type":"object","uniqueKey":"alert.timeseries.evaluationRules.items.[INDEX].anomaly.zScoreParameters","typeLabel":"object"}},"required":["algorithm"],"type":"object","uniqueKey":"alert.timeseries.evaluationRules.items.[INDEX].anomaly","typeLabel":"object"},"actions":{"description":"Actions to take when condition is met","items":{"example":{"slackDestination":{"channel":"my-alerts-channel"},"emailDestination":{"emails":["user@example.com","admin@example.com"]},"pagerDutyDestination":{"serviceId":"serviceId","serviceName":"serviceName"},"type":"slack","webhookDestination":{"name":"name","uuid":"uuid"}},"properties":{"type":{"description":"Type of action destination","enum":["slack","pagerDuty","email","webhook"],"type":"string","isRequired":true,"uniqueKey":"alert.timeseries.evaluationRules.items.[INDEX].actions.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"slackDestination":{"example":{"channel":"channel"},"properties":{"channel":{"description":"Slack channel to send alert to","type":"string","uniqueKey":"alert.timeseries.evaluationRules.items.[INDEX].actions.items.[INDEX].slackDestination.channel","typeLabel":"string"},"notifyOnResolve":{"default":false,"description":"Whether to notify the channel when the alert is resolved","type":"boolean","uniqueKey":"alert.timeseries.evaluationRules.items.[INDEX].actions.items.[INDEX].slackDestination.notifyOnResolve","typeLabel":"boolean"}},"type":"object","uniqueKey":"alert.timeseries.evaluationRules.items.[INDEX].actions.items.[INDEX].slackDestination","typeLabel":"object"},"pagerDutyDestination":{"example":{"serviceId":"serviceId","serviceName":"serviceName"},"properties":{"serviceId":{"description":"PagerDuty service ID","type":"string","uniqueKey":"alert.timeseries.evaluationRules.items.[INDEX].actions.items.[INDEX].pagerDutyDestination.serviceId","typeLabel":"string"},"serviceName":{"description":"PagerDuty service name","type":"string","uniqueKey":"alert.timeseries.evaluationRules.items.[INDEX].actions.items.[INDEX].pagerDutyDestination.serviceName","typeLabel":"string"}},"type":"object","uniqueKey":"alert.timeseries.evaluationRules.items.[INDEX].actions.items.[INDEX].pagerDutyDestination","typeLabel":"object"},"emailDestination":{"example":{"emails":["user@example.com","admin@example.com"]},"properties":{"notifyOnResolve":{"default":false,"description":"Whether to notify the email recipients when the alert is resolved","type":"boolean","uniqueKey":"alert.timeseries.evaluationRules.items.[INDEX].actions.items.[INDEX].emailDestination.notifyOnResolve","typeLabel":"boolean"},"emails":{"description":"Email addresses to send alert to","items":{"type":"string","uniqueKey":"alert.timeseries.evaluationRules.items.[INDEX].actions.items.[INDEX].emailDestination.emails.items.[INDEX]","typeLabel":"string"},"type":"array","uniqueKey":"alert.timeseries.evaluationRules.items.[INDEX].actions.items.[INDEX].emailDestination.emails","typeLabel":"string[]"}},"type":"object","uniqueKey":"alert.timeseries.evaluationRules.items.[INDEX].actions.items.[INDEX].emailDestination","typeLabel":"object"},"webhookDestination":{"example":{"name":"name","uuid":"uuid"},"properties":{"uuid":{"description":"UUID of the webhook configuration to use for notifying that the alert is triggered","type":"string","uniqueKey":"alert.timeseries.evaluationRules.items.[INDEX].actions.items.[INDEX].webhookDestination.uuid","typeLabel":"string"},"name":{"description":"Name of the webhook configuration to use for notifying that the alert is triggered","type":"string","uniqueKey":"alert.timeseries.evaluationRules.items.[INDEX].actions.items.[INDEX].webhookDestination.name","typeLabel":"string"},"resolved_uuid":{"description":"UUID of the webhook configuration to use for notifying that the alert is resolved","type":"string","uniqueKey":"alert.timeseries.evaluationRules.items.[INDEX].actions.items.[INDEX].webhookDestination.resolved_uuid","typeLabel":"string"},"resolved_name":{"description":"Name of the webhook configuration to use for notifying that the alert is resolved","type":"string","uniqueKey":"alert.timeseries.evaluationRules.items.[INDEX].actions.items.[INDEX].webhookDestination.resolved_name","typeLabel":"string"}},"type":"object","uniqueKey":"alert.timeseries.evaluationRules.items.[INDEX].actions.items.[INDEX].webhookDestination","typeLabel":"object"}},"required":["type"],"type":"object","uniqueKey":"alert.timeseries.evaluationRules.items.[INDEX].actions.items.[INDEX]","typeLabel":"object"},"type":"array","uniqueKey":"alert.timeseries.evaluationRules.items.[INDEX].actions","typeLabel":"object[]"}},"required":["name"],"type":"object","uniqueKey":"alert.timeseries.evaluationRules.items.[INDEX]","typeLabel":"object"},"type":"array","isRequired":true,"uniqueKey":"alert.timeseries.evaluationRules","typeLabel":"object[]"}},"required":["evaluationRules","expression"],"type":"object","isRequired":true,"uniqueKey":"alert.timeseries","typeLabel":"object"},"type":{"description":"Type of alert","enum":["timeseries"],"type":"string","uniqueKey":"alert.type","typeLabel":"enum\u003cstring>"},"investigateOnFire":{"description":"Whether Metoro should automatically start an AI investigation when this alert fires.","type":"boolean","uniqueKey":"alert.investigateOnFire","typeLabel":"boolean"}},"required":["metadata","timeseries"],"type":"object","isRequired":true,"uniqueKey":"alert","typeLabel":"object"}},"required":["alert"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"alert":{"metadata":{"name":"name","description":"description","id":"123e4567-e89b-12d3-a456-426614174000"},"timeseries":{"expression":{"metoroQLTimeseries":{"query":"count(traces)","bucketSize":60}},"evaluationRules":[{"static":{"persistenceSettings":{"datapointsToAlarm":3,"missingDatapointBehavior":"notBreaching","datapointsInEvaluationWindow":5},"operators":[{"threshold":5000,"operator":"greaterThan"}]},"name":"name","type":"static","actions":[{"slackDestination":{"channel":"my-alerts-channel"},"type":"slack"},{"emailDestination":{"emails":["user@example.com","admin@example.com"]},"type":"email"}]}]},"type":"timeseries"}}}},"exampleType":"generated"}},"description":"Alert to create or update","required":true,"exampleType":"generated"},"responses":{"ce8a5c79-6575-4381-82ec-471f219fbc2f":{"content":{"application/json":{"schema":{"example":{"id":"123e4567-e89b-12d3-a456-426614174000"},"properties":{"id":{"description":"Unique identifier for the created or updated alert","type":"string","isRequired":true,"uniqueKey":"id","typeLabel":"string"}},"required":["id"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":"123e4567-e89b-12d3-a456-426614174000"}}},"exampleType":"generated"}},"description":"Alert created or updated successfully","exampleType":"generated"},"666a411b-3be6-4039-a228-8f974398e9a9":{"content":{"application/json":{"schema":{"example":{"error":"Invalid alert configuration: missing required field"},"properties":{"error":{"description":"Error message describing what went wrong","type":"string","isRequired":true,"uniqueKey":"error","typeLabel":"string"}},"required":["error"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"Invalid alert configuration: missing required field"}}},"exampleType":"generated"}},"description":"Bad request","exampleType":"generated"},"bd2a2dfd-c7a0-4dbc-a2a4-b716dcc62637":{"content":{"application/json":{"schema":{"example":{"error":"Invalid alert configuration: missing required field"},"properties":{"error":{"description":"Error message describing what went wrong","type":"string","isRequired":true,"uniqueKey":"error","typeLabel":"string"}},"required":["error"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"Invalid alert configuration: missing required field"}}},"exampleType":"generated"}},"description":"Unauthorized","exampleType":"generated"},"fbdb1469-6c2b-4029-bffd-803e0f470a53":{"content":{"application/json":{"schema":{"example":{"error":"Invalid alert configuration: missing required field"},"properties":{"error":{"description":"Error message describing what went wrong","type":"string","isRequired":true,"uniqueKey":"error","typeLabel":"string"}},"required":["error"],"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"Invalid alert configuration: missing required field"}}},"exampleType":"generated"}},"description":"Internal server error","exampleType":"generated"}},"security":{"ea41b4da-4738-4689-b400-3cea71f3cd81":{"bearerAuth":{"bearerFormat":"JWT","scheme":"bearer","type":"http","scopes":[]}}},"servers":{"0d91a641-ffd2-4efa-bfbb-ae60e6fec589":{"description":"Production API server","url":"https://us-east.metoro.io/api/v1"},"1a8031d7-88aa-4db0-a0b9-c68d08de5437":{"description":"Demo API server","url":"https://demo.us-east.metoro.io/api/v1"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"bearerFormat":"JWT","scheme":"bearer","type":"http","scopes":[]},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"api-reference/openapi.yaml"},"subdomain":"metoro","siteName":"Metoro Documentation","title":"Create/Update Alert - Metoro Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-24T15:42:36.845Z","originalFileLocation":"api-reference/alerts/createupdate-alert.mdx"},"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=\"dark\"}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=\"Create a new alert based on the provided configuration or update an existing one if the alert.metadata.id matches an existing alert.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Metoro Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/metoro/UOuaDpDX7TYzdSQ1/_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=\"/docs/mintlify-assets/_mintlify/favicons/metoro/UOuaDpDX7TYzdSQ1/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/metoro/UOuaDpDX7TYzdSQ1/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/metoro/UOuaDpDX7TYzdSQ1/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/metoro/UOuaDpDX7TYzdSQ1/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/metoro/UOuaDpDX7TYzdSQ1/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/metoro/UOuaDpDX7TYzdSQ1/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/metoro/UOuaDpDX7TYzdSQ1/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/metoro/UOuaDpDX7TYzdSQ1/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create/Update Alert - Metoro Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Create a new alert based on the provided configuration or update an existing one if the alert.metadata.id matches an existing alert.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Metoro Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://metoro.io/docs/api-reference/alerts/createupdate-alert\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://metoro.mintlify.app/_mintlify/api/og/v2?division=Alerts\u0026amp;title=Create%2FUpdate+Alert\u0026amp;description=Create+a+new+alert+based+on+the+provided+configuration+or+update+an+existing+one+if+the+alert.metadata.id+matches+an+existing+alert.+\u0026amp;theme=a738a002206c8b04e7d5ef63\u0026amp;signature=8c3e5d6b94b359f48d31bf152e52fce7bb036f6f371064d5b6dde36554a23ee8\">\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=\"Create/Update Alert - Metoro Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Create a new alert based on the provided configuration or update an existing one if the alert.metadata.id matches an existing alert.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://metoro.mintlify.app/_mintlify/api/og/v2?division=Alerts\u0026amp;title=Create%2FUpdate+Alert\u0026amp;description=Create+a+new+alert+based+on+the+provided+configuration+or+update+an+existing+one+if+the+alert.metadata.id+matches+an+existing+alert.+\u0026amp;theme=a738a002206c8b04e7d5ef63\u0026amp;signature=8c3e5d6b94b359f48d31bf152e52fce7bb036f6f371064d5b6dde36554a23ee8\">\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=\"/docs/mintlify-assets/_mintlify/favicons/metoro/UOuaDpDX7TYzdSQ1/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Metoro Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#3793FF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://metoro.io/docs/api-reference/alerts/createupdate-alert\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/api-reference/alerts/createupdate-alert.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://metoro.io/#organization\",\"name\":\"Metoro Documentation\",\"url\":\"https://metoro.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/metoro/ZLKLeijcjMYiIwum/images/MetoroWords.png?fit=max\u0026auto=format\u0026n=ZLKLeijcjMYiIwum\u0026q=85\u0026s=0363fb20ab5603f1d78a6238f0ed9fe2\"}},{\"@type\":\"WebSite\",\"@id\":\"https://metoro.io/docs#website\",\"name\":\"Metoro Documentation\",\"url\":\"https://metoro.io/docs\",\"publisher\":{\"@id\":\"https://metoro.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://metoro.io/docs/api-reference/alerts/createupdate-alert#webpage\",\"url\":\"https://metoro.io/docs/api-reference/alerts/createupdate-alert\",\"name\":\"Create/Update Alert\",\"description\":\"Create a new alert based on the provided configuration or update an existing one if the alert.metadata.id matches an existing alert.\",\"dateModified\":\"2026-08-24T15:42:36.845Z\",\"isPartOf\":{\"@id\":\"https://metoro.io/docs#website\"},\"breadcrumb\":{\"@id\":\"https://metoro.io/docs/api-reference/alerts/createupdate-alert#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://metoro.io/docs/api-reference/alerts/createupdate-alert#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"API\",\"item\":\"https://metoro.io/docs/api-reference/logs/post-querylogs\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create/Update Alert\",\"item\":\"https://metoro.io/docs/api-reference/alerts/createupdate-alert\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://metoro.io/docs/api-reference/alerts/createupdate-alert#apireference\",\"headline\":\"Create/Update Alert\",\"name\":\"Create/Update Alert\",\"description\":\"Create a new alert based on the provided configuration or update an existing one if the alert.metadata.id matches an existing alert.\",\"url\":\"https://metoro.io/docs/api-reference/alerts/createupdate-alert\",\"mainEntityOfPage\":{\"@id\":\"https://metoro.io/docs/api-reference/alerts/createupdate-alert#webpage\"},\"dateModified\":\"2026-08-24T15:42:36.845Z\",\"publisher\":{\"@id\":\"https://metoro.io/#organization\"},\"isPartOf\":{\"@id\":\"https://metoro.io/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Metoro Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Metoro Documentation","nav":{"global":{"anchors":[{"anchor":"Community","icon":"slack","href":"https://join.slack.com/t/metorocommunity/shared_invite/zt-2makpjl5j-F0WcpGnPcdc8anbNGcewqw"}]},"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/getting-started/introduction"}]},{"tab":"API Reference","groups":[{"group":"API","pages":[{"group":"Logs","pages":[{"title":"Post querylogs","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /query/logs","href":"/api-reference/logs/post-querylogs"}]},{"group":"Environments","pages":[{"title":"Create Environment","description":"Create a new environment in the Metoro platform.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /environments/create","href":"/api-reference/environments/create-environment"}]},{"group":"Alerts","pages":[{"title":"Create/Update Alert","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /alerts/update","href":"/api-reference/alerts/createupdate-alert"},{"title":"Sync Alerts From Kubernetes Sources","description":"Trigger immediate synchronization of alerts from Kubernetes sources, including ConfigMaps and MetoroAlert CRDs. By default, alerts are synced once every hour. This endpoint allows triggering the sync process manually without waiting for the scheduled sync.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /alerts/sync","href":"/api-reference/alerts/sync-alerts-from-kubernetes-sources"}]},{"group":"Dashboards","pages":[{"title":"Create/Update Dashboard","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /dashboards/update","href":"/api-reference/dashboards/createupdate-dashboard"},{"title":"Sync Dashboards From Kubernetes Sources","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /dashboards/sync","href":"/api-reference/dashboards/sync-dashboards-from-kubernetes-sources"}]}]},{"group":"Webhook Events","pages":[{"group":"API Reference","pages":[{"title":"Deployment rollout detected","version":null,"deprecated":null,"openapi":"/api-reference/webhook-events.yaml webhook deploymentRolloutDetected","href":"/api-reference/webhooks/deployment-rollout-detected"},{"title":"Deployment verification scheduled","version":null,"deprecated":null,"openapi":"/api-reference/webhook-events.yaml webhook deploymentVerificationScheduled","href":"/api-reference/webhooks/deployment-verification-scheduled"},{"title":"Deployment verification started","version":null,"deprecated":null,"openapi":"/api-reference/webhook-events.yaml webhook deploymentVerificationStarted","href":"/api-reference/webhooks/deployment-verification-started"},{"title":"Deployment verification completed","version":null,"deprecated":null,"openapi":"/api-reference/webhook-events.yaml webhook deploymentVerificationCompleted","href":"/api-reference/webhooks/deployment-verification-completed"},{"title":"Anomaly detected","version":null,"deprecated":null,"openapi":"/api-reference/webhook-events.yaml webhook anomalyDetected","href":"/api-reference/webhooks/anomaly-detected"},{"title":"Investigation created","version":null,"deprecated":null,"openapi":"/api-reference/webhook-events.yaml webhook investigationCreated","href":"/api-reference/webhooks/investigation-created"},{"title":"Investigation completed","version":null,"deprecated":null,"openapi":"/api-reference/webhook-events.yaml webhook investigationCompleted","href":"/api-reference/webhooks/investigation-completed"},{"title":"Issue created","version":null,"deprecated":null,"openapi":"/api-reference/webhook-events.yaml webhook issueCreated","href":"/api-reference/webhooks/issue-created"},{"title":"Agent action approval requested","version":null,"deprecated":null,"openapi":"/api-reference/webhook-events.yaml webhook agentActionRequested","href":"/api-reference/webhooks/agent-action-approval-requested"}]}]},{"group":"Kubernetes CRDs","pages":[{"title":"Kubernetes CRD Reference","href":"/api-reference/kubernetes-crds"}]}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog/overview"}]}]},"basePath":"","title":"Create/Update Alert - Metoro Documentation","buildId":"dpl_4RHMRqtvdHvKgaEfTTjFqjzja3B6","deploymentId":"dpl_4RHMRqtvdHvKgaEfTTjFqjzja3B6","dynamics":["c2aa737661","b0f84f53ff","a9bb46feb3","2b790eda92"],"chunks":["OpenApiReferenceProvider-D_4Sesi0.js","utils-DRHeK26p.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-C6d-DUc2.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-Dex7slho.js","snippetPresets-BcCEBp0Z.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","Page-BoJxk0m8.js","ApiExamples-CufowNTX.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-A4lJSCIe.js","shallow-DqoHP7zn.js","getApiPlaygroundDisplay-Cku8AmtL.js","CodeSnippet-CtHQbNqc.js","CodeSnippets-CGo5Cslf.js","getPastedJson-M-bKdue4.js","icon-DEqCU4st.js","MethodPill-DnfSSXiJ.js","DuplicateIcon-BHu2PE8M.js","createIcon-BPsE5X7c.js","DynamicMarkdown-Dnt6YhtR.js","SectionHeading-6CtFWqMQ.js","axios-vUo_bRtp.js","Markdown-BoKe_1fI.js","clsx-DM5-sUNJ.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CkIdkovK.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-B3e6Nh_r.js"]}