Sign inGet started

Get the Google-reported spam rate for a sending domain

GET
/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);
Response200
{
  "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_domain
string
The 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.
from
string
First 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.
to
string
Last UTC day of the period, inclusive, in YYYY-MM-DD. Defaults to today.
group_by
string
Bucket size for the series. Defaults to day.
Possible values: day, week, month
compare
string
Include the prior equal-length period, populating compared_to and the rate's delta.
Possible values: previous_period
Response Payload
resource
string
required
Which resource this response is, echoed for self-description.
domain
string
required
The sending domain the figures describe.
measurement
object
How 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.
Show child attributes
measurement.sources
array of string
required
Identifiers of the measurement systems that contributed to these figures. The set grows as measurement coverage does, so treat the values as labels rather than a closed list.
measurement.weighting
object
How the figures were weighted. Present on figures weighted against an audience mix, which is placement's method; measurements that weight nothing carry no weighting block.
Show child attributes
measurement.weighting.weight_set_id
string
required
The measurement's own identifier for the audience mix, carried through so a client can tell two weightings apart without comparing basis strings. No operation accepts it.
measurement.weighting.source
nullable string
required
Which audience mix the weighting used. Null when the measurement weighted these figures by a method this API does not model: the enum is closed so that a client can branch on it exhaustively, which means an unfamiliar method has to answer "not one of these" rather than be passed through. basis usually still describes the method in words when that happens.
measurement.weighting.basis
nullable string
required
The weighting method behind the rates, as the measurement names it. A slug rather than a sentence, so render it as a label and do not expect it to read as English. Null when the measurement did not state one, which pairs with source: both describe the method, so neither can claim to know it when the measurement was silent.
generated_at
string
required
When the measurement service computed these figures.
freshness
object
required
How 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.
Show child attributes
freshness.as_of
nullable string
required
The most recent UTC day the figures include, or null for a live lookup that has no measurement window.
freshness.lag_hint
nullable string
required
How far behind real time this resource usually runs. A lowercase identifier rather than a display label, so pick your own wording for it, and treat the set as open: the measurement names a hint per resource and can add one without notice.
Null when the measurement reports no hint, which several resources do: show the figures without an age rather than inventing one.
Possible values (may grow over time): daily, nightly, near_real_time
cached_at
string
Present when the response was served from a short-lived copy rather than fetched for this request: when that copy was fetched.
window
object
required
The 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.start
string
required
First UTC day of the period, inclusive.
window.end
string
required
Last UTC day of the period, inclusive.
window.group_by
string
The bucket size any series in this response is grouped by. Absent on resources with no series.
Possible values: day, week, month
compared_to
object
The prior equal-length period the delta figures compare against. Present only when the request asked for a comparison.
Show child attributes
compared_to.start
string
required
First UTC day of the prior period, inclusive.
compared_to.end
string
required
Last UTC day of the prior period, inclusive.
rate
object
required
The rate at which the domain's mail is reported as spam, as Google Postmaster measures it.
Show child attributes
rate.gmail_postmaster_spam_rate_percent
nullable number
required
Share of the domain's Gmail-received mail that recipients reported as spam, as a percentage, from Google Postmaster.
rate.delta_pts
number
How the rate moved against the prior period, in percentage points. Present only when the request asked for a comparison and the prior period had data; absence is not zero change.
rate.peak
object
The worst day in the period, so a spike can be named without scanning the series. Absent when there is no rate to peak.
Show child attributes
rate.peak.date
string
required
The UTC day the highest rate fell on.
rate.peak.value_percent
number
required
The rate on that day, as a percentage.
rate.status
string
required
Whether a section of the response carries figures, and when it does not, why.
ok means the section is populated. no_data means the measurement ran and observed nothing to report for this domain in the period. not_configured means the section needs a setup step that has not been completed yet, such as connecting Google Postmaster Tools; treat it as an invitation to finish setup rather than a fault. unavailable means the figures could not be retrieved this time and the same request may well succeed on a retry; the rest of the response is unaffected. not_applicable means the section is meaningless for this domain in this period, so there is nothing to show or fix.
A successful response never implies every section is populated; read each section's status rather than assuming figures are present.
Possible values: ok, no_data, not_configured, unavailable, not_applicable
series
object
required
The complaint-rate series, at the grain named in window.group_by. Index by date, never by position.
Show child attributes
series.items
array of object
required
One point per bucket.
Show child attributes
series.items.date
string
required
First UTC day of the bucket.
series.items.gmail_postmaster_spam_rate_percent
nullable number
required
The bucket's Google Postmaster spam rate, as a percentage.
series.status
string
required
Whether a section of the response carries figures, and when it does not, why.
ok means the section is populated. no_data means the measurement ran and observed nothing to report for this domain in the period. not_configured means the section needs a setup step that has not been completed yet, such as connecting Google Postmaster Tools; treat it as an invitation to finish setup rather than a fault. unavailable means the figures could not be retrieved this time and the same request may well succeed on a retry; the rest of the response is unaffected. not_applicable means the section is meaningless for this domain in this period, so there is nothing to show or fix.
A successful response never implies every section is populated; read each section's status rather than assuming figures are present.
Possible values: ok, no_data, not_configured, unavailable, not_applicable