Documentation
Sign inGet started

Complaints by type

GET
/v1/email/stats/complaint-types
bird email stats by-complaint-type
Returns spam-complaint counts grouped by the feedback-loop complaint type reported by the mailbox provider (for example abuse, fraud, virus), for the requested period. Use it to understand what kind of complaints your mail attracts.
This breakdown reports the complaint side only: each row carries the complained count for one type and nothing else, because a complaint type is recorded only on spam-complaint events.
Rows are ranked by complained descending, capped at the requested limit (default 50, hard maximum 200), and computed against event time (not send time). The maximum window is 365 days; requesting a longer range returns 422.
Parametri di query
from
string
Start date (inclusive) in YYYY-MM-DD, interpreted as a calendar day in timezone (a UTC day when timezone is omitted). Defaults to 30 days before to when omitted.
to
string
End date (inclusive) in YYYY-MM-DD, interpreted as a calendar day in timezone (a UTC day when timezone is omitted). Defaults to today in that timezone when omitted. Window may not exceed 365 days.
timezone
string
IANA timezone identifier (for example Asia/Kathmandu) to report in; defaults to UTC. Day and hour boundaries and the default window when from and to are omitted both follow it, so a calendar-day from or to names a local day. A from or to carrying its own UTC offset is rejected while this is set: pass a calendar day or a Z instant.
category
string
Not supported on breakdown endpoints; supplying it returns 422. To compare categories use GET /v1/email/stats/categories; the summary, daily, and hourly statistics accept category as a filter.
sort
string
Metric to rank rows by, applied descending. Defaults to complained, the only sortable metric for this breakdown.
Possible values: complained
limit
integer
Maximum number of complaint-type rows to return, ranked by complained descending.
Payload di risposta
period
object
obbligatorio
The date range the response covers (echoed back from the request), plus data_as_of, the freshness boundary the data is current to.
Mostra attributi secondari
period.from
string
obbligatorio
Inclusive start date the response covers (YYYY-MM-DD).
period.to
string
obbligatorio
Inclusive end date the response covers (YYYY-MM-DD).
period.data_as_of
nullable string
The instant the statistics in this response are current to: events recorded up to roughly this time are reflected, while more recent events may not be yet. Statistics are served from a rolling aggregation that refreshes every few seconds, so a response is near-real-time but not live; use this field to label data freshness (for example "as of 14:03") rather than assuming the numbers are to-the-second. Null when the freshness boundary is not being reported.
data
array of object
obbligatorio
Complaint-type breakdown rows, ranked by complained descending. Empty when no complaints occurred in the period.
Mostra attributi secondari
data.feedback_type
string
obbligatorio
The complaint classification reported by the mailbox provider's feedback loop, in the abuse-reporting-format vocabulary (for example abuse, fraud, virus, other). The set is open.
data.complained
integer
obbligatorio
Distinct recipients who reported a message as spam with this complaint type at any point in the period.
total
integer
obbligatorio
Total number of distinct feedback types with activity in the period, regardless of limit. When it exceeds the number of rows returned, the ranking was capped; raise limit (up to 200) or narrow the window to see more.