# Retrieve a DMARC report (/docs/api-reference/domains/get-domain-dmarc-report)

One aggregate report with its rows: each source IP, how many messages it sent, whether they passed DMARC (aligned DKIM or SPF) and what the receiver did with them.

`GET https://api.coss.com/v1/domains/{id}/dmarc/reports/{report_id}`

Authenticate with your API key as a bearer token (`Authorization: Bearer coss_test_…`). Responses are JSON with snake_case fields; errors are `{ error: { type, code, message, param?, issues?, request_id } }` (https://coss.com/docs/api-reference/errors.md).

## Path parameters

- `id` (string, required): The domain's id.
- `report_id` (string, required): The report's id.

## Example request

TypeScript (the `coss` package):

```ts
import { Coss } from "coss";

const coss = new Coss({
  apiKey: process.env.COSS_API_KEY,
  baseUrl: "https://api.coss.com",
});

const { data, error } = await coss.domains.dmarc.reports.get("dom_01k7c8m4q2f3e9v6t5r1n0p8yz", "dmarcrep_01k7c8m4q2f3e9v6t5r1n0p8yz");
```

HTTP:

```sh
curl -X GET "https://api.coss.com/v1/domains/dom_01k7c8m4q2f3e9v6t5r1n0p8yz/dmarc/reports/dmarcrep_01k7c8m4q2f3e9v6t5r1n0p8yz" \
  -H "Authorization: Bearer $COSS_API_KEY"
```

Python:

```python
from coss import Coss

client = Coss()  # api_key= or COSS_API_KEY

client.domains.dmarc.reports.get(
    id="dom_01k7c8m4q2f3e9v6t5r1n0p8yz",
    report_id="dmarcrep_01k7c8m4q2f3e9v6t5r1n0p8yz",
)
```

Go:

```go
import (
	"context"

	cossclient "github.com/cosscom/coss-go/client"
	dmarc "github.com/cosscom/coss-go/domains/dmarc"
)

client := cossclient.NewClient() // option.WithAPIKey(…) or COSS_API_KEY

request := &dmarc.GetReportsRequest{
    ID: "dom_01k7c8m4q2f3e9v6t5r1n0p8yz",
    ReportID: "dmarcrep_01k7c8m4q2f3e9v6t5r1n0p8yz",
}
client.Domains.Dmarc.Reports.Get(
    context.TODO(),
    request,
)
```

Ruby:

```ruby
require "coss"

client = Coss::Client.new # api_key: or COSS_API_KEY

client.domains.dmarc.reports.get(
  id: "dom_01k7c8m4q2f3e9v6t5r1n0p8yz",
  report_id: "dmarcrep_01k7c8m4q2f3e9v6t5r1n0p8yz"
)
```

PHP:

```php
<?php

use Coss\Coss;

$client = new Coss(); // apiKey: or COSS_API_KEY

$client->domains->dmarc->reports->get(
    'dom_01k7c8m4q2f3e9v6t5r1n0p8yz',
    'dmarcrep_01k7c8m4q2f3e9v6t5r1n0p8yz',
);
```

Java:

```java
import com.coss.Coss;
import com.coss.resources.domains.dmarc.reports.requests.GetReportsRequest;

Coss client = Coss.builder().build(); // .apiKey(…) or COSS_API_KEY

client.domains().dmarc().reports().get(
    "dom_01k7c8m4q2f3e9v6t5r1n0p8yz",
    "dmarcrep_01k7c8m4q2f3e9v6t5r1n0p8yz",
    GetReportsRequest
        .builder()
        .build()
);
```

.NET:

```csharp
using Coss;
using Coss.Domains.Dmarc;

var client = new CossClient(); // apiKey: or COSS_API_KEY

await client.Domains.Dmarc.Reports.GetAsync(
    new GetReportsRequest
    {
        Id = "dom_01k7c8m4q2f3e9v6t5r1n0p8yz",
        ReportId = "dmarcrep_01k7c8m4q2f3e9v6t5r1n0p8yz",
    }
);
```

## Response 200

The report.

- `object` ("dmarc_report", required)
- `id` (string, required)
- `domain_id` (string, required): The domain's id.
- `reporter` (object, required): Who sent the report.
  - `org_name` (string, required): The reporting organization.
  - `email` (string | null, required): Its contact address.
- `report_id` (string, required): The reporter's own id of the report.
- `period_start` (string, required, date-time): When the period it covers starts.
- `period_end` (string, required, date-time): When the period it covers ends.
- `policy_published` (object, required): The policy the reporter found when it evaluated the mail.
  - `domain` (string, required): The domain the policy was published for.
  - `p` (string | null, required): The domain's policy tag.
  - `sp` (string | null, required): The subdomain policy tag.
  - `np` (string | null, required): The policy tag for non-existent subdomains.
  - `adkim` (string | null, required): The DKIM alignment tag.
  - `aspf` (string | null, required): The SPF alignment tag.
  - `pct` (integer | null, required): The percentage tag.
  - `testing` (string | null, required): The testing tag.
- `messages` (integer, required): Messages the report covers.
- `passing` (integer, required): Of those, how many passed DMARC.
- `truncated` (boolean, required): The report listed more rows than are kept (10,000); totals cover the kept rows.
- `received_at` (string, required, date-time): When coss.com received it.
- `records` (object[], required)
  - `source_ip` (string, required): The address the messages came from.
  - `count` (integer, required): How many messages this line covers.
  - `disposition` ("none" | "quarantine" | "reject", required): What the receiver did with the messages.
  - `dkim` ("pass" | "fail", required): Aligned DKIM result.
  - `spf` ("pass" | "fail", required): Aligned SPF result.
  - `dmarc_pass` (boolean, required): Whether they passed DMARC.
  - `header_from` (string, required): The domain in their `From` header.
  - `envelope_from` (string | null, required): The domain in their envelope sender.
  - `via_coss` (boolean, required): Whether they were sent through coss.com, by its DKIM selectors or bounce domain.
  - `auth_results` (object, required): What receivers saw for DKIM and SPF.
    - `dkim` (object[], required): Each DKIM signature's result.
      - `domain` (string, required): The signing domain.
      - `selector` (string | null, required): The selector.
      - `result` (string, required): The result.
    - `spf` (object[], required): Each SPF check's result.
      - `domain` (string, required): The checked domain.
      - `scope` (string | null, required): What it was checked against.
      - `result` (string, required): The result.
  - `reasons` (object[], required): Why receivers overrode the policy.
    - `type` (string, required): The kind of override.
    - `comment` (string | null, required): The receiver's comment.

Example:

```json
{
  "object": "dmarc_report",
  "id": "dmarcrep_01k7c8m4q2f3e9v6t5r1n0p8yz",
  "domain_id": "dom_01k7c8m4q2f3e9v6t5r1n0p8yz",
  "reporter": {
    "org_name": "google.com",
    "email": "noreply-dmarc-support@google.com"
  },
  "report_id": "13845021974128475",
  "period_start": "2026-10-09T00:00:00.000Z",
  "period_end": "2026-10-09T23:59:59.000Z",
  "policy_published": {
    "domain": "acme.com",
    "p": "none",
    "sp": null,
    "np": null,
    "adkim": "r",
    "aspf": "r",
    "pct": 100,
    "testing": null
  },
  "messages": 1204,
  "passing": 1200,
  "truncated": false,
  "received_at": "2026-10-10T03:12:44.000Z",
  "records": [
    {
      "source_ip": "54.240.8.12",
      "count": 1200,
      "disposition": "none",
      "dkim": "pass",
      "spf": "pass",
      "dmarc_pass": true,
      "header_from": "acme.com",
      "envelope_from": "send.acme.com",
      "via_coss": true,
      "auth_results": {
        "dkim": [
          {
            "domain": "acme.com",
            "selector": "x7f3k2m9qp4ld8sv6hwz1nyc5rbtgj0e",
            "result": "pass"
          }
        ],
        "spf": [
          {
            "domain": "send.acme.com",
            "scope": "mfrom",
            "result": "pass"
          }
        ]
      },
      "reasons": []
    }
  ]
}
```

## Errors

- `400`: The `Coss-Version` header names an unknown API version (`invalid_api_version`).
- `401`: The API key is missing, invalid, revoked or expired (`authentication_error`).
- `403`: The API key lacks the permission this endpoint needs (`permission_error`), or its organization is suspended (`organization_suspended`).
- `404`: No such domain in this organization, or no such report of it (`not_found`).
- `429`: Too many requests with this API key (`rate_limited`), or too many requests with invalid keys from this address (`too_many_failed_authentications`). Retry after `Retry-After` seconds. Successful responses carry `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset` (seconds until the limit is fully restored).
- `500`: Unexpected server error (`api_error` / `internal_error`).
- `503`: The API key could not be verified right now; retry (`service_unavailable`).