Maxim Logo
Alerts

Update Alert

Update an alert

PUT
/v1/alerts

Authorization

x-maxim-api-key<token>

API key for authentication

In: header

Request Body

application/jsonOptional
idRequiredstring

Unique identifier for the alert

Minimum length: 1
workspaceIdRequiredstring

Unique identifier for the workspace

Minimum length: 1
typeRequiredAny properties in string,string

Type of entity for the alert

Value in: "LOG_REPOSITORY" | "EVALUATOR"
configRequiredobject

Alert configuration

enabledboolean

Whether the alert is enabled

notificationChannelIdsarray<string>

List of notification channel IDs eg: ["channel_123", "channel_456"]

curl -X PUT "https://api.getmaxim.ai/v1/alerts" \
  -H "x-maxim-api-key: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "string",
    "workspaceId": "string",
    "type": "LOG_REPOSITORY",
    "config": {
      "metric": "string",
      "duration": 1,
      "minimumThreshold": 1,
      "operator": "string",
      "value": "string"
    },
    "enabled": true,
    "notificationChannelIds": [
      "string"
    ]
  }'

Alert updated successfully

{
  "data": {
    "id": "string",
    "workspaceId": "string",
    "entityId": "string",
    "type": "string",
    "enabled": true,
    "config": {
      "metric": "string",
      "minimumThreshold": 1,
      "duration": 0,
      "operator": "string",
      "value": "string",
      "renotifyTTL": -1
    },
    "createdAt": "string",
    "updatedAt": "string",
    "notificationChannels": [
      {
        "notificationChannel": {
          "id": "string",
          "type": "SLACK",
          "name": "string",
          "config": {
            "property1": null,
            "property2": null
          }
        }
      }
    ]
  }
}