Me Send DocsDashboard

Receiving and inboxes

Me Send can receive mail for addresses on your domains, keep it for you to read over the API, and file it into threaded inboxes.

Receiving routes

Mail sent to an address with a receiving route is stored and, if the route delivers to webhooks, announced with the email.received webhook. A route is an address (support@yourdomain.com) or a whole domain (*@inbound.yourdomain.com); a plus label such as support+order42@ matches support@. The operator of your project sets routes up. Creating an inbox adds one for its address.

A message over 25 MB, or one addressed to an address with no route, is refused at the door. Over the project's hourly receiving cap (500 an hour by default) the sender is told to try again later, so mail is deferred rather than lost.

The raw message, bodies and attachments are kept for 7 days.

Read received mail

const { data } = await resend.emails.receiving.get(emailId);
console.log(data.from, data.subject, data.text);

Inboxes

An inbox gives an address its own mailbox: incoming mail is filed into threads, you read and reply to them over the API, and an optional agent can label and draft. Inbox calls need a full-access key.

curl https://api.mesend.co/inboxes \
  -H "Authorization: Bearer $ME_SEND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"email_address":"support@yourdomain.com","name":"Support","from_name":"Acme Support"}'

The address must be on one of your verified domains.

Threads and folders

A reply is filed onto the thread of the message its In-Reply-To or References header names; anything else starts a new thread. A thread is in one of five folders: inbox, archive, spam, sent and trash. A new message on an archived or sent thread moves it back to inbox. Labels, read state and an assignee are set with PATCH /inboxes/:id/threads/:thread_id and the label endpoints.

Reply, forward and drafts

await fetch(`https://api.mesend.co/inboxes/${inboxId}/threads/${threadId}/emails/${emailId}/reply`, {
  method: 'POST',
  headers: { Authorization: `Bearer ${key}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({ text: 'Thanks, we are looking into it.' }),
});

A reply goes to the sender of the message (reply_all: true includes the other recipients). Replies, forwards and draft sends go out from the inbox address through the normal sending path, so caps, suppressions, test mode and idempotency apply exactly as on POST /emails. A forward needs to. Drafts are managed under /inboxes/:id/drafts: create, edit, delete and send.

The inbox agent

Each inbox has agent settings, GET and PATCH /inboxes/:id/agent: actions (add_labels and draft_reply; empty means off), tone and free-text instructions. The agent runs on each new message. It can attach labels that already exist and write a reply draft marked as coming from the agent. It never sends: a person approves every draft. Bulk mail, bounces and no-reply senders get no draft. Message text is treated as untrusted input.

Every inbox change also emits an inbox.* webhook.