Maxim Logo
Alerts

Create Alert

Create a new alert

POST
/v1/alerts

Authorization

x-maxim-api-key<token>

API key for authentication

In: header

Request Body

application/jsonOptional
workspaceIdRequiredstring

Unique identifier for the workspace

entityIdRequiredstring

ID of the entity to create alert for

typeRequiredstring

Type of entity for the alert

Value in: "WORKFLOW" | "WORKFLOW_SIMULATION" | "PROMPT_CHAIN" | "DATASET" | "DATASET_SPLIT" | "PROMPT" | "DATASOURCE" | "PROMPT_EXPERIMENT" | "LOG_REPOSITORY" | "PROMPT_TOOL" | "EVALUATOR" | "SDK" | "TEST_RUN" | "RUN_REPORT"
enabledboolean

Whether the alert is enabled

Default: true
configRequiredobject
notificationChannelIdsarray<string>

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

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

Alert created successfully

{
  "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
        }
      }
    }
  ]
}