Documentation

The lean format

Pombus can serve mail in a short format made for language models. It keeps who wrote, when, the new text and the attachments. It leaves out what a model pays for and does not need: quoted history, raw HTML, long tracking URLs, empty fields.

The MCP tools always use this format. On the HTTP API you ask for it with a query parameter.

How to ask for it

Add projection=ai to a read of messages or threads:

curl "https://mail-api.pombus.com/v0/inboxes/inb_your_id/messages/msg_Tq3...?projection=ai" \
  -H "Authorization: Bearer pmb_your_key"
ParameterEffect
projection=aiThe lean format described on this page.
projection=fullThe long format, with the original text and html.
links=fullWith projection=ai: every URL in md stays whole.

view=ai is an older name for projection=ai. It still works. Use projection.

One message

{
  "frm": "Ana Souza <[email protected]>",
  "ts": "2026-11-21T08:42Z",
  "env": "[email protected]|[email protected]",
  "auth": "spf=pass dkim=pass dmarc=pass",
  "first": true,
  "md": "Hi,\n\nThe invoice for November is attached. Pay it here: [payment page](L1 pay.example.com)\n\nAna",
  "att": [
    {
      "id": "9f2c41d07ab3",
      "file": "invoice-november.pdf",
      "ct": "application/pdf",
      "sz": 48211,
      "md": "INVOICE 2026-118\nTotal due: 1,240.00"
    }
  ],
  "tid": "thr_9bK...",
  "to": ["[email protected]"]
}
FieldMeaningPresent when
frmThe From header: name and address.Always, unless the From could not be read.
fdomThe sender's domain.Only when it differs from the domain in frm.
tsTime of the message in UTC, to the minute.Always.
dirout for a message sent from this inbox.Only for sent messages.
envSMTP envelope as recipient|mail_from.Received messages.
authSPF, DKIM and DMARC results in one string.When there is a verdict.
risk{"level": "medium" or "high", "reason": "..."}.Only when the level is not none.
firsttrue: first mail from this sender's domain to this inbox.Only when true.
lookThe domain of a known contact that the sender's domain resembles.Only when set.
look_muttrue: both domains are already known to this inbox.Only when true.
mdThe body without quoted history.When the message has text.
body_omittedThe body was left out of a thread read. Read the single message.Only when true.
attThe attachments. See Attachments.When there are any.
att_omNumber of attachments left out of the answer.Only when not zero.
att_trunctrue: the attachment list was cut.Only when true.
tidThe thread id.Single message reads and list items.
to, ccRecipients.Single message reads. In a thread, only what differs.

Sender signals explains auth, env, risk, first and look.

A field that is empty or false is not sent. Absent means empty. For risk, absent means none, which is not the same as "safe".

One thread

A thread states once what all its messages share. Each message then carries only what changes.

{
  "tid": "thr_9bK...",
  "inb": "inb_your_id",
  "subj": "Invoice for November",
  "to": ["[email protected]"],
  "sha": "5d41c2...",
  "pv": "pombus-mime/6",
  "budget": { "unit": "chars", "body_cap": 100000, "att_cap_each": 20000, "body_omitted": false, "att_truncated": false },
  "msgs": [
    { "frm": "Ana Souza <[email protected]>", "ts": "2026-11-21T08:42Z", "auth": "spf=pass dkim=pass dmarc=pass", "md": "Hi, the invoice is attached." },
    { "frm": "[email protected]", "ts": "2026-11-21T09:10Z", "dir": "out", "to": ["[email protected]"], "md": "Thanks, paid today." }
  ]
}
FieldMeaning
tid, inb, subjThread id, inbox id, subject.
toThe recipients of the first message. Each message lists only recipients that are not in this list.
sha, pvSHA-256 of the original bytes of the newest message served, and the parser version. For audit.
curCursor for older messages. Pass it as before_id. Absent when there are none.
budgetWhat was cut, for a program to read. body_omitted: true means at least one body was left out. att_truncated: true means at least one attachment list was cut.
msgsThe messages.

A thread read returns up to 100 messages. The bodies of one thread read share a budget of about 4 MB. A message over that budget comes with body_omitted: true and no md. Read that message alone to get its body.

Lists and searches return one triage line per item, with no body.

A message line has id, tid, subj, snip (a preview), labels, att (file names only), the sender fields of the table above, and to when the message was sent from this inbox. In a list, env drops the recipient when it is the address of the inbox: |[email protected].

A thread line has tid, subj, snip, ts (last activity), n (number of messages; n_cap means there are more than counted), frm (the senders), labels, and the thread's signals: risk is the highest of its messages, first is true if any message has it, look and look_mut come from the newest message. Lists that cover several inboxes add inb.

A list line does not say whether an attachment's text is complete. Read the message for that.

What is removed

RemovedRule
Quoted linesEvery line that starts with >.
Reply historyEverything from a reply banner down: "On ... wrote:" in English, and the same line in Portuguese, Spanish, French and German.
"Original Message" dividerEverything from the divider down, in English, Portuguese or Spanish. Also from a line of five or more underscores.
Quoted header blockEverything from a block of at least two header lines of one language (From, Sent, To, Subject, Cc), the way Outlook quotes.
Delimited signatureEverything from the standard signature delimiter down: a line with two hyphens.
Raw text and htmlNot sent. md replaces them.
Long URLsA URL of more than 40 characters becomes a reference such as (L1 pay.example.com). The host is where the link really points.
Empty and default fieldsNot sent.
Seconds and time zonets is UTC to the minute.

What is kept whole

If stripping would leave nothing, Pombus serves the whole text instead.

References and escaped text

(L3 host) is link 3 of that message. To get the URLs, read the message again with links=full.

A sender can write text that looks like a reference. Pombus puts a backslash in front of it: \(L1. A backslash before (, a letter and a digit always marks text the sender wrote. The same escape applies to attachment text. With links=full, nothing is escaped.

When to ask for the original

You needAsk for
The URLs behind the referencesThe same read with links=full.
The quoted history, or the HTMLThe same read with projection=full.
The exact bytes that arrivedGET /v0/inboxes/{inbox_id}/messages/{message_id}/raw.
The file of an attachmentget_attachment. See Attachments.

Token cost

We used 42 emails from a test inbox we wrote (41 reads: two identical newsletters share one thread). Reading them one by one through Pombus used 76% fewer tokens than reading the same emails through the Gmail connector in Claude. We measured this on 22 November 2026 with Anthropic's token counter.

The figure is for reading. Listing the inbox is not part of it. The count covers what the tools return and does not include the tool descriptions. Your result depends on your mail.