Monitoring & Reporting Write
Create a monitoring alert for the user's ad campaigns
POST https://api.adspirer.ai/api/v1/tools/create_monitor/execute
Authorization: Bearer sk_live_... — your Adspirer API key (required)Content-Type: application/json (required)Idempotency-Key: <uuid> — recommended for write operations to make retries safeAll tool arguments are wrapped in an arguments object.
| Field | Type | Description |
|---|---|---|
metric | string required | Metric to monitor. Supported: 'cpa', 'cpc', 'cost_per_lead', 'spend', 'roas', 'ctr', 'conversion_rate', 'conversions', 'clicks', 'impressions', 'budget_utilization'. |
operator | string required | Comparison direction. Use 'greater_than' for ceilings (e.g., 'alert when CPA goes above $50') or 'less_than' for floors (e.g., 'alert when ROAS drops below 2x'). Relative-delta and compound conditions are not supported on this surface. |
threshold | number required | The threshold value (e.g., 50 for CPA, 2.0 for ROAS, 1.5 for CTR percentage). |
consecutive_days | integer optional | Optional. Only trigger if the condition holds for this many consecutive days (1–14). Filters out one-off noise. Omit to alert on first match. |
name | string optional | Name for this alert (e.g., 'CPA Ceiling $50'). Optional — if omitted, an auto-generated name is used like 'Google Ads CPA > 50'. |
platforms | array optional | Platforms to monitor: ['google_ads'], ['meta_ads'], ['google_ads', 'meta_ads'], etc. Default: all connected platforms. |
campaign_ids | array optional | Specific campaign IDs to monitor. Default: all campaigns. Get IDs from list_campaigns / list_meta_campaigns tools. |
alert_destination | string optional | Email address to send alerts to. If not provided, defaults to the user's account email. |
{
"arguments": {
"metric": "string",
"operator": "string",
"threshold": 1.0,
"consecutive_days": 1,
"name": "string",
"platforms": [
"string"
],
"campaign_ids": [
"string"
],
"alert_destination": "string"
}
}
{
"success": true,
"data": {
"text": "(tool-specific textual output for create_monitor)",
"quota": {
"used": 42,
"limit": 150,
"tier": "plus",
"period_end": "2026-05-01"
}
},
"tool": "create_monitor"
}
{
"success": false,
"error": "You have 25 meta_ads accounts connected. Please specify which account to use by passing the ad_account_id parameter:\n - Acme Holdings (ad_account_id=\"act_123456789\")\n - Acme EU (ad_account_id=\"act_987654321\")",
"is_error": true,
"tool": "create_monitor"
}
{
"success": false,
"error": "\ud83d\udea8 Monthly limit reached (150/150 tool calls on Plus tier).\nUpgrade to Pro at https://adspirer.ai to keep building.",
"is_error": true,
"tool": "create_monitor",
"quota": {
"used": 150,
"limit": 150,
"tier": "plus",
"period_end": "2026-05-01",
"upgrade_url": "https://adspirer.ai"
}
}
Interactive: Swagger UI
Machine-readable: OpenAPI 3.1 spec · llms-full.txt
More tools: Monitoring & Reporting · All tools
Adspirer REST API — get an API key at adspirer.ai/keys · adspirer.ai