Get Execution Status

Poll the status of an Automation run via the Squadbase API.

GEThttps://api.squadbase.dev/v0/automation/{projectId}/{automationName}/executions/{executionId}

Returns the current state of a run started with Run an Automation. Poll this endpoint until status reaches a final state (COMPLETED, FAILED, TIMED_OUT, or CANCELLED), then fetch the result.

Request headers

Prop

Type

Required

Path parameters

Prop

Type

Required

Response — 200 OK

Returns an execution object. Once the run finishes, it includes the total AI credits used (creditsCharged).

{
  "executionId": "uuid",
  "projectId": "uuid",
  "automationName": "daily-sales-alert",
  "status": "COMPLETED",
  "title": null,
  "message": null,
  "startedAt": "ISO8601",
  "completedAt": "ISO8601",
  "createdAt": "ISO8601",
  "creditsCharged": 0.42
}

Example

curl 'https://api.squadbase.dev/v0/automation/<PROJECT_ID>/<AUTOMATION_NAME>/executions/<EXECUTION_ID>' \
  -H 'x-api-key: <YOUR_API_KEY>'

Returns 422 if the executionId does not exist or does not belong to the Automation in the path. See Errors.