Skip to main content
POST
/
v1
/
alerts
Create Alert
curl --request POST \
  --url https://api.getmaxim.ai/v1/alerts \
  --header 'Content-Type: application/json' \
  --header 'x-maxim-api-key: <api-key>' \
  --data '{
  "workspaceId": "<string>",
  "entityId": "<string>",
  "type": "WORKFLOW",
  "enabled": true,
  "config": {
    "metric": "<string>",
    "minimumThreshold": 2,
    "duration": 123,
    "operator": "<string>",
    "value": "<string>",
    "renotifyTTL": -1
  },
  "notificationChannelIds": [
    "<string>"
  ]
}'
{
  "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
workspaceId
string
required

Unique identifier for the workspace

entityId
string
required

ID of the entity to create alert for

type
enum<string>
required

Type of entity for the alert

Available options:
WORKFLOW,
WORKFLOW_SIMULATION,
PROMPT_CHAIN,
DATASET,
DATASET_SPLIT,
PROMPT,
DATASOURCE,
PROMPT_EXPERIMENT,
LOG_REPOSITORY,
PROMPT_TOOL,
EVALUATOR,
SDK,
TEST_RUN,
RUN_REPORT
config
object
required
enabled
boolean
default:true

Whether the alert is enabled

notificationChannelIds
string[]

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

Response

Alert created successfully

id
string
required
workspaceId
string
required
entityId
string
required
type
string
required
enabled
boolean
required
config
object
required
createdAt
string
required
updatedAt
string
required
notificationChannels
object[]