Skip to main content
POST
/
monitors
/
{monitor_id}
/
targets
Create monitor target
curl --request POST \
  --url https://api.trymaitai.ai/api/v1/monitors/{monitor_id}/targets \
  --header 'Content-Type: application/json' \
  --header 'X-Maitai-Api-Key: <api-key>' \
  --data '
{
  "target_type": "workflow",
  "target_id": 42,
  "sample_rate": 5,
  "enabled": true
}
'
{
  "data": {
    "id": 9003,
    "monitor_id": 501,
    "target_type": "workflow",
    "target_id": 42,
    "target_name": "order-intake-workflow",
    "sample_rate": 5,
    "enabled": true,
    "active": 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.

Path Parameters

monitor_id
integer
required

Body

application/json
target_type
enum<string>
required
Available options:
intent,
workflow,
agent
target_id
integer
required
sample_rate
number
required
Required range: 0 <= x <= 100
enabled
boolean
meta
object

Response

201 - application/json

Create monitor target.

data
any