Run an Automation
Start an Automation run on demand via the Squadbase API.
https://api.squadbase.dev/v0/automation/{projectId}/{automationName}/triggerStarts a new run of an Automation. Returns 201 Created as soon as the run is accepted; the Automation then runs in the background. If it has notify steps, the results are delivered just like a scheduled run.
Request headers
Prop
Type
Required
Use an Idempotency-Key to safely retry after a network error. Reuse the same key for retries of the same request, and a new key for a genuinely new run.
Path parameters
Prop
Type
Required
Request body
application/json. Send an empty object {}.
Prop
Type
Required
Response — 201 Created
Returns an execution object. Save the executionId to poll for status and fetch the result.
{
"executionId": "uuid",
"projectId": "uuid",
"automationName": "daily-sales-alert",
"status": "RUNNING",
"title": null,
"message": null,
"startedAt": "ISO8601",
"completedAt": null,
"createdAt": "ISO8601"
}Example
curl -X POST 'https://api.squadbase.dev/v0/automation/<PROJECT_ID>/<AUTOMATION_NAME>/trigger' \
-H 'x-api-key: <YOUR_API_KEY>' \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: <UNIQUE_KEY>' \
-d '{}'Returns 422 (runAlreadyActive) if the same Automation is already running, 429 if the rate limit is exceeded, and 402 if your AI credit balance is 0. See Errors.