Download Workflow Run File
Download one file a run produced. The run resource reports the files a run emitted; address one of them by its id here. Run output carries /api/files/serve/... URLs that reject API keys, so this is the byte path out of a run for an API-key caller. Execution objects are not retained indefinitely, so a 404 for a file an older run produced is expected rather than a fault. Runs are hard-deleted once they pass the payer's log retention window, so an older run is simply absent rather than reported as removed. The window is 30 days from run start on the free plan, unbounded on Pro and Team, and set per organization on Enterprise with an optional per-workspace override. Downloading records an audit event, so it is not a safe read. A HEAD skips the effect but is authorized exactly as the GET is, so it answers 400, 401, 403, or 404 wherever the GET would and an empty 200 otherwise. Skipping the effect means skipping the read that produces the payload, so that 200 carries none of the response headers documented below — it answers whether the GET would be allowed, not what the GET would return. In particular a HEAD does not report Content-Length, so it cannot be used to size a download in advance; read the size from the file resource instead.
/api/v2/workflows/{workflowId}/runs/{runId}/files/{fileId}Authorization
apiKey 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
Unique workflow identifier.
1 <= lengthUnique workflow run identifier.
^[A-Za-z0-9._:-]+$1 <= length <= 128Identifier of a file the run produced, as reported by the run resource.
1 <= length <= 256Response Body
application/octet-stream
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/files/string" \ -H "X-API-Key: YOUR_API_KEY""string"{
"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"
}
}