SnozeDevelopers
API referenceAutomations

Test-run an automation without enabling it

Queues a run against the draft version when one exists and the published version otherwise, ignoring the enabled flag so an automation can be exercised before it goes live. Requires the `automations:write` permission plus edit access; an automation with no version yet is rejected with a run error. Send an `Idempotency-Key` header to make retries safe; a replay within the window returns the original response.

POST
/v1/workspaces/{workspaceId}/automations/{automationId}/test-run

Authorization

apiKey
headerAuthorizationBearer <snoze_sk_…>

Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write.

Path Parameters

workspaceId*string
automationId*string

Request Body

application/json
  1. body
triggerPayload?|null

Response Body

Success

application/json
  1. response
data*
Example Request
curl -X POST 'https://api.snoze.dev/v1/workspaces/string/automations/string/test-run' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "data": {    "id": "string",    "automationId": "string",    "automationVersionId": "string",    "workspaceId": "string",    "status": "queued",    "source": "manual",    "startedAt": "string",    "completedAt": "string",    "triggerPayload": {},    "output": {},    "error": "string",    "metadata": {},    "startNodeId": "string",    "replayOfRunId": "string",    "nodeRuns": [      {        "id": "string",        "runId": "string",        "nodeId": "string",        "nodeKind": "string",        "scopeKey": "string",        "status": "queued",        "attempt": 0,        "input": {},        "output": {},        "error": "string",        "startedAt": "string",        "completedAt": "string"      }    ]  }}