Get Workflow Run

Get current run state with optional final and block outputs. With includeOutput, files includes download paths; includeFileBase64 inlines file bytes and returns 413 with the download path when one file or the total exceeds 16 MiB. HEAD checks access with the same authorization as GET but skips side effects, returning an empty 200 without payload headers on success.

OAuth scope: api:read.

GET/api/v2/workflows/{workflowId}/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

workflowId*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 selector that is not headed by a block id answers 400 instead of an empty blockOutputs.

includeFileBase64?boolean

Inline each produced file's bytes as base64. Requires includeOutput. A file above the inline ceiling answers 413 naming its download path; fetch large files from downloadPath instead.

base64MaxBytes?integer

Per-file inline ceiling, lowering but never raising the server limit of 16 MiB.

Range1 <= value <= 16777216

Response Body

application/json

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,
    "files": [
      {
        "id": "file_1a2b3c",
        "name": "summary.pdf",
        "size": 20480,
        "type": "application/pdf",
        "downloadPath": "/api/v2/workflows/3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36/runs/run_8f14e45f-ceea-467f-a/files/file_1a2b3c",
        "base64": null
      }
    ]
  }
}
{
  "error": {
    "code": "BAD_REQUEST",
    "message": "Invalid request"
  }
}
{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Authentication 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": "PAYLOAD_TOO_LARGE",
    "message": "Request body is too large"
  }
}
{
  "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"
  }
}