Skip to content

Automation statistics per automation

GET
https://api.getsitecontrol.com/v1/sites/{site_id}/automations/stats/by-automation
curl --request GET \
--url https://api.getsitecontrol.com/v1/sites/1/automations/stats/by-automation \
--header 'Authorization: Bearer <token>'

E-mails and runs per automation. Call it to compare automations or to read the numbers of several at once.

With automation_ids (up to 100, ids from list_automations): every listed live automation of the site in the order given, zeros without activity; repeated ids count once, unknown, deleted and foreign ids and follow-ups of widgets are left out. The period is optional here: without from and to the numbers cover the whole life, and period is null.

Without automation_ids the period is required: up to 100 live automations with activity in the period, by the sum of runs, then by send, most first. Deleted automations and follow-ups of widgets are left out, so the sum may be below the total of get_automations_stats.

is_active, trigger_type, widget_id, search, created_since and folder_id narrow either way to the automations that match every one given, and then every matched automation is listed, zero ones too: one call gives the numbers of a folder or of the active automations. total and runs are the sums of the listed automations; use them rather than adding the items up.

E-mails of an automation are those sent by its steps; double opt-in confirmations are counted only in the site total.

rates next to each total gives the delivery, open, click, click-to-open, unsubscribe, complaint and bounce rates of the e-mails, rounded to 4 places; a rate is null when its denominator is 0, as it is undefined, not zero.

FieldDescription
site_id
required
Site Id
integer
FieldDescription
automation_ids
Automation Ids

Automation ids from list_automations; repeat for several, up to 100

Array<integer>
<= 100 items

Automation ids from list_automations; repeat for several, up to 100

from
From

UTC day, included; omit for the whole life

string format: date

UTC day, included; omit for the whole life

to
To

UTC day, included; with from, today when omitted

string format: date

UTC day, included; with from, today when omitted

is_active
Is Active

True: only automations that are on; false: off

boolean

True: only automations that are on; false: off

trigger_type

Only automations started by any of these trigger types; repeat for several

Array<string>
Allowed values: widget_submit manual email_click webhook segment_join shopify_order_paid shopify_order_fulfilled shopify_checkout_abandoned shopify_customer_winback shopify_customer_subscribed other

Only automations started by any of these trigger types; repeat for several

widget_id
Widget Id

Only automations started by a form submit of this widget; widget id from list_widgets

integer

Only automations started by a form submit of this widget; widget id from list_widgets

search
Search

Part of the name, case ignored, or the exact id

string
>= 1 characters <= 255 characters

Part of the name, case ignored, or the exact id

created_since
Created Since

Only automations created at or after this moment; without an offset, taken as UTC; a plain date means its start

string format: date-time

Only automations created at or after this moment; without an offset, taken as UTC; a plain date means its start

folder_id
Folder Id

Only the items of this folder, an id from list_folders; 0 is General

integer

Only the items of this folder, an id from list_folders; 0 is General

Successful Response

Media typeapplication/json
AutomationStatsBreakdown
object
FieldDescription
period
Period

Null when the numbers cover the whole life of the automations

object
FieldDescription
date_from
required
Date From

First day, UTC, included

string format: date
date_to
required
Date To

Last day, UTC, included

string format: date
matched
Matched

How many live automations the filters or ids matched; null without them. 0 means nothing matched, not that nothing happened: check the filters or ids

integer
nullable
total
required
Total

The e-mail counters of the listed automations summed: the numbers of the set, use them rather than adding the items up

object
FieldDescription
send
required
Send
integer
deliver
required
Deliver
integer
bounce
required
Bounce
integer
open
required
Open
integer
click
required
Click
integer
unsubscribe
required
Unsubscribe
integer
complaint
required
Complaint
integer
rates
required
Rates

Rates computed from total, so the open rate is rates.open; every key is always present, null when its denominator is 0

object
FieldDescription
deliver
Deliver

Delivery rate: deliver / send; null when send is 0: the rate is undefined, not zero

number
nullable
open
Open

