Message categories
Wake on the mail that needs you.
A header heuristic, not a safety verdict. Markdown: /docs/message-categories.md · message reference.
The categories
Every inbound email has category and category_signals. category is one of human, auto_reply, bounce, verification, list, or notification. category_signals is a short list of the markers that produced it, such as header:auto-submitted, header:list-unsubscribe, subject:out-of-office, from:mailer-daemon, otp, or verification-link. Outbound mail and messages that are not email leave both null.
The value is chosen from headers and a few body checks. There is no model call. An agent can wake, pause, or skip from the field alone.
Precedence
The first match wins. bounce, then auto_reply, then verification, then list, then notification, then human.
bounce: Content-Type is multipart/report with report-type=delivery-status, or From is mailer-daemon@ or postmaster@ and the subject looks like a delivery failure, or Return-Path is empty (<>) and the body looks like a delivery status.
auto_reply: Auto-Submitted is auto-replied, or X-Autoreply or X-Autorespond is set, or X-Auto-Response-Suppress contains OOF or All, or Precedence is auto_reply, or the subject starts with Automatic reply, Out of Office, Auto:, or Autoreply.
verification: the same code and link scan used on the message found a one-time code or an https verification link. A code adds the signal otp. A link adds verification-link.
list: List-Id or List-Unsubscribe is set, or Precedence is bulk, list, or junk.
notification: Auto-Submitted is auto-generated, or the sender local part is noreply, no-reply, do-not-reply, donotreply, notifications, notification, alerts, alert, bounce, bounces, mailer-daemon, or postmaster.
human: nothing above matched. category_signals is an empty array.
An out-of-office note that also has List-Unsubscribe is auto_reply. A verification email that also has List-Unsubscribe is verification. A personal note with none of these markers is human.
Wake only on human mail
A message.received webhook body is the message. data.category is the field to branch on. The event log and event consumers store the same value on data.message.category. Skip anything that is not human, then read the message when you do wake.
GET /api/v1/inboxes/{id}/messages?category=human returns stored human mail. A comma list is allowed, for example category=human,verification. An unknown value is HTTP 400 invalid_category. The error includes action listing the six values. GET /api/v1/inboxes/{id}/wait and MCP cooper_list_messages and cooper_wait_for_message take the same category argument.
// webhook: wake only when a person wrote
export async function POST(request) {
const event = await request.json();
if (event.type !== "message.received") return new Response("ok");
if (event.data.category !== "human") return new Response("skipped");
return new Response("wake");
}
curl -s "https://cooperemail.com/api/v1/inboxes/$INBOX/messages?category=human" \
-H "Authorization: Bearer $COOPER_API_KEY"What the filter does not see
category is stored when the message is received. GET, list, batch-get, and wait compute category for an inbound email whose stored value is null, so mail from before this field still shows a category when you read it. The ?category= filter, and a wait that passes category, match the stored column only. Those older rows are not returned by the filter.
This is not a spam verdict and not a safety verdict. It does not decide whether mail is suspicious, and it does not hold mail. Inbound screening still sets safety. Hold mode still stores suspicious mail with the held label and fires message.held instead of message.received. The suspicious and held labels are unchanged. Read safety on the message, and see GET /api/v1/inboxes/{id}/messages/{msgId}.