---
title: Comprehend (BYO inbox)
description: Screen email you already have with POST /api/v1/comprehend — sanitization, injection scan, and optional extraction without provisioning a mailbox.
updatedAt: "2026-09-12"
---

# Comprehend (BYO inbox)

Keep AgentMail, Resend, Gmail, or any inbox you already run. When a message
arrives, POST its fields to Postfleet and get a trust report back. No MX
cutover, no mailbox provisioning, and no raw `.eml` in v1 — send `subject`,
`text`, `html`, and optional `attachment_text`.

## What runs

- **Sanitization and the heuristic injection scan** always run on what you send.
- **LLM injection scan** (and content-side Haiku spam scoring) run when your
  account quota admits. That reservation is one **`extractions`** unit — the
  same meter as hosted mailbox comprehension. You do **not** need
  `extraction_schema_id` for the scan. Quota miss → deterministic sanitization
  + heuristic only (unmetered).
- **Extraction** runs only when `extraction_schema_id` is supplied and that
  same reservation succeeded.
- **Malware is not evaluated** on this path. `virus_risk` is always `null`.
  Attachment scanning lives on the hosted inbound route, not here.
- **Spam** on the keyed route: content-side Haiku scoring runs when quota
  admits an LLM; SPF/DKIM/DMARC spam signals need `authentication_results`
  (the raw Authentication-Results header). Without quota, spam stays
  unevaluated unless you sent auth results.
- The public [security hub paste demo](/security#demo) forces a demo schema, so
  content spam scoring may run there too; malware is still not evaluated.

The Chrome extension calls `POST /api/v1/comprehend` with your API key (no
unkeyed demo path from the extension).

Full request and response shapes are in [`/openapi.json`](/openapi.json) under
the `comprehend` tag.

## Example

```bash
curl -sS https://api.postfleet.ai/api/v1/comprehend \
  -H "Authorization: Bearer pf_..." \
  -H "Content-Type: application/json" \
  -d '{"subject":"Re: Invoice #1844","text":"Thanks for the update, looks good."}'
```

Use an `api` or `mcp` scoped key. Bootstrap keys are rejected. Mailbox-bound
keys are allowed — you are submitting bytes, not reading a mailbox.
