API resource
Automation rules
If-this-then-that rules that run on our servers. Event: something happens (a post failed, a comment arrived) and you get told on Slack or email. Scheduled: every hour or day, check recent posts and notify, or boost the ones past a threshold. Ad rules: check campaigns, ad sets or ads on spend, results or ROAS and pause them or change budgets, optionally after a person approves. Ad rules and boost steps need the Ads add-on (402 ads_addon_required) and spend real money. GET /v1/automation-rules/cataloglists every trigger, fact, metric and step with the JSON Schema of a rule; a save that can't run is refused with every problem in details.problems.
Create a rule
/v1/automation-rulesWorks on: All
The shape picks the kind: an event trigger.type (such as post.failed) with notify.send steps; a schedule over subjects.each: post with a filter; or a schedule over campaigns, ad sets or ads with metric conditions and ads.* steps. Event and scheduled rules are on unlessstatus: paused; ad rules stay paused unless status: active. Try one first withPOST /v1/automation-rules/preview (or /backtest for past data).
Body
namestringrequiredLabel.
statusstringactive or paused.
triggerobjectrequired{ type: "post.failed", filter } or { type: "schedule", every: "1h" }.
subjectsobjectScheduled and ad rules: what each check looks at.
filterobjectFact comparisons ({ all: [...] }, { any: [...] }).
conditionsobjectAd rules: metric comparisons over a window.
stepsobject[]requirednotify.send, ads.boost_post, ads.pause, ads.change_budget, approval.request...
limitsobjectcooldown, maxChangesPerDay.
curl -X POST "https://creatoros-production-5658.up.railway.app/v1/automation-rules" \
-H "Authorization: Bearer $CREATOROS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Boost winners",
"trigger": {
"type": "schedule",
"every": "1h"
},
"subjects": {
"each": "post",
"publishedWithin": "3d"
},
"filter": {
"all": [
{
"field": "platform",
"op": "equals",
"value": "instagram"
},
{
"field": "likes",
"op": "greater_than",
"value": 500
}
]
},
"steps": [
{
"type": "ads.boost_post",
"adAccountId": "act_1234567890",
"budget": 50,
"days": 5,
"countries": [
"US"
]
}
],
"limits": {
"maxChangesPerDay": 3
}
}'{
"automation": {
"id": "obj_Hq3Lw9Xe2Rt7Yu1Io5Pa8Sd4Fg6Jk0Zx3Cv7Bn1Mq2",
"name": "Boost winners",
"kind": "scheduled",
"status": "active"
}
}List rules
/v1/automation-rulesWorks on: All
Every rule, newest first. Also: GET / PATCH / DELETE /v1/automation-rules/{automationId},POST .../activate, POST .../pause, GET .../checks (what each run matched and did),GET /v1/automation-rules/actions (every ad change made), GET .../approvals withPOST .../approvals/{approvalId}/approve or /reject, ready-made rules atGET /v1/automation-rules/library/{templateId} (POST .../install), and one ad account's switch and daily raise limit at PATCH /v1/automation-rules/ad-account-controls.
Query parameters
accountIdstringOnly rules on this account.
limitintegerPage size.
cursorstringnextCursor from the previous page.
curl "https://creatoros-production-5658.up.railway.app/v1/automation-rules" \
-H "Authorization: Bearer $CREATOROS_API_KEY"{
"automations": [
{
"id": "obj_Hq3Lw9Xe2Rt7Yu1Io5Pa8Sd4Fg6Jk0Zx3Cv7Bn1Mq2",
"name": "Boost winners",
"kind": "scheduled",
"status": "active"
}
],
"nextCursor": null
}