API reference
Automation test runs
Test runs of an automation (the editor's Test Run: every step runs for real, from a trigger or from one step), what a run was charged, and the run count, last run and its status of many automations at once. 3 endpoints. Add your API key in the authentication panel to send test requests from this page.
Start a test run of an automation
/api/external/v1/automations/{automationId}/simulateStarts a test run of the saved automation - the editor's Test Run - and answers it at once (202) with status RUNNING; follow it with GET /automations/runs/{runId} (its runType is TEST).
Side effects: it is not a dry run. Every step runs for real - an email is sent, an HTTP request is made, a call is placed - except steps whose pinned output is on, which answer with it. It is billed for what its steps use, as the editor's test runs are. It is not queued and does not count among the plan's automation runs a day; an account whose balance blocks usage is refused. A switched-off automation can be tested. A test run cannot be stopped once started (the app has no way to stop an automation run either); a step's own timeout ends it.
Body (all optional): input (an object: its top-level fields become the run's variables, as for a started run), mode - ENTIRE (default: from a trigger through the whole graph), UP_TO (from a trigger that reaches targetNodeId, stopping after it), SELECTED (only targetNodeId), FROM_SELECTED (from targetNodeId on); for SELECTED and FROM_SELECTED, input may carry automation.outputs from an earlier run so the step reads what came before - targetNodeId (required for UP_TO, SELECTED, FROM_SELECTED), triggerNodeId (the trigger to start from when there are several).
Errors: 404 AUTOMATION_NOT_FOUND; 400 INVALID_INPUT, INVALID_MODE, MISSING_FIELD, NODE_NOT_FOUND (no node with that id, or triggerNodeId is not a trigger); 409 NO_TRIGGER (the graph has no trigger to start from), RUN_REFUSED (the balance blocks usage, or processing is on hold: the message says which), AUTOMATION_DISABLED (only for the platform's own AI routes), PLAN_LIMIT_REACHED (the plan's automation runs of the day are used: test runs wait for tomorrow too); 429 TEST_RUN_LIMIT (at most 200 test runs a day through the API: they run every step for real but are not counted among the plan's runs); 503 UNAVAILABLE (the server is too busy to start it now).
Parameters
automationIdstring (uuid)pathRequired
Request body application/json
object
Responses
200OK
Summarize runs of many automations
/api/external/v1/automations/run-summariesFor each of the automations you name: automationId, runCount, lastRunAt and lastRunStatus (PENDING, RUNNING, WAITING_FOR_CALLBACK, COMPLETED, FAILED), over the runs you may see - the counts the app's automation list shows. Ids that are not automations of yours are left out.
Body: ids (a list of automation ids, at most 500). Errors: 400 INVALID_ID, TOO_MANY_IDS.
Request body application/json
object
Responses
200OK
Read what an automation run was charged
/api/external/v1/automations/runs/{runId}/costWhat the run was charged, in credits: total, settled (taken from the balance), pending (still to be taken) and lines, one per charge row (chargeType - RUN, LLM_CALL, MEDIA_ASSET, PLATFORM_VIDEO_SECONDS, PLATFORM_IMAGES, BROWSER_SECONDS, DECISION_CALL - units, pricePerUnit, cost, settled, createdAt), with note when there are none (a run is charged when it finishes; one whose run fee was waived and that used nothing metered has none). Test runs too. Only the account's charges: not what the run cost the platform.
Errors: 404 RUN_NOT_FOUND when it is not a run of yours.
Parameters
runIdstring (uuid)pathRequired
Responses
200OK