---
title: "Get the Google-reported spam rate for a sending domain"
method: GET
path: "/v1/email/inbox-insights/complaints"
tags: ["email-inbox-insights"]
---

# Get the Google-reported spam rate for a sending domain

`GET /v1/email/inbox-insights/complaints`

## Request

- Base URL: `https://us1.platform.bird.com`
- URL: `https://us1.platform.bird.com/v1/email/inbox-insights/complaints`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `bird_session`

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.

## Query parameters

- `sending_domain` string, required
- `from` string, date
- `to` string, date
- `group_by` 'day' | 'week' | 'month': The bucket size a series is grouped by. Day suits the product's charts; wider grains suit long ranges.
- `compare` 'previous_period': Set to `previous_period` to include the immediately preceding window of equal length in the same response, so deltas need no second request.

## Headers

- `X-Workspace-Id` string
- `X-Organization-Id` string

## Response `200`

The Google-reported spam rate for the requested domain and period.

- EmailInboxInsightsComplaints: The meta every Inbox Insights resource carries, whatever it measures, so one client adapter serves them all.
  - `resource` string, required: Which resource this response is, echoed for self-description.
  - `domain` string, required: The sending domain the figures describe.
  - `measurement` EmailInboxInsightsMeasurement: How the figures in this response were measured, so a number is self-describing in a screenshot or a bug report.
    - `sources` 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.
    - `weighting` EmailInboxInsightsWeighting: How the placement figures in this response were weighted, so a number is self-describing wherever it is quoted or screenshotted. Placement rates are a weighted average of per-provider rates against an audience mix (the share of recipients expected at each mailbox provider) rather than a share of delivered volume.
      - `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.
      - `source` 'account' | 'global', required: Where the audience mix behind the placement weighting came from: `account` when it was configured for this account, `global` when a general default was used instead.
      - `basis` string, nullable, 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, date-time, required: When 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.
  - `freshness` EmailInboxInsightsFreshness, 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.
    - `as_of` string, date, nullable, required: The most recent UTC day the figures include, or null for a live lookup that has no measurement window.
    - `lag_hint` string, nullable, 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.
  - `cached_at` string, date-time: Present when the response was served from a short-lived copy rather than fetched for this request: when that copy was fetched.
  - `window` EmailInboxInsightsWindow, 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.
    - `start` string, date, required: First UTC day of the period, inclusive.
    - `end` string, date, required: Last UTC day of the period, inclusive.
    - `group_by` 'day' | 'week' | 'month': The bucket size a series is grouped by. Day suits the product's charts; wider grains suit long ranges.
  - `compared_to` EmailInboxInsightsComparedTo: The prior equal-length period the delta figures compare against. Present only when the request asked for a comparison.
    - `start` string, date, required: First UTC day of the prior period, inclusive.
    - `end` string, date, required: Last UTC day of the prior period, inclusive.
  - `rate` EmailInboxInsightsComplaintRate, required: The rate at which the domain's mail is reported as spam, as Google Postmaster measures it.
    - `gmail_postmaster_spam_rate_percent` number, nullable, required: Share of the domain's Gmail-received mail that recipients reported as spam, as a percentage, from Google Postmaster.
    - `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.
    - `peak` EmailInboxInsightsComplaintPeak: The worst day for complaints in the period.
      - `date` string, date, required: The UTC day the highest rate fell on.
      - `value_percent` number, required: The rate on that day, as a percentage.
    - `status` 'ok' | 'no_data' | 'not_configured' | 'unavailable' | 'not_applicable', 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.
  - `series` EmailInboxInsightsComplaintSeries, required: The complaint-rate series, at the grain named in `window.group_by`. Index by date, never by position.
    - `items` EmailInboxInsightsComplaintSeriesPoint[], required: One point per bucket.
      - `date` string, date, required: First UTC day of the bucket.
      - `gmail_postmaster_spam_rate_percent` number, nullable, required: The bucket's Google Postmaster spam rate, as a percentage.
    - `status` 'ok' | 'no_data' | 'not_configured' | 'unavailable' | 'not_applicable', 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.

## Other responses

- `400`: Bad request
- `401`: Authentication required
- `403`: Insufficient permissions
- `404`: Resource not found
- `412`: Precondition failed
- `422`: The request has invalid field values, violates a business rule, or carries a query parameter the endpoint does not declare. Field validation errors use `type: validation_error` and include the affected fields in `details`. Business-rule errors identify the failed rule in `type`.
- `429`: Rate limit exceeded
- `500`: Internal server error
- `503`: The service is temporarily unavailable. If `Retry-After` is present, wait for that delay before retrying; otherwise, retry with exponential backoff. Reuse the same idempotency key and request when retrying a mutation.

---

[API](https://skmtc.dev/messagebird/apis/bird-api.md) · [All operations](https://skmtc.dev/messagebird/apis/bird-api/llms.txt) · [OpenAPI document](https://skmtc.dev/messagebird/apis/bird-api/revisions/3e2a50466454?raw)
