# Inbound email

> Receive email with Sendtide: inbound domain, routes with webhook, forward, store or drop, confirming forward addresses and matching replies to the original mail.

URL: https://sendtide.ch/en/docs/inbound-email/

Sendtide also receives email, checks it and sends it to your application as JSON. Replies from your customers land where you need them, without a mail server of your own.
Receiving is included from the Start plan. Inbound mail is received by Sendtide’s own mail server in Geneva (planned hosting at Infomaniak), sending runs through Amazon SES in Zurich. On receipt, mail does not leave Switzerland, see [Regions and hosting](https://sendtide.ch/en/docs/regions-and-hosting/).
## Set up a receiving domain

Use a subdomain of your own for receiving, for example in.example.com. Do not use the domain your regular mailboxes run on, because the MX record sends all of its mail here.
- Add the domain and verify it as described in [Set up domains](https://sendtide.ch/en/docs/domains/).
- Turn receiving on:

```
curl -X PATCH https://api.sendtide.ch/v1/domains/in.example.com \
  -H "Authorization: Bearer $SENDTIDE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "inbound": true }'
```
- Set the new MX record from records (purpose inbound, priority 10, inbound.sendtide.ch) at your DNS provider.

From now on every email to anything@in.example.com arrives at Sendtide.
## Routes

A route decides what happens to an incoming email. It has a pattern (match, * stands for any characters), an action (action) and a position. The first matching route wins. Without routes, mail goes to your webhooks.
| Action | Effect |
| --- | --- |
| webhook | The email goes to your [webhooks](https://sendtide.ch/en/docs/webhooks/) as an email.received event. |
| forward | The email is forwarded to forward_to. |
| store | The email is only stored and fetched through the API. |
| drop | The email is dropped. |

```
curl https://api.sendtide.ch/v1/inbound/routes \
  -H "Authorization: Bearer $SENDTIDE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "match": "reply+*@in.example.com", "action": "webhook", "position": 1 }'
```

Example patterns: reply+*@in.example.com (replies to ticket emails), support@in.example.com (one mailbox), *@in.example.com (everything else).
## Forwarding and confirmation

A forward route sends the email on to another address. So that nobody floods foreign addresses with mail, the owner of the target address must confirm the forward:
- You create the route with forward_to. Sendtide mails a link to that address.
- The route stays inactive (forward_status: pending) until somebody confirms. In the meantime mail goes on to the next route or to the webhooks.
- The owner opens the link and clicks the button. The link only shows a page with a button, so mail scanners that open links confirm nothing.
- Then forward_status is confirmed and the route runs.

If forward_to changes, a new confirmation is needed. If you send forward_to again for an unconfirmed route, a fresh link goes out.

In addition:
- The forward is a normal email of your account: it counts against the quota (one recipient), skips suppressed addresses and waits while the account is paused or in review.
- An address on a domain that receives mail at Sendtide is refused (422).
- Forwarded mail carries X-Sendtide-Forwarded and Auto-Submitted: auto-forwarded. Mail that already carries this header is dropped. That stops forwarding loops.
- If an email could not be forwarded (suppressed address, paused account, quota used up), it is stored in your account with action: forward_blocked.
## The email.received event

```
{
  "id": "evt_inb_4k2v9a",
  "type": "email.received",
  "created_at": "2026-12-01T08:12:40Z",
  "data": {
    "id": "inb_4k2v9a",
    "from": "anna@example.org",
    "to": ["reply+msg_8kq2m4bt@in.example.com"],
    "subject": "Re: Your order",
    "text": "Thanks, that works!\n\nOn Dec 1 Acme wrote: …",
    "html": "<p>Thanks, that works!</p>…",
    "stripped_text": "Thanks, that works!",
    "original_email_id": "msg_8kq2m4bt",
    "attachments": [],
    "headers": { "Message-Id": "<…>", "In-Reply-To": "<…>" }
  }
}
```
- stripped_text is the reply without the quoted original. That is what you usually want.
- html is empty when it is larger than 256 KB. You then fetch the full content through the API.
- The mail server checks for spam and viruses on receipt (SpamAssassin and ClamAV). Mail recognized as spam is rejected and never reaches your account, so every email you get has passed this check. The event carries no spam, virus, SPF, DKIM or DMARC verdicts. If you need them, evaluate the email’s headers yourself.

Security: The content comes from outsiders. Treat it as untrusted input: never display HTML unchecked, never open attachments automatically, never hand text to an AI assistant as an instruction without checking.
## Match replies

If a reply goes to an address of the form reply+<email-id>@in.example.com, Sendtide recognizes the original email and puts its id in original_email_id. That lets you match a reply to the right order or ticket in your application. You know the id (msg_…) from the answer to the send; for follow-up emails of a ticket you set it as reply_to.
## Fetch through the API

```
curl https://api.sendtide.ch/v1/inbound/emails \
  -H "Authorization: Bearer $SENDTIDE_API_KEY"

curl https://api.sendtide.ch/v1/inbound/emails/inb_4k2v9a \
  -H "Authorization: Bearer $SENDTIDE_API_KEY"
```

The list takes limit and cursor ([Pagination](https://sendtide.ch/en/docs/pagination/)). Every email carries the action that ran (webhook, forward, forward_blocked, store or drop).
