---
title: "Get parsed message headers"
method: GET
path: "/addresses/{email}/messages/{messageId}/headers"
tags: ["Messages"]
---

# Get parsed message headers

`GET /addresses/{email}/messages/{messageId}/headers`

Returns pre-parsed message headers in one of 3 formats - `json`, `json-ordered`, or `plain`.

If no querystring parameter is provided, the default format will be `json`.

Every email is different; fields in the below examples are not guaranteed to exist.

## Query parameters

- `messageHeadersFormat` 'json' | 'json-ordered' | 'plain'

## Response `200`

Message Headers

- union
  - object — SMTP headers are returned as json with header values grouped.
  - object — SMTP headers are returned as JSON maintaining their original order.

## Other responses

- `401` — Not authorized. You may need to log in first.
- `404` — Message not found by id...

---

[API](https://skmtc.net/mailsac/apis/mailsac-api-specification.md) · [All operations](https://skmtc.net/mailsac/apis/mailsac-api-specification/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mailsac/mailsac-api-specification/versions/5f8b55c76229/schema)
