---
title: "Get stats for an automation"
method: GET
path: "/v1/projectId/{projectId}/automations/{id}/stats"
tags: ["Automations"]
---

# Get stats for an automation

`GET /v1/projectId/{projectId}/automations/{id}/stats`

## Request

- Base URL: `https://api.bluefox.email`
- URL: `https://api.bluefox.email/v1/projectId/{projectId}/automations/{id}/stats`
- Auth: HTTP bearer

How many contacts have gone through it (active/completed/errored) plus opens/clicks/sends/bounces/complaints for each of its emails and summed across them. The optional from/to range only applies to the email stats.

## Path parameters

- `projectId` string, required
- `id` string, required

## Query parameters

- `from` string, date-time
- `to` string, date-time

## Response `200`

OK

- object
  - `status` integer
  - `result` AutomationStats: Contact counts for the automation (all-time, the from/to range does not apply to them) plus email stats summed across all of its emails and broken down per email.
    - `contacts` object
      - `total` integer: Every run ever started, including completed/errored ones.
      - `active` integer: Currently running or paused (waiting at a timer). See GET .../running-nodes for which step they are at.
      - `completed` integer
      - `error` integer
    - `totals` EmailStats: Aggregate counts for a single campaign/transactional/triggered email, optionally within a from/to date range.
      - `opens` integer: Total open events (a single recipient opening twice counts twice).
      - `clicks` integer: Total click events.
      - `uniqueOpens` integer: Number of distinct dispatched emails with at least one open.
      - `uniqueClicks` integer: Number of distinct dispatched emails with at least one click.
      - `sent` integer
      - `failed` integer
      - `bounce` integer
      - `complaint` integer
    - `emails` object[]
      - `emailId` string: Matches the emailId on the send-email/notify node that sends it.
      - `subject` string
      - `opens` integer: Total open events (a single recipient opening twice counts twice).
      - `clicks` integer: Total click events.
      - `uniqueOpens` integer: Number of distinct dispatched emails with at least one open.
      - `uniqueClicks` integer: Number of distinct dispatched emails with at least one click.
      - `sent` integer
      - `failed` integer
      - `bounce` integer
      - `complaint` integer

## Other responses

- `400`: Invalid request body or query - every violation found (missing/invalid/unexpected fields) is reported in one response, semicolon-separated, not just the first one hit.
- `403`: Missing or invalid API key
- `404`: Automation not found

---

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