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",
"config": {
"metric": "<string>",
"minimumThreshold": 2,
"duration": 123,
"operator": "<string>",
"value": "<string>",
"renotifyTTL": -1
},
"enabled": true,
"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": {}
}
}
]
}Create a new 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",
"config": {
"metric": "<string>",
"minimumThreshold": 2,
"duration": 123,
"operator": "<string>",
"value": "<string>",
"renotifyTTL": -1
},
"enabled": true,
"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": {}
}
}
]
}API key for authentication
Unique identifier for the workspace
ID of the entity to create alert for
Type of entity for the alert
WORKFLOW, WORKFLOW_SIMULATION, PROMPT_CHAIN, DATASET, DATASET_SPLIT, PROMPT, DATASOURCE, PROMPT_EXPERIMENT, LOG_REPOSITORY, PROMPT_TOOL, EVALUATOR, SDK, TEST_RUN, RUN_REPORT Show child attributes
Whether the alert is enabled
List of notification channel IDs eg: ["channel_123", "channel_456"]
Was this page helpful?