Get the Google-reported spam rate for a sending domain
/v1/email/inbox-insights/complaints// Requires Insights preview access for the organization.
let sendingDomain: string | undefined;
for await (const domain of bird.email.inboxInsights.domains.list({ search: "mail.example.com" })) {
if (domain.domain === "mail.example.com") { sendingDomain = domain.domain; break; }
}
if (!sendingDomain) throw new Error("Verify mail.example.com in this workspace first");
const report = await bird.email.inboxInsights.complaints({ sending_domain: sendingDomain });
console.log(report);# Requires Insights preview access for the organization.
sending_domain = None
for domain in client.email.inbox_insights.domains.list(search="mail.example.com"):
if domain.domain == "mail.example.com":
sending_domain = domain.domain
break
if sending_domain is None:
raise ValueError("Verify mail.example.com in this workspace first")
report = client.email.inbox_insights.complaints(sending_domain=sending_domain)
print(report.model_dump_json())// Requires Insights preview access for the organization.
client, err := bird.NewClient(option.WithAPIKey(os.Getenv("BIRD_API_KEY")))
if err != nil {
log.Fatal(err)
}
ctx := context.Background()
sendingDomain := ""
for domain, err := range client.Email.InboxInsights.Domains.List(ctx, bird.EmailInboxInsightsDomainsListParams{Search: "mail.example.com"}) {
if err != nil {
log.Fatal(err)
}
if domain.Domain != nil && *domain.Domain == "mail.example.com" {
sendingDomain = *domain.Domain
break
}
}
if sendingDomain == "" {
log.Fatal("Verify mail.example.com in this workspace first")
}
report, err := client.Email.InboxInsights.Complaints(ctx, bird.EmailInboxInsightsComplaintsParams{SendingDomain: sendingDomain})
if err != nil {
log.Fatal(err)
}
encoded, err := json.MarshalIndent(report, "", " ")
if err != nil {
log.Fatal(err)
}
fmt.Println(string(encoded))// Requires Insights preview access for the organization.
$sendingDomain = null;
foreach ($bird->email->inboxInsights->domains->list(['search' => 'mail.example.com']) as $domain) {
if ($domain->getDomain() === 'mail.example.com') {
$sendingDomain = $domain->getDomain();
break;
}
}
if ($sendingDomain === null) {
throw new \RuntimeException('Verify mail.example.com in this workspace first');
}
$report = $bird->email->inboxInsights->complaints(['sending_domain' => $sendingDomain]);
var_dump($report);bird email inbox-insights complaints <sending-domain>curl -X GET "https://us1.platform.bird.com/v1/email/inbox-insights/complaints" \
-H "Authorization: Bearer $TOKEN" \
--url-query "sending_domain=mail.acme.com"{
"resource": "placement",
"domain": "mail.acme.com",
"measurement": {
"sources": [
"panel",
"intelliseed_public"
],
"weighting": {
"weight_set_id": "12",
"source": "account",
"basis": "weighted-mean-of-per-isp-rates"
}
},
"generated_at": "2026-08-18T09:34:00Z",
"freshness": {
"as_of": "2026-08-17",
"lag_hint": "daily"
},
"cached_at": "2026-08-18T09:40:02Z",
"window": {
"start": "2026-08-12",
"end": "2026-08-18",
"group_by": "day"
},
"compared_to": {
"start": "2026-06-19",
"end": "2026-07-18"
},
"rate": {
"gmail_postmaster_spam_rate_percent": 0.11,
"delta_pts": 0.03,
"peak": {
"date": "2026-08-02",
"value_percent": 0.34
},
"status": "ok"
},
"series": {
"items": [
{
"date": "2026-07-19",
"gmail_postmaster_spam_rate_percent": 0.08
}
],
"status": "ok"
}
}
Returns how often the domain's mail is reported as spam by Gmail recipients, as Google Postmaster measures it: the rate for the period and a time series for charting.
This is Google's number for Gmail-received mail only. The feedback-loop
complaint rate across all providers is a Bird-measured figure served by
the email statistics endpoints; the two count different mail and are
rendered as separate lines, never combined. For a domain without a
completed Google Postmaster connection, sections report not_configured
with a setup path, not an error.
API-key calls require Insights preview access for your organization.
Query Parameters
sending_domainstringThe sending domain to report on: one of the workspace's verified sending domains, exactly as it appears there. A domain that is not verified in this workspace answers not-found.
fromstringFirst UTC day of the period, inclusive, in YYYY-MM-DD: the same window
convention as the email statistics endpoints. Defaults to 30 days
before to.
It may be at most 30 days before to, which is also the default, so a
request naming neither date is already at the limit. Asking for more
answers 422: the page pairs these figures with Bird's own per-provider
sending statistics, and those are kept for 30 days, so a longer period
could only describe two different spans side by side.
tostringLast UTC day of the period, inclusive, in YYYY-MM-DD. Defaults to today.
group_bystringBucket size for the series. Defaults to day.
Possible values: day, week, month
comparestringInclude the prior equal-length period, populating compared_to and the rate's delta.
Possible values: previous_period
Response Payload
resourceWhich resource this response is, echoed for self-description.
domainThe sending domain the figures describe.
measurementHow the figures were measured. Present only where a figure was weighted or drawn from a named set of sources, which today means placement and the industry benchmark. Absent on the reputation resources and on a live lookup, neither of which weights anything.
generated_atWhen these figures were computed. The measurement service's own stamp where it publishes one; on the resources Bird derives from daily rates it has none to publish, and this is when Bird computed them.
freshnessHow current the figures are. Freshness differs per resource (authentication data can lag a day or more while blocklist lookups are near real time), so any "as of" label binds from this field, never from a fixed string.
cached_atPresent when the response was served from a short-lived copy rather than fetched for this request: when that copy was fetched.
windowThe period every figure in the response covers: whole UTC calendar days, inclusive on both ends. The same window convention the email statistics endpoints use, so figures from the two sources describe the same days and can be combined without adjustment.
Show child attributes
window.startFirst UTC day of the period, inclusive.
window.endLast UTC day of the period, inclusive.
window.group_byThe bucket size any series in this response is grouped by. Absent on resources with no series.
Possible values: day, week, month
compared_toThe prior equal-length period the delta figures compare against. Present only when the request asked for a comparison.
rateThe rate at which the domain's mail is reported as spam, as Google Postmaster measures it.
seriesThe complaint-rate series, at the grain named in window.group_by. Index by date, never by position.
Related resources
Continue with the documentation, guides and examples for this topic.