# `bird email tools analyze-headers`

## Usage

```bash
bird email tools analyze-headers <raw> [flags]
```

## Description

Analyze raw email headers

Analyze a raw email's headers and get back the headline fields (from, to, subject, date), the SPF/DKIM/DMARC authentication verdicts, and the full relay path with per-hop delays. Paste the message source into `raw`; everything from the first blank line onward (the body) is ignored. Use this to explain why a message failed authentication, to trace where it slowed down in transit, or to read the headers of a suspicious message. Offline — nothing is looked up or sent. Public — no authentication required.

Build the request from the &lt;raw> argument, a JSON AnalyzeEmailHeadersRequest body via
--body-file ("-" reads stdin), or both — an inline value overrides the matching
body field. Run --example to print a ready-to-edit body, or --dry-run to print
the resolved request without sending it.

## Examples

```bash
# print the body shape (no credentials needed)
bird email tools analyze-headers --example
```

## Options

#### Request

| Name                | Description                                                  |
| ------------------- | ------------------------------------------------------------ |
| `--body-file`       | Read the JSON request body from this file; "-" reads stdin   |
| `--example`         | Print a complete example request body, then exit             |
| `--dry-run`         | Print the resolved request without sending it, then exit     |
| `--idempotency-key` | Deduplication key; a retry with the same key won't act twice |

#### Options

| Name                | Description                                      |
| ------------------- | ------------------------------------------------ |
| `--response-schema` | Print the fields this command returns, then exit |

## Related

| Name                                                                                            | Description                                      |
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------ |
| [`bird email tools analyze-dmarc-report`](/docs/cli/reference/email-tools-analyze-dmarc-report) | Analyze a DMARC aggregate report                 |
| [`bird email tools audit`](/docs/cli/reference/email-tools-audit)                               | Audit a domain's email authentication            |
| [`bird email tools split-dns-record`](/docs/cli/reference/email-tools-split-dns-record)         | Split a long DNS TXT value into 255-octet chunks |
| [`bird email tools validate-bimi`](/docs/cli/reference/email-tools-validate-bimi)               | Validate a BIMI record                           |
| [`bird email tools validate-dmarc`](/docs/cli/reference/email-tools-validate-dmarc)             | Validate a DMARC record                          |