Open rate: open / deliver; null when deliver is 0: the rate is undefined, not zero

number
nullable
click
Click

Click rate: click / deliver; null when deliver is 0: the rate is undefined, not zero

number
nullable
click_to_open
Click To Open

Click-to-open rate: click / open; null when open is 0: the rate is undefined, not zero. A click is counted without an open when the recipient’s mail app does not load images, so it can exceed 1

number
nullable
unsubscribe
Unsubscribe

Unsubscribe rate: unsubscribe / deliver; null when deliver is 0: the rate is undefined, not zero

number
nullable
complaint
Complaint

Spam complaint rate: complaint / deliver; null when deliver is 0: the rate is undefined, not zero

number
nullable
bounce
Bounce

Bounce rate: bounce / send; null when send is 0: the rate is undefined, not zero

number
nullable
runs
required
Runs

The runs of the listed automations summed

object
FieldDescription
queued
required
Queued

Waiting to start; a bulk start counts only once it is split into runs

integer
ongoing
required
Ongoing

Running, waiting in a delay step or on hold

integer
done
required
Done

Finished

integer
ineligible
required
Ineligible

Finished by being skipped

integer
failed
required
Failed

Finished with an error, or failed before the start. A failure followed by a new run of the contact through the API is not counted

integer
items
required
Items
Array<object>
AutomationStatsBreakdownItem
object
FieldDescription
id
required
Id

Automation id

integer
name
Name
string
nullable
total
required
Total

E-mails sent by the steps of the automation

object
FieldDescription
send
required
Send
integer
deliver
required
Deliver
integer
bounce
required
Bounce
integer
open
required
Open
integer
click
required
Click
integer
unsubscribe
required
Unsubscribe
integer
complaint
required
Complaint
integer
rates
required
Rates

Rates computed from total, so the open rate is rates.open; every key is always present, null when its denominator is 0

object
FieldDescription
deliver
Deliver

Delivery rate: deliver / send; null when send is 0: the rate is undefined, not zero

number
nullable
open
Open

Open rate: open / deliver; null when deliver is 0: the rate is undefined, not zero

number
nullable
click
Click

Click rate: click / deliver; null when deliver is 0: the rate is undefined, not zero

number
nullable
click_to_open
Click To Open

Click-to-open rate: click / open; null when open is 0: the rate is undefined, not zero. A click is counted without an open when the recipient’s mail app does not load images, so it can exceed 1

number
nullable
unsubscribe
Unsubscribe

Unsubscribe rate: unsubscribe / deliver; null when deliver is 0: the rate is undefined, not zero

number
nullable
complaint
Complaint

Spam complaint rate: complaint / deliver; null when deliver is 0: the rate is undefined, not zero

number
nullable
bounce
Bounce

Bounce rate: bounce / send; null when send is 0: the rate is undefined, not zero

number
nullable
runs
required
AutomationRunMetrics

Runs started in the period, each counted once by its current status.

object
FieldDescription
queued
required
Queued

Waiting to start; a bulk start counts only once it is split into runs

integer
ongoing
required
Ongoing

Running, waiting in a delay step or on hold

integer
done
required
Done

Finished

integer
ineligible
required
Ineligible

Finished by being skipped

integer
failed
required
Failed

Finished with an error, or failed before the start. A failure followed by a new run of the contact through the API is not counted

integer

Example · Generated

{
"period": {
"date_from": "2026-04-15",
"date_to": "2026-04-15"
},
"matched": 1,
"total": {
"send": 1,
"deliver": 1,
"bounce": 1,
"open": 1,
"click": 1,
"unsubscribe": 1,
"complaint": 1
},
"rates": {
"deliver": 1,
"open": 1,
"click": 1,
"click_to_open": 1,
"unsubscribe": 1,
"complaint": 1,
"bounce": 1
},
"runs": {
"queued": 1,
"ongoing": 1,
"done": 1,
"ineligible": 1,
"failed": 1
},
"items": [
{
"id": 1,
"name": "example",
"total": {
"send": 1,
"deliver": 1,
"bounce": 1,
"open": 1,
"click": 1,
"unsubscribe": 1,
"complaint": 1
},
"rates": {
"deliver": 1,
"open": 1,
"click": 1,
"click_to_open": 1,
"unsubscribe": 1,
"complaint": 1,
"bounce": 1
},
"runs": {
"queued": 1,
"ongoing": 1,
"done": 1,
"ineligible": 1,
"failed": 1
}
}
]
}
FieldDescription
GSC-Version
string

