- [HTTP request](https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#body.HTTP_TEMPLATE)
- [Path parameters](https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#body.PATH_PARAMETERS)
- [Request body](https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#body.request_body)
- [Response body](https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#body.response_body)
  - [JSON representation](https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#body.DomainComplianceStatus.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#body.aspect)
- [DomainComplianceData](https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#DomainComplianceData)
  - [JSON representation](https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#DomainComplianceData.SCHEMA_REPRESENTATION)
- [ComplianceRowData](https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#ComplianceRowData)
  - [JSON representation](https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#ComplianceRowData.SCHEMA_REPRESENTATION)
- [ComplianceRequirement](https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#ComplianceRequirement)
- [ComplianceStatus](https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#ComplianceStatus)
  - [JSON representation](https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#ComplianceStatus.SCHEMA_REPRESENTATION)
- [State](https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#State)
- [OneClickUnsubscribeVerdict](https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#OneClickUnsubscribeVerdict)
  - [JSON representation](https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#OneClickUnsubscribeVerdict.SCHEMA_REPRESENTATION)
- [Reason](https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#Reason)
- [HonorUnsubscribeVerdict](https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#HonorUnsubscribeVerdict)
  - [JSON representation](https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#HonorUnsubscribeVerdict.SCHEMA_REPRESENTATION)
- [Reason](https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#Reason_1)
- [DeliverabilityStatusVerdict](https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#DeliverabilityStatusVerdict)
  - [JSON representation](https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#DeliverabilityStatusVerdict.SCHEMA_REPRESENTATION)
- [Reason](https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#Reason_2)
- [Try it!](https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#try-it)

Retrieves the compliance status for a given domain. Returns PERMISSION_DENIED if you don't have permission to access compliance status for the domain.

### HTTP request

`GET https://gmailpostmastertools.googleapis.com/v2/{name=domains/*/complianceStatus}`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` Required. The resource name of the domain's compliance status to retrieve. Format: `domains/{domainId}/complianceStatus`. |

### Request body

The request body must be empty.

### Response body

Compliance status for a domain.

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "name": string, "complianceData": { object (`https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#DomainComplianceData`) }, "subdomainComplianceData": { object (`https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#DomainComplianceData`) } } ``` |

| Fields ||
|---|---|
| `name` | `string` Identifier. The resource name of the domain's compliance status. Format: `domains/{domainId}/complianceStatus`. |
| `complianceData` | ``object (`https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#DomainComplianceData`)`` Compliance data for the registrable domain part of the domain in `name`. For example, if `name` is `domains/example.com/complianceStatus`, this field contains compliance data for `example.com`. |
| `subdomainComplianceData` | ``object (`https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#DomainComplianceData`)`` Compliance data calculated specifically for the subdomain in `name`. This field is only populated if the domain in `name` is a subdomain that differs from its registrable domain (e.g., `sub.example.com`), and if compliance data is available for that specific subdomain. |

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/postmaster`
- `
  https://www.googleapis.com/auth/postmaster.traffic.readonly`

For more information, see the [Authorization guide](https://developers.google.com/workspace/guides/configure-oauth-consent).

## DomainComplianceData

Compliance data for a given domain.

| JSON representation |
|---|
| ``` { "domainId": string, "rowData": [ { object (`https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#ComplianceRowData`) } ], "oneClickUnsubscribeVerdict": { object (`https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#OneClickUnsubscribeVerdict`) }, "honorUnsubscribeVerdict": { object (`https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#HonorUnsubscribeVerdict`) }, "deliverabilityStatusVerdict": { object (`https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#DeliverabilityStatusVerdict`) } } ``` |

| Fields ||
|---|---|
| `domainId` | `string` Domain that this data is for. |
| `rowData[]` | ``object (`https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#ComplianceRowData`)`` Data for each of the rows of the table. Each message contains all the data that backs a single row. |
| `oneClickUnsubscribeVerdict` | ``object (`https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#OneClickUnsubscribeVerdict`)`` One-click unsubscribe compliance verdict. |
| `honorUnsubscribeVerdict` | ``object (`https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#HonorUnsubscribeVerdict`)`` Unsubscribe honoring compliance verdict. |
| `deliverabilityStatusVerdict` | ``object (`https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#DeliverabilityStatusVerdict`)`` Output only. Deliverability status verdict. |

## ComplianceRowData

Data for a single row of the compliance status table.

| JSON representation |
|---|
| ``` { "requirement": enum (`https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#ComplianceRequirement`), "status": { object (`https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#ComplianceStatus`) } } ``` |

| Fields ||
|---|---|
| `requirement` | ``enum (`https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#ComplianceRequirement`)`` The compliance requirement. |
| `status` | ``object (`https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#ComplianceStatus`)`` The compliance status for the requirement. |

## ComplianceRequirement

The compliance requirement.

| Enums ||
|---|---|
| `COMPLIANCE_REQUIREMENT_UNSPECIFIED` | Unspecified. |
| `SPF` | Whether the sender has properly configured SPF. |
| `DKIM` | Whether the sender has properly configured DKIM. |
| `SPF_AND_DKIM` | Whether the sender has properly configured both SPF and DKIM. |
| `DMARC_POLICY` | Whether the sender has configured DMARC policy. |
| `DMARC_ALIGNMENT` | Whether the From: header is aligned with DKIM or SPF |
| `MESSAGE_FORMATTING` | Whether messages are correctly formatted according to RFC 5322. |
| `DNS_RECORDS` | Whether the domain has forward and reverse DNS records. |
| `ENCRYPTION` | Whether messages has TLS encryption. |
| `USER_REPORTED_SPAM_RATE` | Whether the sender is below a threshold for user-reported spam rate. |
| `ONE_CLICK_UNSUBSCRIBE` | Whether the sender sufficiently supports one-click unsubscribe. Note that the user-facing requirement is "one-click unsubscribe", but we require satisfaction of multiple "unsubscribe support" rules. |
| `HONOR_UNSUBSCRIBE` | Whether the sender honors user-initiated unsubscribe requests. |

## ComplianceStatus

The status of a sender compliance requirement.

| JSON representation |
|---|
| ``` { "status": enum (`https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#State`) } ``` |

| Fields ||
|---|---|
| `status` | ``enum (`https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#State`)`` Output only. The compliance status. |

## State

The status types for a particular sender compliance requirement.

| Enums ||
|---|---|
| `STATE_UNSPECIFIED` | Unspecified. |
| `COMPLIANT` | The compliance requirement is met, and the sender is deemed compliant. |
| `NEEDS_WORK` | The compliance requirement is unmet, and the sender needs to do work to achieve compliance. |

## OneClickUnsubscribeVerdict

Compliance verdict for whether a sender meets the one-click unsubscribe compliance requirement.

| JSON representation |
|---|
| ``` { "status": { object (`https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#ComplianceStatus`) }, "reason": enum (`https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#Reason`) } ``` |

| Fields ||
|---|---|
| `status` | ``object (`https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#ComplianceStatus`)`` The compliance status. |
| `reason` | ``enum (`https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#Reason`)`` The specific reason for the compliance verdict. Must be empty if the status is compliant. |

## Reason

The specific reason a one-click unsubscribe verdict has a "non-compliant" status.

| Enums ||
|---|---|
| `REASON_UNSPECIFIED` | Unspecified. |
| `NO_UNSUB_GENERAL` | Sender does not support one-click unsubscribe for the majority of their messages. |
| `NO_UNSUB_SPAM_REPORTS` | Sender does not support one-click unsubscribe for most messages that are manually reported as spam. |
| `NO_UNSUB_PROMO_SPAM_REPORTS` | Sender does not support one-click unsubscribe for most promotional messages that are manually reported as spam. This classification of messages is a subset of those encompassed by `NO_UNSUB_SPAM_REPORTS`. |

## HonorUnsubscribeVerdict

Compliance verdict for whether a sender meets the unsubscribe honoring compliance requirement.

| JSON representation |
|---|
| ``` { "status": { object (`https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#ComplianceStatus`) }, "reason": enum (`https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#Reason_1`) } ``` |

| Fields ||
|---|---|
| `status` | ``object (`https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#ComplianceStatus`)`` The compliance status. |
| `reason` | ``enum (`https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#Reason_1`)`` The specific reason for the compliance verdict. Must be empty if the status is compliant. |

## Reason

The specific reason an unsubscribe honoring verdict has a "non-compliant" status.

| Enums ||
|---|---|
| `REASON_UNSPECIFIED` | Unspecified. |
| `NOT_HONORING` | The sender does not honor unsubscribe requests. |
| `NOT_HONORING_TOO_FEW_CAMPAIGNS` | The sender does not honor unsubscribe requests and consider to increase the number of relevant campaigns. |
| `NOT_HONORING_TOO_MANY_CAMPAIGNS` | The sender does not honor unsubscribe requests and consider to reduce the number of relevant campaigns. |

## DeliverabilityStatusVerdict

Verdict of domain deliverability status.

| JSON representation |
|---|
| ``` { "state": { object (`https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#ComplianceStatus`) }, "reason": enum (`https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#Reason_2`) } ``` |

| Fields ||
|---|---|
| `state` | ``object (`https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#ComplianceStatus`)`` Output only. The compliance state. |
| `reason` | ``enum (`https://developers.google.com/workspace/gmail/postmaster/reference/rest/v2/domains/getComplianceStatus#Reason_2`)`` Output only. The specific reason for the compliance verdict. |

## Reason

The specific reason for the deliverability status verdict.

| Enums ||
|---|---|
| `REASON_UNSPECIFIED` | Unspecified. |
| `MESSAGE_VOLUME_LOW` | Not enough outgoing email. |
| `SMTP_ERRORS_HIGH` | Many messages with delivery errors. |
| `SENDER_NOT_COMPLIANT` | The sender does not meet the sender requirements. |
| `SPAM_RATE_HIGH` | The spam rate is above 0.1%. |
| `USER_FEEDBACK_NEGATIVE` | Indicates users do not want to receive email messages. |
| `USER_FEEDBACK_LOW` | Users do not take action on messages. |
| `USER_FEEDBACK_POSITIVE` | Users signal they want to receive email messages. |