# <a id="bitdrift.public.unary.alerts.v1.UpsertAlertConfigRequest"></a>UpsertAlertConfigRequest

**Source definition:** [`src/bitdrift/public/unary/alerts/v1/alerts.proto#L235-L262`](<https://github.com/bitdriftlabs/api/blob/main/src/bitdrift/public/unary/alerts/v1/alerts.proto#L235-L262>)

Requests creation, update, or deletion of an alert configuration.

<section class="proto-fields-table" markdown>
| Field | Type | Description |
|---|---|---|
| workflow_id | <span class="proto-type proto-type-primitive">string</span><br><em class="proto-field-annotation">between 1 and 255 chars</em> | The workflow ID to upsert the configuration for. |
| chart_rule_id | <span class="proto-type proto-type-primitive">string</span><br><em class="proto-field-annotation">between 1 and 255 chars</em> | The chart rule ID to upsert the configuration for. |
| aggregated_action_id | <span class="proto-type proto-type-primitive">string</span><br><em class="proto-field-annotation">between 1 and 255 chars</em> | The aggregated action ID to upsert the configuration for. |
| id | <span class="proto-type proto-type-primitive">optional uint64</span> | The ID of the alert configuration to upsert. If empty a new alert config will be created. |
| alert_config | <span class="proto-type proto-type-message">[<i class="proto-type-part">bitdrift</i><i class="proto-type-dot">.</i><i class="proto-type-part">public</i><i class="proto-type-dot">.</i><i class="proto-type-part">unary</i><i class="proto-type-dot">.</i><i class="proto-type-part">alerts</i><i class="proto-type-dot">.</i><i class="proto-type-part">v1</i><i class="proto-type-dot">.</i><i class="proto-type-part">AlertConfig</i>](bitdrift_public_unary_alerts_v1_AlertConfig.md "bitdrift.public.unary.alerts.v1.AlertConfig")</span> | Alert configuration to create or update. |
| disabled | <span class="proto-type proto-type-primitive">bool</span> | Whether to enable or disable the alert as part of the upsert. |

</section>
<p class="h4">Example</p>
```json
{
  "aggregated_action_id": "count/fkQ1PfAZhdYvJexzY6DYuoYCZTEaWO0Y7spxwjr7akc",
  "alert_config": {
    "basic_alert": {
      "condition": "ABOVE",
      "consecutive_data_points": 3,
      "histogram_configuration": {
        "percentile": 1.0,
        "percentiles": [
          1.0
        ]
      },
      "limit_strategy": {
        "exclusions": {
          "dimension_identifiers": [
            {
              "id": "time_series_id_opaque_example",
              "labels": [
                {
                  "name": "name",
                  "value": "value"
                }
              ]
            }
          ],
          "return_other": false
        },
        "sort_order": "MAX",
        "top_k_limit": {
          "top_k": 5
        }
      },
      "threshold": 0.75,
      "unique_device_threshold": 50,
      "window": "3600s"
    },
    "common_config": {
      "custom_notification_text": "@checkout-oncall Please investigate.",
      "description": "Triggers when the checkout workflow error rate exceeds the configured threshold.",
      "labels": {
        "key": ""
      },
      "name": "Checkout error rate",
      "notifications": [
        {
          "min_time_between_notifications": "3600s",
          "notification_config": {
            "disabled": false,
            "notification_group": {
              "name": "engineering-oncall"
            }
          }
        }
      ]
    }
  },
  "chart_rule_id": "_i1yUnHjKfmWpCaD5Tazo",
  "disabled": false,
  "id": 123,
  "workflow_id": "checkout-errors"
}
```

