close

Get Workflow Run

Get current workflow run state, optionally including final and block outputs.

GET/api/v2/workflows/{id}/runs/{runId}
X-API-Key<token>

Your Sim API key, personal or workspace-scoped. Generate one under Settings, then API Keys. Operations that reject workspace keys say so in their own description.

In: header

Path Parameters

id*string

Unique workflow identifier.

Length1 <= length
runId*string

Unique workflow run identifier.

Match^[A-Za-z0-9._:-]+$
Length1 <= length <= 128

Query Parameters

includeOutput?boolean

Include the final workflow output when true. It does not gate blockOutputs, which selectedOutputs selects on its own.

selectedOutputs?string

Comma-separated block output references to include, as blockId or blockId.path. Block names are not resolved here — unlike the execute request, this resource reads a recorded run and matches ids only, so a name selects nothing and yields an empty blockOutputs.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://www.sim.ai/api/v2/workflows/string/runs/run_8f14e45f-ceea-467f-a" \  -H "X-API-Key: YOUR_API_KEY"
{
  "data": {
    "runId": "run_8f14e45f-ceea-467f-a",
    "workflowId": "3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36",
    "status": "completed",
    "trigger": "api",
    "startedAt": "2026-08-09T18:04:10.000Z",
    "endedAt": "2026-08-09T18:04:11.000Z",
    "durationMs": 1000,
    "paused": null,
    "cost": {
      "total": 12
    },
    "error": null,
    "output": {
      "result": "Ticket routed to Support"
    },
    "blockOutputs": null
  }
}
{
  "error": {
    "code": "BAD_REQUEST",
    "message": "Invalid request"
  }
}
{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "API key required"
  }
}
{
  "error": {
    "code": "FORBIDDEN",
    "message": "Insufficient workspace permissions",
    "details": {
      "code": "INSUFFICIENT_WORKSPACE_ROLE"
    }
  }
}
{
  "error": {
    "code": "NOT_FOUND",
    "message": "Not found"
  }
}
{
  "error": {
    "code": "CONFLICT",
    "message": "Webhook path already in use"
  }
}
{
  "error": {
    "code": "RATE_LIMITED",
    "message": "API rate limit exceeded",
    "details": {
      "retryAfter": "2026-01-01T00:00:30.000Z"
    }
  }
}
{
  "error": {
    "code": "INTERNAL_ERROR",
    "message": "Internal server error"
  }
}
{
  "error": {
    "code": "SERVICE_UNAVAILABLE",
    "message": "Service temporarily unavailable"
  }
}