API version the response was produced for

X-Request-Id
string

Request id, echoed from the request when valid

X-RateLimit-Limit
integer

Limit of the tightest bucket

X-RateLimit-Remaining
integer

Requests left in its window

X-RateLimit-Reset
integer

End of its window, epoch seconds

Unsupported GSC-Version

Media typeapplication/problem+json
Problem

The documented shape of every error body on the versioned surface.

object
FieldDescription
type
required
Type
string
title
required
Title
string
status
required
Status
integer
detail
Detail
string
nullable
instance
required
Instance
string
reason
Reason
string
nullable
next
Next
string
nullable
request_id
required
Request Id
string
errors
Errors
Array<object>
nullable
ValidationIssue
object
FieldDescription
loc
required
Loc
Array
msg
required
Msg
string
type
required
Type
string
metadata
Metadata
object

Example · Generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"reason": "example",
"next": "example",
"request_id": "example",
"errors": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
],
"metadata": {}
}
FieldDescription
GSC-Version
string

API version the response was produced for

X-Request-Id
string

Request id, echoed from the request when valid

X-RateLimit-Limit
integer

Limit of the tightest bucket

X-RateLimit-Remaining
integer

Requests left in its window

X-RateLimit-Reset
integer

End of its window, epoch seconds

Missing or invalid API key or access token

Media typeapplication/problem+json
Problem

The documented shape of every error body on the versioned surface.

object
FieldDescription
type
required
Type
string
title
required
Title
string
status
required
Status
integer
detail
Detail
string
nullable
instance
required
Instance
string
reason
Reason
string
nullable
next
Next
string
nullable
request_id
required
Request Id
string
errors
Errors
Array<object>
nullable
ValidationIssue
object
FieldDescription
loc
required
Loc
Array
msg
required
Msg
string
type
required
Type
string
metadata
Metadata
object

Example · Generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"reason": "example",
"next": "example",
"request_id": "example",
"errors": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
],
"metadata": {}
}
FieldDescription
GSC-Version
string

API version the response was produced for

X-Request-Id
string

Request id, echoed from the request when valid

X-RateLimit-Limit
integer

Limit of the tightest bucket

X-RateLimit-Remaining
integer

Requests left in its window

X-RateLimit-Reset
integer

End of its window, epoch seconds

WWW-Authenticate
string

Authentication scheme: Bearer

Access denied

Media typeapplication/problem+json
Problem

The documented shape of every error body on the versioned surface.

object
FieldDescription
type
required
Type
string
title
required
Title
string
status
required
Status
integer
detail
Detail
string
nullable
instance
required
Instance
string
reason
Reason
string
nullable
next
Next
string
nullable
request_id
required
Request Id
string
errors
Errors
Array<object>
nullable
ValidationIssue
object
FieldDescription
loc
required
Loc
Array
msg
required
Msg
string
type
required
Type
string
metadata
Metadata
object

Example · Generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"reason": "example",
"next": "example",
"request_id": "example",
"errors": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
],
"metadata": {}
}
FieldDescription
GSC-Version
string

API version the response was produced for

X-Request-Id
string

Request id, echoed from the request when valid

X-RateLimit-Limit
integer

Limit of the tightest bucket

X-RateLimit-Remaining
integer

Requests left in its window

X-RateLimit-Reset
integer

End of its window, epoch seconds

Not found

Media typeapplication/problem+json
Problem

The documented shape of every error body on the versioned surface.

