Retrieve workflow statistics
Execution counts by status, average completion time, the emails this workflow sent (with opens and clicks), and per-goal conversion counts. All-time by default — pass from to narrow it. Unlike /api/v1/analytics/* there is no 90-day ceiling here, because every aggregate is already confined to this one workflow.
The workflow's own name, enabled, trigger_type and step_count travel with the counts, because the counts alone are ambiguous: no running executions means one thing on an enabled workflow and another on a paused one.
Requires the workflows:read scope — View your automation workflows and their runs.
API key authentication. Use a sk_* (FULL) or pk_* (SENDING_ONLY) key as the bearer token. Public keys (pk_*) are restricted to the email-send endpoints and the self-serve list subscribe/unsubscribe pair; every other endpoint — event tracking included — answers 403 for them. In scope terms (used by /api/v1/* operations): FULL keys hold every scope; SENDING_ONLY keys hold only emails:send.
In: header
Path Parameters
Workflow id.
Query Parameters
Only count executions started at or after this instant (ISO 8601). Defaults to all time.
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X GET "https://example.com/api/v1/workflows/497f6eca-6276-4993-bfeb-53cbbbba6f08/stats"{
"workflow_id": "03e70e31-d7a4-4401-a629-6a4b6096cdfe",
"name": "string",
"enabled": true,
"trigger_type": "EVENT",
"step_count": 0,
"total": 0,
"by_status": {
"property1": 0,
"property2": 0
},
"completion_rate": 0,
"avg_duration_ms": 0,
"emails": {
"sent": 0,
"opened": 0,
"clicked": 0
},
"conversions": [
{
"goal_id": "3854d9ad-4bca-4a70-a63e-7c6bc2f12aee",
"name": "string",
"event_name": "string",
"count": 0
}
]
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"code": "string",
"request_id": "string",
"errors": [
{
"pointer": "string",
"code": "string",
"message": "string"
}
]
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"code": "string",
"request_id": "string",
"errors": [
{
"pointer": "string",
"code": "string",
"message": "string"
}
]
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"code": "string",
"request_id": "string",
"errors": [
{
"pointer": "string",
"code": "string",
"message": "string"
}
]
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"code": "string",
"request_id": "string",
"errors": [
{
"pointer": "string",
"code": "string",
"message": "string"
}
]
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"code": "string",
"request_id": "string",
"errors": [
{
"pointer": "string",
"code": "string",
"message": "string"
}
]
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"code": "string",
"request_id": "string",
"errors": [
{
"pointer": "string",
"code": "string",
"message": "string"
}
]
}