curl --request POST \
--url https://api.trymaitai.ai/api/v1/monitors \
--header 'Content-Type: application/json' \
--header 'X-Maitai-Api-Key: <api-key>' \
--data '
{
"name": "Order intake completeness",
"description": "Catches order intents that miss customer_id or order_total.",
"config": {
"runner": {
"resource_type": "direct",
"input": {
"response_path": "response"
}
},
"result": {
"error": {
"id": "g_err",
"kind": "group",
"op": "OR",
"children": [
{
"id": "c1",
"kind": "condition",
"source": "json",
"path": "customer_id",
"operator": "does_not_exist",
"value": ""
},
{
"id": "c2",
"kind": "condition",
"source": "json",
"path": "order_total",
"operator": "does_not_exist",
"value": ""
}
]
},
"warning": {
"id": "g_warn",
"kind": "group",
"op": "OR",
"children": []
},
"default_outcome": "pass"
}
}
}
'