---
title: "Retrieve workflow statistics"
method: GET
path: "/api/v1/workflows/{id}/stats"
tags: ["Workflows"]
---

# Retrieve workflow statistics

`GET /api/v1/workflows/{id}/stats`

## Request

- Base URL: `https://api.sendly.now`
- URL: `https://api.sendly.now/api/v1/workflows/{id}/stats`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `better-auth.session_token`
  - OAuth 2 (authorization code, authorization URL `https://app.sendly.now/api/auth/oauth2/authorize`, token URL `https://app.sendly.now/api/auth/oauth2/token`, scopes: `workflows:read`)

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.

## Path parameters

- `id` string, uuid, required: Workflow id.

## Query parameters

- `from` string, date-time, nullable: Only count executions started at or after this instant (ISO 8601). Defaults to all time.

## Response `200`

Workflow statistics

- WorkflowStatsV1: Execution, email and conversion totals for one workflow.
  - `avg_duration_ms` number, nullable, required
  - `by_status` object, required: Execution counts keyed by status; a status with no executions is absent.
  - `completion_rate` number, nullable, required: Completed ÷ finished executions (0–1). Null until at least one execution has finished.
  - `conversions` object[], required
    - `count` integer, required
    - `event_name` string, required
    - `goal_id` string, uuid, required
    - `name` string, required
  - `emails` object, required
    - `clicked` integer, required
    - `opened` integer, required
    - `sent` integer, required
  - `enabled` boolean, required
  - `name` string, required
  - `step_count` integer, required: Steps in the workflow's graph, trigger step included.
  - `total` integer, required
  - `trigger_type` 'EVENT' | 'MANUAL' | 'SCHEDULE', required: What starts a workflow. `EVENT`: a custom event you record. `MANUAL`: only an explicit API call. `SCHEDULE`: a fixed repeating interval.
  - `workflow_id` string, uuid, required

## Other responses

- `401`: `invalid_api_key` or `invalid_session` — missing or invalid credentials.
- `403`: `scope_missing`, `project_access_denied`, or `project_disabled`.
- `404`: `resource_not_found` — no workflow with this id belongs to the authenticated project.
- `422`: `validation_error` — query, path, or body parameters did not match the schema.
- `429`: `rate_limited` — see `Retry-After` and the `RateLimit` headers.
- `500`: `internal_error`.

---

[API](https://skmtc.dev/sendly/apis/sendly-api.md) · [All operations](https://skmtc.dev/sendly/apis/sendly-api/llms.txt) · [OpenAPI document](https://skmtc.dev/sendly/apis/sendly-api/revisions/ce7cfb7f7c7e?raw)
