Get a run's workflow graph, trace spans, final output, and cost. Trace spans expire separately, so an empty traceSpans array does not prove none were recorded. Expired runs are permanently deleted. Retention is 30 days from run start on Free, unlimited on Pro and Team, and configured per organization on Enterprise with workspace overrides. Workspace folder trees exceeding 10,000 folders return 413.
OAuth scope: api:read.
/api/v2/logs/{runId}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 run identifier.
^[A-Za-z0-9._:-]+$1 <= length <= 128Response 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/logs/string" \ -H "X-API-Key: YOUR_API_KEY"{
"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,
"executedByEmail": "billing@example.com",
"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,
"items": [
{
"category": "fixed",
"description": "Base execution charge",
"cost": 0.001
},
{
"category": "model",
"description": "gpt-5",
"cost": 0.0022,
"inputTokens": 1840,
"outputTokens": 260
}
]
},
"workflowInput": {
"ticketId": "T-4821"
},
"createdAt": "2026-01-15T10:30:00.000Z"
}
}{
"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": "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"
}
}