API reference · Automations
Retrieve automation stats
https://api.pidgely.com/automations/{id}/statsCounters per step and per UTC day over the last days (default 30): enrolled, sent, unique opens and clicks, exits by goal, conversions and recovered revenue in minor units of the store currency. An order is credited once, to the last automation e-mail its buyer received within the attribution window; for unpaid Pix/boleto the payment of that order counts.
Counters per step and per UTC day over the last days (1-365, default 30): enrolled, sent, unique opens and clicks, exits by goal and recovered revenue (orders by an enrolled customer within the attribution window after an automation e-mail, or Pix/boleto payments, each counted once). Needs a plan with automations (Scale or custom; 403 plan_required otherwise).
Authorization: Bearer pdg_…. An API key with full_access. A sending_access key gets 401 restricted_api_key.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id |
string | Yes | Automation id. UUID. |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
days |
integer | No | Between 1 and 365. |
Request
This endpoint is not in the SDKs yet; call it over HTTP.
curl -X GET 'https://api.pidgely.com/automations/0199e1a0-2b4c-7d6e-8f01-2a3b4c5d6e7f/stats?days=30' \
-H "Authorization: Bearer $PIDGELY_API_KEY"Response
200 OK
{
"object": "automation_stats",
"days": 30,
"currency": "BRL",
"totals": {
"enrolled": 412,
"active": 57,
"sent": 374,
"skipped": 2,
"opened": 198,
"clicked": 73,
"exited_goal": 34,
"exited_other": 7,
"conversions": 34,
"revenue": 811190
},
"steps": [
{
"step_id": "0199e1a0-2b4d-7a12-8b23-3c4d5e6f7a82",
"position": 1,
"kind": "email",
"sent": 214,
"skipped": 2,
"opened": 121,
"clicked": 48,
"exited_goal": 19,
"exited_other": 4,
"conversions": 21,
"revenue": 498740
},
{
"step_id": "0199e1a0-2b4d-7a14-8b25-3c4d5e6f7a84",
"position": 3,
"kind": "email",
"sent": 160,
"skipped": 0,
"opened": 77,
"clicked": 25,
"exited_goal": 15,
"exited_other": 3,
"conversions": 13,
"revenue": 312450
}
],
"daily": [
{
"date": "2026-10-20",
"enrolled": 11,
"sent": 19,
"conversions": 2,
"revenue": 45980
}
]
}Response fields
| Name | Type | Required | Description |
|---|---|---|---|
object |
string | Yes | Object type. One of automation_stats. |
days |
integer | Yes | — |
currency |
string | Yes | — |
totals |
object | Yes | Counters over a period: customers enrolled, live (active: active or held now), e-mails sent and skipped, unique opens and clicks (tracked domains), exits by goal (an order, a payment) and for other reasons, conversions and recovered revenue (minor units of the store currency). |
totals.enrolled |
integer | Yes | — |
totals.active |
integer | Yes | — |
totals.sent |
integer | Yes | — |
totals.skipped |
integer | Yes | — |
totals.opened |
integer | Yes | — |
totals.clicked |
integer | Yes | — |
totals.exited_goal |
integer | Yes | — |
totals.exited_other |
integer | Yes | — |
totals.conversions |
integer | Yes | — |
totals.revenue |
integer | Yes | Format: int64. |
steps |
object[] | Yes | — |
steps[].step_id |
string | Yes | UUID. |
steps[].position |
integer | Yes | — |
steps[].kind |
string | Yes | — |
steps[].sent |
integer | Yes | — |
steps[].skipped |
integer | Yes | — |
steps[].opened |
integer | Yes | — |
steps[].clicked |
integer | Yes | — |
steps[].exited_goal |
integer | Yes | — |
steps[].exited_other |
integer | Yes | — |
steps[].conversions |
integer | Yes | — |
steps[].revenue |
integer | Yes | Format: int64. |
daily |
object[] | Yes | — |
daily[].date |
string | Yes | Format: date. |
daily[].enrolled |
integer | Yes | — |
daily[].sent |
integer | Yes | — |
daily[].conversions |
integer | Yes | — |
daily[].revenue |
integer | Yes | Format: int64. |
Errors
Errors have the shape {"statusCode", "name", "message"}. See Errors for the full list.
| Status | Name | When |
|---|---|---|
| 401 | missing_api_key, restricted_api_key |
No Authorization: Bearer header, or a sending_access key called an endpoint that needs full_access. |
| 403 | invalid_api_key, validation_error |
The API key is invalid or revoked, or the request is not allowed for this account (unverified domain, plan limit, paused account). |
| 404 | not_found |
The resource does not exist in this account (or the id is not a valid UUID). |
| 422 | validation_error |
A field is missing or invalid; message names it. |
| 429 | rate_limit_exceeded |
Too many requests per second. Wait for Retry-After seconds. |
| 403 | plan_required |
The organization is below the Scale plan (field is automations). |