Retrieve the diagnostic representation of a run, including its workflow snapshot, trace spans, final output, and cost. The returned workflowState snapshot has credential values redacted: OAuth credential references and secret (password) sub-block values are null, while {{VAR}} environment-variable references are preserved so consecutive snapshots stay diffable. Trace spans are stored separately from the log row and are pruned on their own retention schedule: a run whose stored spans have aged out returns traceSpans: [] rather than an error, so an empty array does not mean the run recorded no spans.
/api/v2/logs/{runId}Authorization
apiKey Your Sim API key, personal or workspace-scoped. Generate one from the Sim dashboard under Settings > API Keys. A workspace API key is not accepted everywhere: operations that act on behalf of a specific human — administrative reads, secret access, and irreversible or governance-affecting writes — always reject it, whatever role the key carries. Each such operation says so in its own description, and the rejection surfaces as 403 unless the operation conceals unauthorized resources, in which case it is reported as 404. Use a personal API key for those.
In: header
Path Parameters
The unique run identifier shared by lifecycle and diagnostic resources.
1 <= lengthResponse Body
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/logs/string"{
"data": {
"runId": "e4f8d2b6-9a1c-4e3d-8b7f-5c0a2d9e6f13",
"workflowId": "3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36",
"deploymentVersionId": "dep_2c4e6a8b0d1f",
"status": "completed",
"level": "info",
"trigger": "api",
"startedAt": "2026-01-15T10:30:00.000Z",
"endedAt": "2026-01-15T10:30:01.250Z",
"totalDurationMs": 1250,
"files": null,
"workflow": {
"id": "3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36",
"name": "Customer Support Agent",
"description": "Routes incoming support tickets and drafts responses",
"folderPath": "/",
"ownerEmail": "jane@example.com",
"workspaceId": "a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64",
"createdAt": "2025-01-10T09:00:00.000Z",
"updatedAt": "2025-06-18T16:45:00.000Z",
"deleted": false
},
"workflowState": {
"blocks": {},
"edges": []
},
"traceSpans": [],
"finalOutput": {
"result": "Hello, world!"
},
"cost": {
"total": 0.0032
},
"createdAt": "2026-01-15T10:30:00.000Z"
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "The request is invalid."
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "The request is invalid."
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "The request is invalid."
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "The request is invalid."
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "The request is invalid."
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "The request is invalid."
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "The request is invalid."
}
}