Get run counts, success and error counts, and latency by workspace or workflow. Default bounds span recorded runs, or the last 24 hours when empty. Buckets may extend past the end. Folder filters include descendants; workflowsTruncated affects series, not totals. 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/statsYour 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
Query Parameters
Workspace whose execution statistics to summarize.
1 <= length <= 128Comma-separated workflow identifiers to include. At most 200 entries. An empty entry is rejected.
Comma-separated workflow folder paths, including descendants. Up to 100 paths. Unknown folder paths contribute no matches.
Comma-separated trigger types to include. An empty entry is rejected. The vocabulary is open, so an unrecognized member selects no runs; the literal all disables this filter.
Severity level to include.
"info" | "error"Only include runs started at or after this UTC ISO 8601 timestamp, e.g. 2026-08-06T00:00:00Z. A date without a time, or a timestamp carrying a UTC offset instead of Z, is rejected, as is year 0000, which names no storable instant.
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$date-timeOnly include runs started at or before this UTC ISO 8601 timestamp, e.g. 2026-08-06T00:00:00Z. A date without a time, or a timestamp carrying a UTC offset instead of Z, is rejected, as is year 0000, which names no storable instant.
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$date-timeNumber of time buckets, up to 500. Exactly this many are returned, each at least one minute wide. Short windows extend past the requested end and include empty trailing buckets.
721 <= value <= 500Response 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/stats?workspaceId=string" \ -H "X-API-Key: YOUR_API_KEY"{
"data": {
"workflows": [
{
"workflowId": "3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36",
"workflowName": "Customer Support Agent",
"segments": [
{
"timestamp": "2026-01-15T10:00:00.000Z",
"totalExecutions": 40,
"successfulExecutions": 38,
"avgDurationMs": 1180
}
],
"totalExecutions": 40,
"totalSuccessful": 38,
"overallSuccessRate": 95
}
],
"workflowsTruncated": false,
"aggregateSegments": [
{
"timestamp": "2026-01-15T10:00:00.000Z",
"totalExecutions": 40,
"successfulExecutions": 38,
"avgDurationMs": 1180
}
],
"totalRuns": 40,
"totalErrors": 2,
"avgLatency": 1180,
"timeBounds": {
"start": "2026-01-15T10:00:00.000Z",
"end": "2026-01-15T22:00:00.000Z"
},
"segmentMs": 600000
}
}{
"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"
}
}