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

POST/v1/automation-rules

Works 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

namestringrequired

Label.

statusstring

active or paused.

triggerobjectrequired

{ type: "post.failed", filter } or { type: "schedule", every: "1h" }.

subjectsobject

Scheduled and ad rules: what each check looks at.

filterobject

Fact comparisons ({ all: [...] }, { any: [...] }).

conditionsobject

Ad rules: metric comparisons over a window.

stepsobject[]required

notify.send, ads.boost_post, ads.pause, ads.change_budget, approval.request...

limitsobject

cooldown, 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
    }
  }'
Response 201
{
  "automation": {
    "id": "obj_Hq3Lw9Xe2Rt7Yu1Io5Pa8Sd4Fg6Jk0Zx3Cv7Bn1Mq2",
    "name": "Boost winners",
    "kind": "scheduled",
    "status": "active"
  }
}

List rules

GET/v1/automation-rules

Works 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

accountIdstring

Only rules on this account.

limitinteger

Page size.

cursorstring

nextCursor from the previous page.

curl "https://creatoros-production-5658.up.railway.app/v1/automation-rules" \
  -H "Authorization: Bearer $CREATOROS_API_KEY"
Response 200
{
  "automations": [
    {
      "id": "obj_Hq3Lw9Xe2Rt7Yu1Io5Pa8Sd4Fg6Jk0Zx3Cv7Bn1Mq2",
      "name": "Boost winners",
      "kind": "scheduled",
      "status": "active"
    }
  ],
  "nextCursor": null
}