Skip to main content
PUT
/
v1
/
alerts
Update Alert
curl --request PUT \
  --url https://api.getmaxim.ai/v1/alerts \
  --header 'Content-Type: application/json' \
  --header 'x-maxim-api-key: <api-key>' \
  --data '{
  "id": "<string>",
  "workspaceId": "<string>",
  "type": "LOG_REPOSITORY",
  "config": {
    "metric": "<string>",
    "duration": 2,
    "minimumThreshold": 2,
    "operator": "<string>",
    "value": "<string>"
  },
  "enabled": true,
  "notificationChannelIds": [
    "<string>"
  ]
}'
{
  "data": {
    "id": "<string>",
    "workspaceId": "<string>",
    "entityId": "<string>",
    "type": "<string>",
    "enabled": true,
    "config": {
      "metric": "<string>",
      "minimumThreshold": 2,
      "duration": 123,
      "operator": "<string>",
      "value": "<string>",
      "renotifyTTL": -1
    },
    "createdAt": "<string>",
    "updatedAt": "<string>",
    "notificationChannels": [
      {
        "notificationChannel": {
          "id": "<string>",
          "type": "SLACK",
          "name": "<string>",
          "config": {}
        }
      }
    ]
  }
}

Authorizations

x-maxim-api-key
string
header
required

API key for authentication

Body

application/json
id
string
required

Unique identifier for the alert

Minimum length: 1
workspaceId
string
required

Unique identifier for the workspace

Minimum length: 1
type
required

Type of entity for the alert

Available options:
LOG_REPOSITORY
config
object
required

Alert configuration

enabled
boolean

Whether the alert is enabled

notificationChannelIds
string[]

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

Response

Alert updated successfully

data
object
required