---
updatedAt: 2026-05-07T13:37:16.000Z
agentTools:
  projectIndex: https://docs.umbrellacost.io/llms.txt
---

# Create Cost Alert - Account Level

Create a static cost threshold alert. This example shows a 'static' alertType with 'total' alertLevel for organization-wide cost monitoring.

### Examples on the right

* **Detailed** - Create a new cost alert rule with filters and thresholds.
* **Account Level**- This example shows a 'static' alertType with 'total' alertLevel for organization-wide cost monitoring.

### Enum Field Descriptions

* alertLevel: Alert scope level
  * service: Alert at service level
  * total: Alert for total costs
  * linked\_account: Alert at linked account level
* alertType: Type of cost alert (required)
  * changeCostService: Change-based cost service alert
  * static: Static threshold alert
* changeType: How cost changes are detected
  * change: Any change detection
  * increase: Only cost increases
  * decrease: Only cost decreases
* granularity: Time period for analysis (numeric values)
  * 0: Daily analysis
  * 1: Weekly analysis
  * 2: Monthly analysis
  * 3: Specific day in week
* dayInWeek: Day of week (when granularity=3)
  * 0: Monday, 1: Tuesday, 2: Wednesday, 3: Thursday, 4: Friday, 5: Saturday, 6: Sunday
* costType: Cost calculation method
  * unblended: Unblended costs
  * net\_unblended: Net unblended costs
  * amortized: Amortized costs
  * net\_amortized: Net amortized costs
  * static: Static cost threshold
* operatorType: Filter combination logic
  * and: All filters must match
  * or: Any filter can match
* operator (in filters): Comparison operator
  * IS: Exact match
  * IS\_NOT: Does not match

<br />

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Cost Alerts Public API",
    "description": "Public API endpoints for cost alert rule management",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.umbrellacost.io"
    }
  ],
  "paths": {
    "/api/v2/cost-alerts/rule": {
      "post": {
        "tags": [
          "default"
        ],
        "summary": "Create Cost Alert - Account Level",
        "description": "Create a static cost threshold alert. This example shows a 'static' alertType with 'total' alertLevel for organization-wide cost monitoring.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "example": {
                  "alertRule": {
                    "uuid": "550e8400-e29b-41d4-a716-446655440004",
                    "alertName": "Static Cost Threshold Alert",
                    "filters": {
                      "linkedaccid": {
                        "operator": "IS",
                        "value": "all"
                      },
                      "service": {
                        "operator": "IS",
                        "value": "all"
                      }
                    },
                    "alertLevel": "total",
                    "alertType": "static",
                    "changeType": "increase",
                    "changePercent": 50,
                    "changeValue": 1000,
                    "granularity": 1,
                    "operatorType": "or",
                    "costType": "amortized",
                    "recipients": [
                      {
                        "dstId": "ceo@example.com",
                        "recipientData": {
                          "dstId": "ceo@example.com",
                          "type": "EMAIL"
                        }
                      }
                    ],
                    "recipientsEmails": [
                      "ceo@example.com"
                    ]
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "example": "your-token-here"
          },
          {
            "name": "apikey",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "example": "your-api-key-here"
          },
          {
            "name": "Content-Type",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "example": "application/json"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {}
            }
          }
        },
        "x-readme": {
          "code-samples": [
            {
              "code": "{\n  \"alertRule\": {\n    \"uuid\": \"550e8400-e29b-41d4-a716-446655440003\",\n    \"alertName\": \"High Cost Increase Alert\",\n    \"filters\": {\n      \"linkedaccid\": {\n        \"operator\": \"IS\",\n        \"value\": [\"123456789012\", \"987654321098\"]\n      },\n      \"service\": {\n        \"operator\": \"IS\",\n        \"value\": [\"Amazon EC2-Instance\", \"Amazon RDS\"]\n      }\n    },\n    \"alertLevel\": \"service\",\n    \"alertType\": \"changeCostService\",\n    \"changeType\": \"change\",\n    \"changePercent\": 25,\n    \"changeValue\": 100,\n    \"granularity\": 0,\n    \"dayInWeek\": 1,\n    \"operatorType\": \"and\",\n    \"costType\": \"unblended\",\n    \"recipients\": [\n      {\n        \"dstId\": \"finance@example.com\",\n        \"recipientData\": {\n          \"dstId\": \"finance@example.com\",\n          \"type\": \"EMAIL\"\n        }\n      }\n    ],\n    \"recipientsEmails\": [\"finance@example.com\", \"ops@example.com\"]\n  }\n}",
              "language": "json",
              "name": "Detailed"
            },
            {
              "code": "{\n  \"alertRule\": {\n    \"uuid\": \"550e8400-e29b-41d4-a716-446655440004\",\n    \"alertName\": \"Static Cost Threshold Alert\",\n    \"filters\": {\n      \"linkedaccid\": {\n        \"operator\": \"IS\",\n        \"value\": \"all\"\n      },\n      \"service\": {\n        \"operator\": \"IS\",\n        \"value\": \"all\"\n      }\n    },\n    \"alertLevel\": \"total\",\n    \"alertType\": \"static\",\n    \"changeType\": \"increase\",\n    \"changePercent\": 50,\n    \"changeValue\": 1000,\n    \"granularity\": 1,\n    \"operatorType\": \"or\",\n    \"costType\": \"amortized\",\n    \"recipients\": [\n      {\n        \"dstId\": \"ceo@example.com\",\n        \"recipientData\": {\n          \"dstId\": \"ceo@example.com\",\n          \"type\": \"EMAIL\"\n        }\n      }\n    ],\n    \"recipientsEmails\": [\"ceo@example.com\"]\n  }\n}",
              "language": "json",
              "name": "Account Level"
            }
          ],
          "samples-languages": [
            "json"
          ]
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": false
  }
}
```