Skip to main content

create_automation

Create an automation: a trigger (a cron schedule or a run event) plus an action (run a suite of features, or run a load test). For schedule triggers the next fire time is computed from the cron immediately.

Request​

POST /api/v1/ops/projects/{project}/automations
ParameterInTypeRequiredDescription
projectpathstringyesThe project's public id.
namebodystringyesA name for the automation.
enabledbodybooleannoWhether it is active (default true).
triggerbodyobjectyes{ type: "schedule", cron, tz? } or { type: "event", kind?, filter? }.
actionbodyobjectyes{ type: "run_features", featureIds?, configName?, siteUrl? } or { type: "run_load", featureId, siteUrl? }.
conditionbodyobjectnoOptional gate, e.g. { "status": "failed" } (event triggers).
info

A run_features action with no featureIds runs every feature with status generated — the whole runnable suite. The cron accepts 5-field (minute) or 6-field (with seconds) expressions; tz is an IANA timezone id (default UTC) so wall-clock schedules follow DST.

curl -X POST -H "Authorization: Bearer $TESTVIBE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Nightly smoke suite",
"trigger": { "type": "schedule", "cron": "0 8 * * *", "tz": "America/New_York" },
"action": { "type": "run_features", "featureIds": [12, 15] }
}' \
"$TESTVIBE_SERVER/api/v1/ops/projects/$PROJECT/automations"

Response​

201 Created — the created automation object.

Errors​

HTTPWhen
400 invalid_requestMissing name/trigger/action, an unknown trigger.type/action.type, a missing/invalid cron on a schedule trigger, or a missing featureId on a run_load action.
404 not_foundNo such project in this workspace.

REST also supports action.type: "run_assistant" with required prompt and optional notifyEmail, and "create_issue" with required positive connectionId, optional issueTarget, issueType, and dedupeIssues (default true). The current CLI/MCP authoring wrappers expose the run-features/run-load subset, not these extra fields.

For run_features, action.analyzeOnFailure: true opts into metered Assistant triage after a failed run (default false). MCP uses analyzeOnFailure; CLI accepts --analyze-on-failure with the action definition.