object
FieldDescription
type
required
Type
string
title
required
Title
string
status
required
Status
integer
detail
Detail
string
nullable
instance
required
Instance
string
reason
Reason
string
nullable
next
Next
string
nullable
request_id
required
Request Id
string
errors
Errors
Array<object>
nullable
ValidationIssue
object
FieldDescription
loc
required
Loc
Array
msg
required
Msg
string
type
required
Type
string
metadata
Metadata
object

Example · Generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"reason": "example",
"next": "example",
"request_id": "example",
"errors": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
],
"metadata": {}
}
FieldDescription
GSC-Version
string

API version the response was produced for

X-Request-Id
string

Request id, echoed from the request when valid

X-RateLimit-Limit
integer

Limit of the tightest bucket

X-RateLimit-Remaining
integer

Requests left in its window

X-RateLimit-Reset
integer

End of its window, epoch seconds

Validation failed

Media typeapplication/problem+json
Problem

The documented shape of every error body on the versioned surface.

object
FieldDescription
type
required
Type
string
title
required
Title
string
status
required
Status
integer
detail
Detail
string
nullable
instance
required
Instance
string
reason
Reason
string
nullable
next
Next
string
nullable
request_id
required
Request Id
string
errors
Errors
Array<object>
nullable
ValidationIssue
object
FieldDescription
loc
required
Loc
Array
msg
required
Msg
string
type
required
Type
string
metadata
Metadata
object

Example · Generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"reason": "example",
"next": "example",
"request_id": "example",
"errors": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
],
"metadata": {}
}
FieldDescription
GSC-Version
string

API version the response was produced for

X-Request-Id
string

Request id, echoed from the request when valid

X-RateLimit-Limit
integer

Limit of the tightest bucket

X-RateLimit-Remaining
integer

Requests left in its window

X-RateLimit-Reset
integer

End of its window, epoch seconds

Rate limited

Media typeapplication/problem+json
Problem

The documented shape of every error body on the versioned surface.

object
FieldDescription
type
required
Type
string
title
required
Title
string
status
required
Status
integer
detail
Detail
string
nullable
instance
required
Instance
string
reason
Reason
string
nullable
next
Next
string
nullable
request_id
required
Request Id
string
errors
Errors
Array<object>
nullable
ValidationIssue
object
FieldDescription
loc
required
Loc
Array
msg
required
Msg
string
type
required
Type
string
metadata
Metadata
object

Example · Generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"reason": "example",
"next": "example",
"request_id": "example",
"errors": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
],
"metadata": {}
}
FieldDescription
GSC-Version
string

API version the response was produced for

X-Request-Id
string

Request id, echoed from the request when valid

X-RateLimit-Limit
integer

Limit of the tightest bucket

X-RateLimit-Remaining
integer

Requests left in its window

X-RateLimit-Reset
integer

End of its window, epoch seconds

Retry-After
integer

Seconds until the bucket refills

Media typeapplication/problem+json

temporarily_unavailable: the statistics took longer than 25 seconds or rate limits cannot be enforced; narrow the period or retry later. The heavy request is spent all the same

Problem

The documented shape of every error body on the versioned surface.

object
FieldDescription
type
required
Type
string
title
required
Title
string
status
required
Status
integer
detail
Detail
string
nullable
instance
required
Instance
string
reason
Reason
string
nullable
next
Next
string
nullable
request_id
required
Request Id
string
errors
Errors
Array<object>
nullable
ValidationIssue
object
FieldDescription
loc
required
Loc
Array
msg
required
Msg
string
type
required
Type
string
metadata
Metadata
object

Example · Generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"reason": "example",
"next": "example",
"request_id": "example",
"errors": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
],
"metadata": {}
}
FieldDescription
GSC-Version
string

API version the response was produced for

X-Request-Id
string

Request id, echoed from the request when valid

X-RateLimit-Limit
integer

Limit of the tightest bucket

X-RateLimit-Remaining
integer

Requests left in its window

X-RateLimit-Reset
integer

End of its window, epoch seconds