Use GET, PUT and DELETE on /api/v2/contracts/:external_id/alerts/:code to read, update and delete an alert, and GET /api/v2/contracts/:external_id/alerts to list them. An update accepts name and thresholds only. The code, alert_type and scope cannot change.
Alert types
Usage amount (usage_amount): the amount of the usage in scope for the current billing period, before taxes. Values are in cents of the Contract currency, so "100000" is 1,000.00.
Usage units (usage_units): the number of units in scope for the current billing period. A units alert needs a product in its scope.
Scope
The scope sets which usage the alert measures. It takes one entry at most.
scope
What the alert measures
[]
Every metered product on the Contract. Only for usage_amount. Fixed products are left out.
The product, and the filter if any, must be priced on the Contract. A fixed product cannot be used.
Thresholds
An alert takes up to 20 thresholds, the recurring one included.
One threshold can be recurring. It repeats every value above the highest non-recurring threshold.
Each threshold notifies on triggered. Add resolved to notify_on to also be notified when the value goes back below it. A threshold that opts in needs a code.
Billing period
Each Rate Card is measured on its own current billing period, so the Rate Cards of one Contract can reset on different dates. When a Rate Card’s period restarts, its usage leaves the alert’s value and its thresholds can trigger again. This also happens when a new rate takes effect during the period. A restart never sends alert.resolved.Usage on a recurring billable metric never resets.
Alert notifications
Listen for the alert.triggered webhook. It names the alert, the Contract evaluated, the value that crossed the line, and every threshold crossed. currency is set on usage_amount alerts and null on usage_units alerts.
Thresholds that opt in with notify_on: ["triggered", "resolved"] send alert.resolved when the value is back below them, or when an update raises or removes them. The reason is recovered, threshold_updated or threshold_removed.
Only the active Contract is evaluated. Alerts created on a pending Contract are evaluated once it is active.
When the Contract is terminated, its alerts stop being evaluated and stay readable.
Alerts follow the Contract’s external_id. A new Contract created with the same external_id picks them up.
If a product or filter leaves the Contract, its alerts are kept and skipped. If the product or filter is deleted, its alerts are deleted.
Limitations
An alert is evaluated after new events or after it is created or updated, close to real time. Its first evaluation sends alert.triggered for every threshold already passed;
Each alert code must be unique per Contract, and only one alert per type and scope can exist on a Contract; and
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Lago","description":"Developer documentation for Lago, the open-source billing platform for usage metering, subscriptions, invoicing, payments, and revenue operations.","colors":{"primary":"#006CFA","light":"#006CFA","dark":"#006CFA"},"logo":{"light":"https://mintcdn.com/lago-docs/zZSJbpe68PHhSs3x/logo/light.svg?fit=max\u0026auto=format\u0026n=zZSJbpe68PHhSs3x\u0026q=85\u0026s=b4af3001527c985b81858b9a0928534c","dark":"https://mintcdn.com/lago-docs/zZSJbpe68PHhSs3x/logo/dark.svg?fit=max\u0026auto=format\u0026n=zZSJbpe68PHhSs3x\u0026q=85\u0026s=1eb7aacac796b0cc6bf05be790a792b1"},"favicon":"https://mintcdn.com/lago-docs/8N-yOElNGe9jRGG5/favicon.svg?fit=max\u0026auto=format\u0026n=8N-yOElNGe9jRGG5\u0026q=85\u0026s=5c319e58dd9b5c5b8a31cf2ad8009a1c","api":{"openapi":["https://swagger.getlago.com/openapi.yaml","https://swagger.getlago.com/openapi-v2.yaml"],"mdx":{"server":"https://api.getlago.com/api/v1"}},"background":{"color":{"light":"#F5F5EF","dark":"#131923"}},"navbar":{"links":[{"href":"https://getlago.com/book-a-demo","label":"Book a Demo"}],"primary":{"type":"button","label":"Get Started","href":"https://getlago.com/book-a-demo"}},"footer":{"socials":{"github":"https://github.com/getlago/lago","slack":"https://getlago.com/slack","x":"https://x.com/getlago","linkedin":"https://www.linkedin.com/company/getlago","youtube":"https://www.youtube.com/channel/UCp6ltp7n3SgDVsmerJ7O7ZA"},"links":[{"header":"Documentation","items":[{"label":"Get started","href":"https://getlago.com/docs/guide/introduction/welcome-to-lago"},{"label":"API reference","href":"https://getlago.com/docs/api-reference/intro"},{"label":"Integrations","href":"https://getlago.com/docs/integrations/introduction"},{"label":"Templates","href":"https://getlago.com/docs/templates/introduction"},{"label":"Changelog","href":"https://getlago.com/docs/changelog/product"},{"label":"FAQ","href":"https://getlago.com/docs/faq/about-lago"}]},{"header":"Developers","items":[{"label":"Developer hub","href":"https://getlago.com/docs/developers"},{"label":"Authentication","href":"https://getlago.com/docs/auth"},{"label":"Webhooks","href":"https://getlago.com/docs/guide/webhooks"},{"label":"SDKs","href":"https://getlago.com/docs/developers"},{"label":"OpenAPI spec","href":"https://swagger.getlago.com/"},{"label":"MCP server","href":"https://getlago.com/docs/guide/ai-agents/mcp-server"},{"label":"Self-hosted","href":"https://getlago.com/docs/guide/lago-self-hosted/overview"},{"label":"llms.txt","href":"https://getlago.com/docs/llms.txt"}]},{"header":"Platform","items":[{"label":"Usage metering","href":"https://getlago.com/platform/usage-metering"},{"label":"Billing \u0026 invoicing","href":"https://getlago.com/platform/billing-invoicing"},{"label":"Cash collection","href":"https://getlago.com/platform/cash-collection"},{"label":"Revenue analytics","href":"https://getlago.com/platform/revenue-analytics"},{"label":"Entitlements","href":"https://getlago.com/platform/entitlements"},{"label":"Lago AI","href":"https://getlago.com/platform/ai"},{"label":"Pricing","href":"https://getlago.com/pricing"}]},{"header":"Company","items":[{"label":"About Lago","href":"https://getlago.com/docs/about"},{"label":"Customers","href":"https://getlago.com/customers"},{"label":"Blog","href":"https://getlago.com/blog"},{"label":"Contact","href":"https://getlago.com/docs/contact"},{"label":"Trust center","href":"https://security.getlago.com"},{"label":"Status","href":"https://status.getlago.com"}]}]},"seo":{"metatags":{"canonical":"https://getlago.com/docs","description":"Developer documentation for Lago's API-first billing platform, including OpenAPI, SDKs, webhooks, MCP, authentication, and implementation guides.","keywords":"Lago API, billing API, usage metering API, OpenAPI, billing SDK, Lago MCP, Lago contracts, rate cards, product catalog"},"organization":{"id":"https://getlago.com/#organization","name":"Lago","legalName":"Get Lago Corp.","url":"https://getlago.com","logo":"https://getlago.com/docs/logo/light.svg","sameAs":["https://github.com/getlago","https://www.linkedin.com/company/getlago","https://x.com/GetLago","https://www.youtube.com/channel/UCp6ltp7n3SgDVsmerJ7O7ZA"]},"indexing":"navigable"},"fonts":{"heading":{"family":"GT America","weight":700,"source":"fonts/GT-America-Standard-Medium.woff2","format":"woff2"},"body":{"family":"GT America","source":"fonts/GT-America-Standard-Regular.woff2","format":"woff2"}},"styling":{"codeblocks":"dark","latex":true},"integrations":{"ga4":{"measurementId":"G-743BQ9THCG"},"cookies":{"key":"lago_docs_analytics","value":"granted"}},"errors":{"404":{"redirect":false,"title":"Documentation page not found","description":"No Lago documentation exists at this URL. Start at [Lago Developer Documentation](/welcome), browse [Developer Resources](/developers), inspect the [documentation index](/llms.txt) or [sitemap](/sitemap.xml), or search the [API reference](/api-reference/intro)."}},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"navigation":{"global":{"anchors":[{"anchor":"Blog","icon":"newspaper","href":"https://getlago.com/blog"},{"anchor":"Community","icon":"slack","href":"https://getlago.com/slack"},{"anchor":"GitHub","icon":"github","href":"https://github.com/getlago/lago"},{"anchor":"Status","icon":"signal-bars","href":"https://status.getlago.com/"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"lago-docs","hasAudioNarration":false,"actualSubdomain":"lago-docs","customDomains":["getlago.com"],"gitSource":{"type":"github","owner":"getlago","repo":"lago-doc","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":"","_id":"6b10a1ef9ffae5051c3f8a74"},"feedback":{"thumbs":true,"edits":true,"issues":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6b11bab19393a8b5aa071957","clientVersion":"0.0.4436","searchFilterCounts":[{"language":"default","tag":"API References","count":416},{"language":"default","tag":"API Reference","count":416},{"language":"default","tag":"Guide","count":296},{"language":"default","tag":"Integrations","count":94},{"language":"default","tag":"Plans","count":68},{"language":"default","tag":"Resources","count":54},{"language":"default","tag":"Invoices","count":46},{"language":"default","tag":"Billable metrics","count":42},{"language":"default","tag":"Charges","count":39},{"language":"default","tag":"Pricing \u0026 Subscriptions","count":35}]},"assistantConfig":{},"basePath":"/docs","hasChatPermissions":true,"hasWebMcpPermissions":true,"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":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","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":"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":"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":"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":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","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":"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":"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":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"auth-vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"html{visibility:hidden;background-color:#F5F5EF}@media (prefers-color-scheme: dark){html{background-color:#131923}}html.ready{visibility:visible}.dark .welcome-card{background-color:#1c2535!important;border-color:rgba(255, 255, 255, 0.1)!important;box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.3)!important;color:#e5e7eb}.dark .welcome-card:hover{background-color:#243044!important}.dark .welcome-card h3{color:#ffffff}.dark .welcome-card p{color:#9ca3af!important}#changelog-month-nav{padding-left:2.5rem;width:19rem;box-sizing:border-box;margin-bottom:1.75rem;max-height:45vh;overflow-y:auto}#changelog-month-nav .changelog-month-nav__year{margin:0 0 0.5rem;font-size:0.875rem;line-height:1.5rem;font-weight:500;color:#364152}#changelog-month-nav .changelog-month-nav__list{list-style:none;margin:0;padding:0;border-left:1px solid rgba(0, 0, 0, 0.08)}#changelog-month-nav .changelog-month-nav__list a{display:block;padding:0.25rem 0 0.25rem 0.75rem;margin-left:-1px;border-left:1px solid transparent;font-size:0.875rem;line-height:1.5rem;color:#697586;text-decoration:none;transition:color 0.15s ease, border-color 0.15s ease}#changelog-month-nav .changelog-month-nav__list a:hover{color:#121926}#changelog-month-nav .changelog-month-nav__list a.is-active{color:#006CFA;border-left-color:#006CFA;font-weight:500}.dark #changelog-month-nav .changelog-month-nav__year{color:#cdd5df}.dark #changelog-month-nav .changelog-month-nav__list{border-left-color:rgba(255, 255, 255, 0.12)}.dark #changelog-month-nav .changelog-month-nav__list a{color:#9aa4b2}.dark #changelog-month-nav .changelog-month-nav__list a:hover{color:#ffffff}.dark #changelog-month-nav .changelog-month-nav__list a.is-active{color:#4d9bff;border-left-color:#4d9bff}.update-container>div:first-child{display:none}.update-container>div:nth-child(2){flex:1 1 100%;max-width:100%;width:100%}.update-container{gap:0}#footer a[href*=\"utm_campaign=poweredBy\"]{display:none}.billing-timeline-diagram rect.task[id*=\"-phase1_\"]{fill:#DDD6FE!important;stroke:#7C3AED!important}.billing-timeline-diagram rect.task[id*=\"-phase2_\"]{fill:#FDE68A!important;stroke:#B45309!important}.billing-timeline-diagram rect.task[id*=\"-inherited_\"]{fill:#BFDBFE!important;stroke:#2563EB!important}.billing-timeline-diagram rect.task[id*=\"-boundary_\"]{fill:#D1D5DB!important;stroke:#6B7280!important}.billing-timeline-diagram text.taskText{fill:#111827!important}.billing-timeline-diagram svg{background-color:#ECECE9!important}.billing-timeline-diagram svg text{fill:#111827!important}.billing-timeline-diagram rect.section{fill:none!important}.billing-timeline-diagram .grid .tick{opacity:1!important}.billing-timeline-diagram .grid .tick line{stroke:#CECECE!important;stroke-width:1px!important;opacity:1!important}"}]}
{"page":{"pagePath":"v2/guide/alerts/usage-alerts","slug":"/v2/guide/alerts/usage-alerts","pageMetadata":{"title":"Usage alerts","description":"Usage alerts monitor a Contract's usage and spend and fire a webhook when it crosses thresholds you define.","keywords":["Lago","Contract","alerts","usage alerts","thresholds","webhooks"],"href":"/v2/guide/alerts/usage-alerts"},"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: \"Usage alerts monitor a Contract’s usage and spend and fire a webhook when it crosses thresholds you define.\"\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`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Frame,Heading,Info,OptimizedImage,Tab,Table,Tabs}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`overview`,children:`Overview`}),`\n`,_jsx(_components.p,{children:`Usage alerts notify you when a Contract’s usage or spend crosses thresholds you define. Common use cases:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`Let customers set and manage their own usage limits and budgets;`}),`\n`,_jsx(_components.li,{children:`Warn customers whose usage is climbing fast, before it reaches their bill; or`}),`\n`,_jsx(_components.li,{children:`Stop serving usage when a customer reaches the limit you defined for them.`}),`\n`]}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[`Usage alerts on Contracts are a `,_jsx(_components.strong,{children:`premium`}),` feature, in beta. Contact the Lago team to enable them on your organization.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`create-an-alert`,children:`Create an alert`}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`Dashboard`,id:`dashboard`,children:[_jsxs(_components.p,{children:[`An alert is tied to a specific Contract. You can create one on a `,_jsx(_components.code,{children:`pending`}),` or `,_jsx(_components.code,{children:`active`}),` Contract:`]}),_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Open the Contract and select `,_jsx(_components.strong,{children:`Alerts`}),` in its overview;`]}),`\n`,_jsxs(_components.li,{children:[`Click `,_jsx(_components.strong,{children:`Create alert`}),`;`]}),`\n`,_jsx(_components.li,{children:`Enter a name and a code for the alert;`}),`\n`,_jsxs(_components.li,{children:[`Select the alert type, `,_jsx(_components.strong,{children:`Usage units`}),` or `,_jsx(_components.strong,{children:`Usage amount`}),`;`]}),`\n`,_jsxs(_components.li,{children:[`In `,_jsx(_components.strong,{children:`Include`}),`, select a product, and optionally one of its product filters. A usage amount alert can also cover every product;`]}),`\n`,_jsx(_components.li,{children:`Set the thresholds and their codes;`}),`\n`,_jsxs(_components.li,{children:[`Optionally, set `,_jsx(_components.strong,{children:`Notify when resolved`}),` to `,_jsx(_components.strong,{children:`True`}),` on a threshold to also receive `,_jsx(_components.code,{children:`alert.resolved`}),`;`]}),`\n`,_jsxs(_components.li,{children:[`Optionally, turn on `,_jsx(_components.strong,{children:`Recurring alert after last threshold`}),`; and`]}),`\n`,_jsxs(_components.li,{children:[`Click `,_jsx(_components.strong,{children:`Create alert`}),` to confirm.`]}),`\n`]}),_jsx(Frame,{caption:`Create an alert on a Contract`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/lago-docs/z0U4TdkC3UIahDlF/v2/guide/alerts/images/create-contract-alert.webp?fit=max\u0026auto=format\u0026n=z0U4TdkC3UIahDlF\u0026q=85\u0026s=68b6b8b95e68e81c36dbaa8ecf435b2e`,alt:`The Create an alert on contract form, with a usage units alert on the LLM tokens product and a 1,000,000 units threshold`,\"data-og-width\":`776`,width:`776`,\"data-og-height\":`1228`,height:`1228`,\"data-path\":`v2/guide/alerts/images/create-contract-alert.webp`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/lago-docs/z0U4TdkC3UIahDlF/v2/guide/alerts/images/create-contract-alert.webp?w=280\u0026fit=max\u0026auto=format\u0026n=z0U4TdkC3UIahDlF\u0026q=85\u0026s=06268eed2069aa19a8de92a3c8df9536 280w, https://mintcdn.com/lago-docs/z0U4TdkC3UIahDlF/v2/guide/alerts/images/create-contract-alert.webp?w=560\u0026fit=max\u0026auto=format\u0026n=z0U4TdkC3UIahDlF\u0026q=85\u0026s=2717f0b6b6f66f2b25b0c305da7b8792 560w, https://mintcdn.com/lago-docs/z0U4TdkC3UIahDlF/v2/guide/alerts/images/create-contract-alert.webp?w=840\u0026fit=max\u0026auto=format\u0026n=z0U4TdkC3UIahDlF\u0026q=85\u0026s=a6a94192acdc865e6f14d0f56327e19e 840w, https://mintcdn.com/lago-docs/z0U4TdkC3UIahDlF/v2/guide/alerts/images/create-contract-alert.webp?w=1100\u0026fit=max\u0026auto=format\u0026n=z0U4TdkC3UIahDlF\u0026q=85\u0026s=502082663d2c8cf39387fb508143a8dd 1100w, https://mintcdn.com/lago-docs/z0U4TdkC3UIahDlF/v2/guide/alerts/images/create-contract-alert.webp?w=1650\u0026fit=max\u0026auto=format\u0026n=z0U4TdkC3UIahDlF\u0026q=85\u0026s=6f60b39cc8bcb2b729717b10cd4480a2 1650w, https://mintcdn.com/lago-docs/z0U4TdkC3UIahDlF/v2/guide/alerts/images/create-contract-alert.webp?w=2500\u0026fit=max\u0026auto=format\u0026n=z0U4TdkC3UIahDlF\u0026q=85\u0026s=6fe4e69cd59cb47ed1c324248199443d 2500w`})}),_jsxs(_components.p,{children:[`The `,_jsx(_components.strong,{children:`Alerts`}),` tab lists every alert of the Contract with its name and code.`]}),_jsx(Frame,{caption:`Alerts of a Contract`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/lago-docs/z0U4TdkC3UIahDlF/v2/guide/alerts/images/contract-alerts-list.webp?fit=max\u0026auto=format\u0026n=z0U4TdkC3UIahDlF\u0026q=85\u0026s=33a3d63a0fd1bf674c49ecf76af71cd4`,alt:`The Alerts tab of the Hooli Enterprise Contract, listing eight alerts such as Monthly spend, Opus tokens and Video minutes`,\"data-og-width\":`1440`,width:`1440`,\"data-og-height\":`1040`,height:`1040`,\"data-path\":`v2/guide/alerts/images/contract-alerts-list.webp`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/lago-docs/z0U4TdkC3UIahDlF/v2/guide/alerts/images/contract-alerts-list.webp?w=280\u0026fit=max\u0026auto=format\u0026n=z0U4TdkC3UIahDlF\u0026q=85\u0026s=b94e90109472c363f308512327ba4561 280w, https://mintcdn.com/lago-docs/z0U4TdkC3UIahDlF/v2/guide/alerts/images/contract-alerts-list.webp?w=560\u0026fit=max\u0026auto=format\u0026n=z0U4TdkC3UIahDlF\u0026q=85\u0026s=3fd7fd3bc741415dd8ca2493532daf8c 560w, https://mintcdn.com/lago-docs/z0U4TdkC3UIahDlF/v2/guide/alerts/images/contract-alerts-list.webp?w=840\u0026fit=max\u0026auto=format\u0026n=z0U4TdkC3UIahDlF\u0026q=85\u0026s=98efccfdd2ed9cc72231a1d73caf5ed1 840w, https://mintcdn.com/lago-docs/z0U4TdkC3UIahDlF/v2/guide/alerts/images/contract-alerts-list.webp?w=1100\u0026fit=max\u0026auto=format\u0026n=z0U4TdkC3UIahDlF\u0026q=85\u0026s=b94b0023a76107c3a53be905efacfd8a 1100w, https://mintcdn.com/lago-docs/z0U4TdkC3UIahDlF/v2/guide/alerts/images/contract-alerts-list.webp?w=1650\u0026fit=max\u0026auto=format\u0026n=z0U4TdkC3UIahDlF\u0026q=85\u0026s=ddbd8625cdf9725d4ac3e5a7939dc703 1650w, https://mintcdn.com/lago-docs/z0U4TdkC3UIahDlF/v2/guide/alerts/images/contract-alerts-list.webp?w=2500\u0026fit=max\u0026auto=format\u0026n=z0U4TdkC3UIahDlF\u0026q=85\u0026s=8c462eee4a59a186df42a2e2d64f84d0 2500w`})})]}),_jsxs(Tab,{title:`API`,id:`api`,children:[_jsxs(_components.p,{children:[`An alert is tied to a Contract’s `,_jsx(_components.code,{children:`external_id`}),`. You can create one on a `,_jsx(_components.code,{children:`pending`}),` or `,_jsx(_components.code,{children:`active`}),` Contract.`]}),_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Spend on the whole Contract`,numberOfLines:`19`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`19`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`LAGO_URL`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.getlago.com\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`API_KEY`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"__YOUR_API_KEY__\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --location`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --request`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$LAGO_URL`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`/api/v2/contracts/:external_id/alerts\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$API_KEY`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` 'Content-Type: application/json'`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --data-raw`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"alert\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"alert_type\": \"usage_amount\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"code\": \"monthly_spend\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"name\": \"Monthly spend\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"scope\": [],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"thresholds\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` { \"code\": \"soft\", \"value\": \"100000\" },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` { \"code\": \"hard\", \"value\": \"500000\", \"notify_on\": [\"triggered\", \"resolved\"] },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` { \"value\": \"250000\", \"recurring\": true }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Units of a product filter`,numberOfLines:`20`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--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:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`LAGO_URL`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.getlago.com\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`API_KEY`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"__YOUR_API_KEY__\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --location`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --request`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$LAGO_URL`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`/api/v2/contracts/:external_id/alerts\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$API_KEY`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` 'Content-Type: application/json'`}),_jsx(_components.span,{style:{color:`#D7BA7D`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --data-raw`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"alert\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"alert_type\": \"usage_units\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"code\": \"opus_tokens\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"name\": \"Opus tokens\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"scope\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` { \"type\": \"contract\", \"product_code\": \"llm_tokens\", \"product_filter_codes\": [\"opus\"] }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"thresholds\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` { \"code\": \"warn\", \"value\": \"1000000\", \"notify_on\": [\"triggered\", \"resolved\"] },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` { \"value\": \"500000\", \"recurring\": true }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})})]}),_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:`GET`}),`, `,_jsx(_components.code,{children:`PUT`}),` and `,_jsx(_components.code,{children:`DELETE`}),` on `,_jsx(_components.code,{children:`/api/v2/contracts/:external_id/alerts/:code`}),` to read, update and delete an alert, and `,_jsx(_components.code,{children:`GET /api/v2/contracts/:external_id/alerts`}),` to list them. An update accepts `,_jsx(_components.code,{children:`name`}),` and `,_jsx(_components.code,{children:`thresholds`}),` only. The `,_jsx(_components.code,{children:`code`}),`, `,_jsx(_components.code,{children:`alert_type`}),` and `,_jsx(_components.code,{children:`scope`}),` cannot change.`]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`alert-types`,children:`Alert types`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Usage amount`}),` (`,_jsx(_components.code,{children:`usage_amount`}),`): the amount of the usage in scope for the current billing period, before taxes. Values are in cents of the Contract currency, so `,_jsx(_components.code,{children:`\"100000\"`}),` is 1,000.00.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Usage units`}),` (`,_jsx(_components.code,{children:`usage_units`}),`): the number of units in scope for the current billing period. A units alert needs a product in its `,_jsx(_components.code,{children:`scope`}),`.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`scope`,children:`Scope`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`scope`}),` sets which usage the alert measures. It takes one entry at most.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:_jsx(_components.code,{children:`scope`})}),_jsx(_components.th,{children:`What the alert measures`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`[]`})}),_jsxs(_components.td,{children:[`Every metered product on the Contract. Only for `,_jsx(_components.code,{children:`usage_amount`}),`. Fixed products are left out.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`[{ \"type\": \"contract\", \"product_code\": \"llm_tokens\" }]`})}),_jsxs(_components.td,{children:[`The product’s own `,_jsx(_components.a,{href:`/v2/guide/rate-cards/overview`,children:`Rate Card`}),`. Events that match one of its `,_jsx(_components.a,{href:`/v2/guide/product-catalog/product-filters`,children:`product filters`}),` are not counted.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`[{ \"type\": \"contract\", \"product_code\": \"llm_tokens\", \"with_product_filters\": true }]`})}),_jsx(_components.td,{children:`The product’s own Rate Card and the Rate Cards of its filters.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`[{ \"type\": \"contract\", \"product_code\": \"llm_tokens\", \"product_filter_codes\": [\"opus\"] }]`})}),_jsx(_components.td,{children:`The Rate Card of that filter only.`})]})]})]}),`\n`,_jsx(_components.p,{children:`The product, and the filter if any, must be priced on the Contract. A fixed product cannot be used.`}),`\n`,_jsx(Heading,{level:`2`,id:`thresholds`,children:`Thresholds`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`An alert takes up to 20 thresholds, the recurring one included.`}),`\n`,_jsxs(_components.li,{children:[`One threshold can be `,_jsx(_components.code,{children:`recurring`}),`. It repeats every `,_jsx(_components.code,{children:`value`}),` above the highest non-recurring threshold.`]}),`\n`,_jsxs(_components.li,{children:[`Each threshold notifies on `,_jsx(_components.code,{children:`triggered`}),`. Add `,_jsx(_components.code,{children:`resolved`}),` to `,_jsx(_components.code,{children:`notify_on`}),` to also be notified when the value goes back below it. A threshold that opts in needs a `,_jsx(_components.code,{children:`code`}),`.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`billing-period`,children:`Billing period`}),`\n`,_jsxs(_components.p,{children:[`Each Rate Card is measured on its own current billing period, so the Rate Cards of one Contract can reset on different dates. When a Rate Card’s period restarts, its usage leaves the alert’s value and its thresholds can trigger again. This also happens when a new `,_jsx(_components.a,{href:`/v2/guide/rate-cards/rates`,children:`rate`}),` takes effect during the period. A restart never sends `,_jsx(_components.code,{children:`alert.resolved`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Usage on a `,_jsx(_components.a,{href:`/v2/guide/billable-metrics/recurring-vs-metered`,children:`recurring billable metric`}),` never resets.`]}),`\n`,_jsx(Heading,{level:`2`,id:`alert-notifications`,children:`Alert notifications`}),`\n`,_jsxs(_components.p,{children:[`Listen for the `,_jsx(_components.code,{children:`alert.triggered`}),` webhook. It names the alert, the Contract evaluated, the value that crossed the line, and every threshold crossed. `,_jsx(_components.code,{children:`currency`}),` is set on `,_jsx(_components.code,{children:`usage_amount`}),` alerts and `,_jsx(_components.code,{children:`null`}),` on `,_jsx(_components.code,{children:`usage_units`}),` alerts.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`24`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`24`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"webhook_type\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"alert.triggered\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"object_type\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"triggered_alert\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"organization_id\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"1a901a90-1a90-1a90-1a90-1a901a901a90\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"triggered_alert\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"lago_id\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"46b91ede-d129-4b6e-a255-300e2dc4a57d\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"lago_alert_id\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"a42c76da-d766-43b5-bdda-1e5a84fe7e37\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"alert_code\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"monthly_spend\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"alert_name\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"Monthly spend\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"alert_type\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"usage_amount\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"currency\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"USD\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"lago_contract_id\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"889abf77-8947-4fc5-9501-03b4c5ff4add\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"external_contract_id\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"contract_8832\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"external_customer_id\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"hooli_1234\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"current_value\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"752000.0\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"previous_value\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"452000.0\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"scope\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: [],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"crossed_thresholds\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`\"code\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"hard\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`\"value\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"500000.0\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`\"recurring\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`\"code\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`\"value\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"750000.0\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`\"recurring\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"triggered_at\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"2026-12-02T16:13:42Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`alert-resolution`,children:`Alert resolution`}),`\n`,_jsxs(_components.p,{children:[`Thresholds that opt in with `,_jsx(_components.code,{children:`notify_on: [\"triggered\", \"resolved\"]`}),` send `,_jsx(_components.code,{children:`alert.resolved`}),` when the value is back below them, or when an update raises or removes them. The `,_jsx(_components.code,{children:`reason`}),` is `,_jsx(_components.code,{children:`recovered`}),`, `,_jsx(_components.code,{children:`threshold_updated`}),` or `,_jsx(_components.code,{children:`threshold_removed`}),`.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`26`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`26`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"webhook_type\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"alert.resolved\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"object_type\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"resolved_alert\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"organization_id\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"1a901a90-1a90-1a90-1a90-1a901a901a90\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"resolved_alert\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"lago_id\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"3f144e52-8dc6-4ad4-8e72-bd80d8202bbd\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"lago_alert_id\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"a42c76da-d766-43b5-bdda-1e5a84fe7e37\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"alert_code\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"monthly_spend\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"alert_name\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"Monthly spend\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"alert_type\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"usage_amount\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"currency\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"USD\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"lago_contract_id\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"889abf77-8947-4fc5-9501-03b4c5ff4add\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"external_contract_id\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"contract_8832\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"external_customer_id\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"hooli_1234\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"current_value\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"452000.0\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"previous_value\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"612000.0\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"scope\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: [],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"recovered_thresholds\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`\"code\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"hard\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`\"value\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"500000.0\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`\"recurring\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"in_alarm_thresholds\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"soft\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"fully_resolved\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"reason\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"recovered\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"resolved_at\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"2026-12-02T16:11:42Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`contract-lifecycle`,children:`Contract lifecycle`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Only the `,_jsx(_components.code,{children:`active`}),` Contract is evaluated. Alerts created on a `,_jsx(_components.code,{children:`pending`}),` Contract are evaluated once it is active.`]}),`\n`,_jsx(_components.li,{children:`When the Contract is terminated, its alerts stop being evaluated and stay readable.`}),`\n`,_jsxs(_components.li,{children:[`Alerts follow the Contract’s `,_jsx(_components.code,{children:`external_id`}),`. A new Contract created with the same `,_jsx(_components.code,{children:`external_id`}),` picks them up.`]}),`\n`,_jsx(_components.li,{children:`If a product or filter leaves the Contract, its alerts are kept and skipped. If the product or filter is deleted, its alerts are deleted.`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`limitations`,children:`Limitations`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`An alert is evaluated after new events or after it is created or updated, close to real time. Its first evaluation sends `,_jsx(_components.code,{children:`alert.triggered`}),` for every threshold already passed;`]}),`\n`,_jsxs(_components.li,{children:[`Each alert `,_jsx(_components.code,{children:`code`}),` must be unique per Contract, and only one alert per type and scope can exist on a Contract; and`]}),`\n`,_jsxs(_components.li,{children:[`The API key needs the `,_jsx(_components.code,{children:`alert`}),` permission.`]}),`\n`]})]})}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":{"codeStyling":"dark","config":{},"pageMetadata":{"title":"Usage alerts","description":"Usage alerts monitor a Contract's usage and spend and fire a webhook when it crosses thresholds you define.","keywords":["Lago","Contract","alerts","usage alerts","thresholds","webhooks"],"href":"/v2/guide/alerts/usage-alerts"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Overview","slug":"overview","depth":2,"children":[]},{"title":"Create an alert","slug":"create-an-alert","depth":2,"children":[]},{"title":"Alert types","slug":"alert-types","depth":2,"children":[]},{"title":"Scope","slug":"scope","depth":2,"children":[]},{"title":"Thresholds","slug":"thresholds","depth":2,"children":[]},{"title":"Billing period","slug":"billing-period","depth":2,"children":[]},{"title":"Alert notifications","slug":"alert-notifications","depth":2,"children":[]},{"title":"Alert resolution","slug":"alert-resolution","depth":2,"children":[]},{"title":"Contract lifecycle","slug":"contract-lifecycle","depth":2,"children":[]},{"title":"Limitations","slug":"limitations","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/lago-docs/a0e77058367d9146/canonical.js","/docs/_mintlify/custom/lago-docs/fa2446312177e9c6/loader.js","/docs/_mintlify/custom/lago-docs/c55d8403f7fc83ad/changelog-anchor-redirect.js","/docs/_mintlify/custom/lago-docs/8c326c8b67b47933/changelog-month-nav.js","/docs/_mintlify/custom/lago-docs/103c90943d27f62a/webmcp.js","/docs/_mintlify/custom/lago-docs/1219fb859e5c496e/github-outbound.js"],"subdomain":"lago-docs","siteName":"Lago","title":"Usage alerts - Lago","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{"v1 · Subscriptions":{"href":"/guide/alerts/usage-alerts","matchLevel":1},"v2 · Contracts (Beta)":{"href":"/v2/guide/alerts/usage-alerts","matchLevel":0}},"firstHrefInLanguage":{}},"lastModified":"2026-12-03T08:14:27.698Z","originalFileLocation":"v2/guide/alerts/usage-alerts.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=\"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=\"Usage alerts monitor a Contract\u0026#x27;s usage and spend and fire a webhook when it crosses thresholds you define.\">\u003cmeta data-mint-head name=\"keywords\" content=\"Lago API, billing API, usage metering API, OpenAPI, billing SDK, Lago MCP, Lago contracts, rate cards, product catalog\">\u003cmeta data-mint-head name=\"application-name\" content=\"Lago\">\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/lago-docs/PXUAhcpsneOuo3Dn/_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/lago-docs/PXUAhcpsneOuo3Dn/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/lago-docs/PXUAhcpsneOuo3Dn/_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/lago-docs/PXUAhcpsneOuo3Dn/_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/lago-docs/PXUAhcpsneOuo3Dn/_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/lago-docs/PXUAhcpsneOuo3Dn/_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/lago-docs/PXUAhcpsneOuo3Dn/_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/lago-docs/PXUAhcpsneOuo3Dn/_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/lago-docs/PXUAhcpsneOuo3Dn/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Usage alerts - Lago\">\u003cmeta data-mint-head property=\"og:description\" content=\"Usage alerts monitor a Contract\u0026#x27;s usage and spend and fire a webhook when it crosses thresholds you define.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Lago\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://getlago.com/docs/v2/guide/alerts/usage-alerts\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://lago-docs.mintlify.site/docs/_mintlify/api/og/v2?division=Alerts\u0026amp;title=Usage+alerts\u0026amp;description=Usage+alerts+monitor+a+Contract%27s+usage+and+spend+and+fire+a+webhook+when+it+crosses+thresholds+you+define.\u0026amp;theme=e69bad9b2f17285816711238\u0026amp;signature=9c59e57db1cb2a133fc69eb0b2b28d659cdc62411621996b6616eea983650ca0\">\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=\"Usage alerts - Lago\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Usage alerts monitor a Contract\u0026#x27;s usage and spend and fire a webhook when it crosses thresholds you define.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://lago-docs.mintlify.site/docs/_mintlify/api/og/v2?division=Alerts\u0026amp;title=Usage+alerts\u0026amp;description=Usage+alerts+monitor+a+Contract%27s+usage+and+spend+and+fire+a+webhook+when+it+crosses+thresholds+you+define.\u0026amp;theme=e69bad9b2f17285816711238\u0026amp;signature=9c59e57db1cb2a133fc69eb0b2b28d659cdc62411621996b6616eea983650ca0\">\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/lago-docs/PXUAhcpsneOuo3Dn/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Lago\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#006CFA\">\u003clink data-mint-head rel=\"canonical\" href=\"https://getlago.com/docs/v2/guide/alerts/usage-alerts\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/v2/guide/alerts/usage-alerts.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://getlago.com/#organization\",\"name\":\"Lago\",\"legalName\":\"Get Lago Corp.\",\"url\":\"https://getlago.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://getlago.com/docs/logo/light.svg\"},\"sameAs\":[\"https://github.com/getlago\",\"https://www.linkedin.com/company/getlago\",\"https://x.com/GetLago\",\"https://www.youtube.com/channel/UCp6ltp7n3SgDVsmerJ7O7ZA\"]},{\"@type\":\"WebSite\",\"@id\":\"https://getlago.com/docs#website\",\"name\":\"Lago\",\"url\":\"https://getlago.com/docs\",\"publisher\":{\"@id\":\"https://getlago.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://getlago.com/docs/v2/guide/alerts/usage-alerts#webpage\",\"url\":\"https://getlago.com/docs/v2/guide/alerts/usage-alerts\",\"name\":\"Usage alerts\",\"description\":\"Usage alerts monitor a Contract's usage and spend and fire a webhook when it crosses thresholds you define.\",\"dateModified\":\"2026-12-03T08:14:27.698Z\",\"isPartOf\":{\"@id\":\"https://getlago.com/docs#website\"},\"breadcrumb\":{\"@id\":\"https://getlago.com/docs/v2/guide/alerts/usage-alerts#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://getlago.com/docs/v2/guide/alerts/usage-alerts#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Usage metering\",\"item\":\"https://getlago.com/docs/v2/guide/billable-metrics/create-billable-metrics\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Usage alerts\",\"item\":\"https://getlago.com/docs/v2/guide/alerts/usage-alerts\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://getlago.com/docs/v2/guide/alerts/usage-alerts#article\",\"headline\":\"Usage alerts\",\"name\":\"Usage alerts\",\"description\":\"Usage alerts monitor a Contract's usage and spend and fire a webhook when it crosses thresholds you define.\",\"url\":\"https://getlago.com/docs/v2/guide/alerts/usage-alerts\",\"mainEntityOfPage\":{\"@id\":\"https://getlago.com/docs/v2/guide/alerts/usage-alerts#webpage\"},\"dateModified\":\"2026-12-03T08:14:27.698Z\",\"keywords\":\"Lago, Contract, alerts, usage alerts, thresholds, webhooks\",\"publisher\":{\"@id\":\"https://getlago.com/#organization\"},\"isPartOf\":{\"@id\":\"https://getlago.com/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Lago\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Lago\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/v2/guide/alerts/usage-alerts.md","siteName":"Lago","nav":{"global":{"anchors":[{"anchor":"Blog","icon":"newspaper","href":"https://getlago.com/blog"},{"anchor":"Community","icon":"slack","href":"https://getlago.com/slack"},{"anchor":"GitHub","icon":"github","href":"https://github.com/getlago/lago"},{"anchor":"Status","icon":"signal-bars","href":"https://status.getlago.com/"}]},"versions":[{"version":"v1 · Subscriptions","default":true,"pages":[{"title":"v1 · Subscriptions","href":"/guide/alerts/usage-alerts"}]},{"version":"v2 · Contracts (Beta)","tabs":[{"tab":"Home","pages":[{"title":"Home","href":"/welcome"}]},{"tab":"Guide","groups":[{"group":"Introduction","pages":[{"title":"Welcome to Lago","sidebarTitle":"Welcome to Lago","href":"/v2/guide/introduction/welcome-to-lago"},{"title":"Why billing is a nightmare","href":"/v2/guide/introduction/why-billing-is-a-nightmare"},{"title":"Contracts vs subscriptions","href":"/v2/guide/introduction/contracts-vs-subscriptions"}]},{"group":"Get started","pages":[{"title":"Lago Cloud","href":"/v2/guide/lago-cloud"},{"group":"Lago Self-hosted","pages":[{"title":"Self-hosting overview","href":"/v2/guide/lago-self-hosted/overview"},{"title":"Docker","href":"/v2/guide/lago-self-hosted/docker"},{"title":"Kubernetes","href":"/v2/guide/lago-self-hosted/kubernetes"},{"title":"Compatibility matrix","href":"/v2/guide/lago-self-hosted/compatibility-matrix"},{"title":"Database maintenance","href":"/v2/guide/lago-self-hosted/database-maintenance"},{"title":"Tracking and analytics","href":"/v2/guide/lago-self-hosted/tracking-analytics"},{"title":"Versions update","href":"/v2/guide/lago-self-hosted/update-instance"},{"title":"Useful commands","href":"/v2/guide/lago-self-hosted/commands"}]},{"title":"Your first invoice","href":"/v2/guide/introduction/your-first-invoice"}]},{"group":"Usage metering","pages":[{"group":"Billable metrics","pages":[{"title":"Create billable metrics","sidebarTitle":"Create billable metrics","href":"/v2/guide/billable-metrics/create-billable-metrics"},{"group":"Aggregation types","pages":[{"title":"Overview","href":"/v2/guide/billable-metrics/aggregation-types/overview"},{"title":"Count","sidebarTitle":"Count","href":"/v2/guide/billable-metrics/aggregation-types/count"},{"title":"Count unique","sidebarTitle":"Count unique","href":"/v2/guide/billable-metrics/aggregation-types/count-unique"},{"title":"Latest","sidebarTitle":"Latest","href":"/v2/guide/billable-metrics/aggregation-types/latest"},{"title":"Max","sidebarTitle":"Max","href":"/v2/guide/billable-metrics/aggregation-types/max"},{"title":"Sum","sidebarTitle":"Sum","href":"/v2/guide/billable-metrics/aggregation-types/sum"},{"title":"Weighted sum","sidebarTitle":"Weighted sum","href":"/v2/guide/billable-metrics/aggregation-types/weighted-sum"},{"title":"Aggregation examples","sidebarTitle":"Aggregation examples","href":"/v2/guide/billable-metrics/aggregation-types/aggregation-examples"}]},{"title":"Metric recurrence","sidebarTitle":"Metric recurrence","href":"/v2/guide/billable-metrics/recurring-vs-metered"},{"title":"Filters and dimensions","sidebarTitle":"Filters and dimensions","href":"/v2/guide/billable-metrics/filters"},{"title":"SQL expressions","sidebarTitle":"SQL expressions","href":"/v2/guide/billable-metrics/sql-expressions"},{"title":"Rounding","sidebarTitle":"Rounding","href":"/v2/guide/billable-metrics/rounding"},{"title":"Delete billable metrics","sidebarTitle":"Delete billable metrics","href":"/v2/guide/billable-metrics/delete-billable-metrics"}]},{"group":"Usage ingestion","pages":[{"title":"Ingest usage","sidebarTitle":"Ingest usage","href":"/v2/guide/events/ingesting-usage"},{"title":"Retrieve usage","sidebarTitle":"Retrieve usage","description":"Find received events and check the quantities and amounts calculated for a Contract.","href":"/v2/guide/events/retrieve-usage"}]},{"group":"Alerts","pages":[{"title":"Usage alerts","href":"/v2/guide/alerts/usage-alerts"}]}]},{"group":"Catalog \u0026 pricing","pages":[{"group":"Product catalog","pages":[{"title":"Overview","sidebarTitle":"Overview","description":"Organize what you sell with Products, categories and filters, then define prices with Rate Cards.","href":"/v2/guide/product-catalog/overview"},{"title":"Product categories","href":"/v2/guide/product-catalog/product-categories"},{"group":"Products","root":{"title":"Overview","sidebarTitle":"Overview","href":"/v2/guide/product-catalog/products"},"pages":[{"title":"Fixed products","sidebarTitle":"Fixed product","href":"/v2/guide/product-catalog/fixed-products"},{"title":"Metered products","sidebarTitle":"Metered product","href":"/v2/guide/product-catalog/metered-products"}]},{"title":"Product filters","href":"/v2/guide/product-catalog/product-filters"}]},{"group":"Rate cards \u0026 Rates","pages":[{"title":"Overview","sidebarTitle":"Overview","href":"/v2/guide/rate-cards/overview"},{"title":"Rates","href":"/v2/guide/rate-cards/rates"},{"group":"Pricing models","pages":[{"title":"Overview","sidebarTitle":"Overview","href":"/v2/guide/rate-cards/pricing-models/overview"},{"title":"Standard rate model","sidebarTitle":"Standard","href":"/v2/guide/rate-cards/pricing-models/standard"},{"title":"Graduated rate model","sidebarTitle":"Graduated","href":"/v2/guide/rate-cards/pricing-models/graduated"},{"title":"Volume rate model","sidebarTitle":"Volume","href":"/v2/guide/rate-cards/pricing-models/volume"},{"title":"Package rate model","sidebarTitle":"Package","href":"/v2/guide/rate-cards/pricing-models/package"},{"title":"Percentage rate model","sidebarTitle":"Percentage","href":"/v2/guide/rate-cards/pricing-models/percentage"},{"title":"Graduated percentage rate model","sidebarTitle":"Graduated percentage","href":"/v2/guide/rate-cards/pricing-models/graduated-percentage"},{"title":"Dynamic rate model","sidebarTitle":"Dynamic","href":"/v2/guide/rate-cards/pricing-models/dynamic"}]},{"title":"Spending minimums","sidebarTitle":"Spending minimums","href":"/v2/guide/rate-cards/spending-minimums"}]}]},{"group":"Plans \u0026 contracts","pages":[{"group":"Plans","pages":[{"title":"Overview","sidebarTitle":"Overview","href":"/v2/guide/plans/overview"},{"title":"Plan phase \u0026 overrides","sidebarTitle":"Plan phase \u0026 overrides","href":"/v2/guide/plans/plan-phases"},{"title":"Manage plan changes","href":"/v2/guide/plans/manage-plan-changes"}]},{"group":"Contracts","pages":[{"title":"Overview","href":"/v2/guide/contracts/overview"},{"title":"Contract lifecycle","href":"/v2/guide/contracts/lifecycle"},{"title":"Billing timeline","href":"/v2/guide/contracts/billing-timeline"},{"title":"Contract overrides","href":"/v2/guide/contracts/overrides"},{"title":"End or cancel a Contract","href":"/v2/guide/contracts/end-or-cancel"}]}]},{"group":"Customers","pages":[{"title":"Overview","sidebarTitle":"Overview","href":"/v2/guide/customers/customer-management"},{"title":"Customer metadata","sidebarTitle":"Customer metadata","href":"/v2/guide/customers/customer-metadata"},{"title":"Billing entities","sidebarTitle":"Billing entities","href":"/v2/guide/billing-entities"}]},{"group":"Invoicing","pages":[{"group":"Invoices","pages":[{"title":"Overview","sidebarTitle":"Overview","href":"/v2/guide/invoicing/overview"},{"title":"Fees","sidebarTitle":"Fees","href":"/v2/guide/invoicing/fees"},{"title":"Draft invoice","sidebarTitle":"Draft invoice","href":"/v2/guide/invoicing/draft-invoices"},{"title":"Void invoice","sidebarTitle":"Void invoice","href":"/v2/guide/invoicing/void"},{"title":"Download invoice","sidebarTitle":"Download invoice","href":"/v2/guide/invoicing/download-invoices"}]},{"group":"Invoicing settings","pages":[{"sidebarTitle":"Overview","title":"Overview","href":"/v2/guide/invoicing/invoicing-settings/overview"},{"title":"Grace period","sidebarTitle":"Grace period","href":"/v2/guide/invoicing/invoicing-settings/grace-period"},{"title":"Invoice numbering","sidebarTitle":"Invoice numbering","href":"/v2/guide/invoicing/invoicing-settings/invoice-numbering"},{"title":"Issuing date","sidebarTitle":"Issuing date","href":"/v2/guide/invoicing/invoicing-settings/issuing-date"},{"title":"Zero-amount invoices","sidebarTitle":"Zero-amount invoices","href":"/v2/guide/invoicing/invoicing-settings/empty-invoices"}]},{"group":"Taxes","pages":[{"title":"Taxes","sidebarTitle":"Overview","href":"/v2/guide/taxes"}]},{"group":"Credit notes","pages":[{"sidebarTitle":"Overview","title":"Overview","href":"/v2/guide/invoicing/credit-notes/overview"},{"title":"Credit note metadata","sidebarTitle":"Credit note metadata","href":"/v2/guide/invoicing/credit-notes/credit-note-metadata"}]}]},{"group":"Payments \u0026 cash collection","pages":[{"group":"Collect payments","pages":[{"title":"Payment providers","sidebarTitle":"Payment providers","href":"/v2/guide/payments/payment-providers"},{"title":"Payment methods","sidebarTitle":"Payment methods","href":"/v2/guide/payments/payment-methods"},{"title":"Payment retries","sidebarTitle":"Payment retries","href":"/v2/guide/payments/payment-retries"},{"title":"Payment requests","sidebarTitle":"Payment requests","href":"/v2/guide/payments/payment-requests"}]},{"group":"Record and reconcile","pages":[{"title":"Record manual payments","sidebarTitle":"Record manual payments","href":"/v2/guide/payments/record-manual-payments"},{"title":"Payment receipts","sidebarTitle":"Payment receipts","href":"/v2/guide/payments/receipts"}]}]},{"group":"Webhooks \u0026 logs","pages":[{"title":"Webhooks","sidebarTitle":"Webhooks","href":"/v2/guide/webhooks"},{"title":"Logs","sidebarTitle":"Logs","href":"/v2/guide/logs"}]},{"group":"Data \u0026 analytics","pages":[{"group":"Data exports","pages":[{"title":"Lago Data Pipeline","sidebarTitle":"Lago Data Pipeline","href":"/v2/integrations/data/lago-data-pipeline"},{"title":"Data Pipeline schema","href":"/v2/integrations/data/lago-data-pipeline-schema"}]}]},{"group":"Resources","pages":[{"group":"Security","pages":[{"title":"API keys","sidebarTitle":"API keys","href":"/v2/guide/security/api-keys"},{"title":"Roles and permissions","sidebarTitle":"Roles and permissions","href":"/v2/guide/security/rbac"},{"title":"Single sign-on (SSO)","sidebarTitle":"Single sign-on (SSO)","href":"/v2/guide/security/sso"},{"title":"Audit logs","sidebarTitle":"Audit logs","href":"/v2/guide/security/audit-logs"},{"title":"Security logs","sidebarTitle":"Security logs","href":"/v2/guide/security/security-logs"},{"title":"SOC 2 Type 2","sidebarTitle":"SOC 2 Type 2","href":"/v2/guide/security/soc"}]}]}]},{"tab":"API References","pages":[{"title":"API References","href":"/v2/api-reference/intro"}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/v2/integrations/introduction"}]},{"tab":"Templates","pages":[{"title":"Templates","href":"/v2/templates/introduction"}]},{"tab":"FAQ","pages":[{"title":"FAQ","href":"/v2/faq/about-lago"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog/product"}]}]}]},"basePath":"","title":"Usage alerts - Lago","deploymentId":"dpl_BventAZFrf621XW89Bu9nGboqkDb","buildId":"dpl_BventAZFrf621XW89Bu9nGboqkDb","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-CWYEsOtC.js","DynamicMarkdown-CMNDdb22.js","zoom-image-lightbox-CRgB1gSg.js","lightbox-handle-r17bVUz3.js"]}