Skip to main content
POST
/
monitors
Create monitor
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"
    }
  }
}
'
{
  "data": {
    "id": 502,
    "name": "Order intake completeness",
    "status": "DRAFT",
    "target_count": 0,
    "has_unpublished_changes": true
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.trymaitai.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

X-Maitai-Api-Key
string
header
required

Your Maitai API key from the Portal.

Body

application/json
name
string
required
description
string
config
object
meta
object

Response

201 - application/json

Create monitor.

data
any