Console Client
Documentation
Dashboard
API

API reference: macros

List the macros you built in the dashboard, run one on an account, stop it, and see what is running.

List macros

GET /macros returns your saved macros. Macros are built and edited in the dashboard: see the macro guide.

{
  "macros": [
    { "id": "9f2c41d8a07b3e65c1d24f80ab93e7d1", "name": "Sell loop", "stepCount": 6, "trigger": "manual", "loopCount": 1 }
  ],
  "limit": 50
}

trigger is manual for a macro you start yourself and event for one that fires on a trigger. limit is how many macros your plan can save.

Run a macro

POST /macros/{macroId}/run starts a saved macro on one account, exactly like the Run button.

FieldTypeDetail
accountIdstringRequired. The account to run it on. The account should be online.
loopCountnumberOptional. 1 to 1000, or -1 to loop until stopped. Defaults to the value saved with the macro.
loopDelayMsnumberOptional. Pause between loops in milliseconds. Defaults to the saved value.
curl -X POST https://dashboard.consoleclient.com/api/v1/macros/9f2c41d8a07b3e65c1d24f80ab93e7d1/run \
  -H "Authorization: Bearer $CC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"accountId": "[email protected]", "loopCount": 3}'
{ "ok": true, "runId": "a1b2c3d4e5f60718293a4b5c" }

Keep the runId if you want to stop this exact run later. Running the same macro again on the same account restarts it instead of stacking a second copy, and a run carries on across a reconnect until it finishes or you stop it, the same as in the dashboard.

ErrorHTTPMeaning
macro_not_found404No saved macro with that ID.
invalid_account400accountId is missing.
not_assigned404The account is not running on a backend. Connect it first.
event_macro_not_supported400The macro is an event macro. Those are armed per account from the dashboard and fire on their own.
no_steps, invalid_macro400The saved macro is empty or no longer valid. Open it in the dashboard and save it again.

Stop a macro

POST /macros/stop stops macros on one account.

FieldTypeDetail
accountIdstringRequired.
runIdstringOptional. Stops that one run. Leave it out to stop every manual run on the account.
{ "ok": true }

See what is running

GET /macros/active returns the runs in progress and the armed event macros.

{
  "runs": [
    {
      "accountId": "[email protected]",
      "username": "Steve",
      "runId": "a1b2c3d4e5f60718293a4b5c",
      "macroId": "9f2c41d8a07b3e65c1d24f80ab93e7d1",
      "macroName": "Sell loop",
      "loopTotal": 3,
      "loopCurrent": 2,
      "source": "manual",
      "startedAt": 1790000460000,
      "updatedAt": 1790000520000
    }
  ],
  "events": []
}

loopTotal is -1 for an endless loop. A run disappears from runs when it finishes, so polling this endpoint is how you wait for a macro to complete.

Need a hand?

Check the troubleshooting guide or return to all guides.