# The mental model

> Five objects, one flow. Understand how a message travels from the sender's outbox to your code.

Inboundr has a small object model. Learn these five nouns and the rest of the
docs falls into place.

| Object | Id | What it is |
| --- | --- | --- |
| **Domain** | `dom_` | A domain you own and have verified. The root of everything. |
| **Address** | — | A specific mailbox on a domain, e.g. `agent@yourdomain.com`. |
| **Endpoint** | `ep_` | A webhook destination mail can be delivered to. |
| **Email** | `em_` | One parsed inbound message. |
| **Thread** | `thr_` | A group of emails that form one conversation. |

## The journey of a message

Here's what happens the moment someone emails an address on your domain:

<Steps>
  <Step title="Routing — where does it go?">
    Inboundr resolves the recipient in order: an explicit **address** route wins;
    otherwise the domain's **catch-all** endpoint; otherwise it's kept
    store-only. See [Addresses & routing](/concepts/addresses).
  </Step>
  <Step title="Parsing — turn MIME into JSON">
    The raw message is parsed into an **email**: from/to, subject, text and HTML
    bodies, attachment metadata, and SPF/DKIM/spam verdicts.
  </Step>
  <Step title="Threading — attach it to a conversation">
    Using the `Message-ID` / `In-Reply-To` / `References` headers, the email is
    placed on a **thread** — a new one, or the existing conversation it belongs
    to.
  </Step>
  <Step title="Surfacing — hand it to your code">
    If the route has an **endpoint**, a signed webhook fires. Either way the
    email is stored and readable via the [REST API](/api-reference/introduction)
    and [MCP](/integrations/mcp).
  </Step>
</Steps>

## Two ways to consume mail

Inboundr never makes you choose a single integration style — pick per address,
or use both at once.

<CardGroup cols={2}>
  <Card title="Push (webhooks)" icon="bolt">
    Route an address (or catch-all) to an [endpoint](/concepts/endpoints).
    Inboundr POSTs each message to your URL in real time. Great when you run a
    server.
  </Card>
  <Card title="Pull (store-only)" icon="database">
    Leave an address without an endpoint. Mail is parsed and stored; read it when
    you act with `list_emails` / `GET /v1/emails`. Great for agents and scripts.
  </Card>
</CardGroup>

<Card title="Next: Domains" icon="globe" href="/concepts/domains">
  Start at the root of the model — registering and verifying a domain.
</Card>
