# A business inbox at your own domain: hello@yourcompany.com

> Set up a real business inbox at your own domain to receive, read, and reply as hello@yourcompany.com using the console, CLI, or an AI agent.

**You can set up a business inbox at your own domain by adding an email mailbox in thelastapi and pointing five DNS records to route mail, sign DKIM, and handle bounces.** Once verified, you can read incoming messages in the web console, send replies directly from `hello@yourcompany.com`, or let your AI agents manage support threads. If you bought your domain through thelastapi, those DNS records are written automatically without touching a DNS control panel.

This guide covers how to set up an inbox at your own domain, the DNS records required, how to read and send messages from the terminal or code, and how agents interact with your mail.

## Why a built-in inbox instead of separate accounts

Most businesses end up buying email hosting from one company, a transactional sending service from another, and an email forwarding tool from a third. Connecting those pieces creates extra maintenance:

- **Separate logins and bills.** Managing team mailboxes on a standalone email suite requires another subscription, separate admin consoles, and per-seat fees.
- **Fragmented reputation.** Transactional app emails and business correspondence end up on mismatched infrastructure, requiring multiple sets of SPF and DKIM records on your apex domain.
- **Agent access is difficult.** Giving an AI assistant access to an external email service often involves brittle browser automation or full-access API keys that risk destructive actions.

With thelastapi's [Email](https://thelastapi.dev/docs/email) resource, your business mailboxes, forwarding rules, transactional mail, and newsletter infrastructure share a single unified dashboard and API key.

## Adding a mailbox at your domain

To create an address like `hello@yourcompany.com`, add the mailbox using the CLI or the console under **Inbox ▸ Mailboxes**. You must use an account key with full access or owner permissions:

```bash
vibiz email mailbox add hello@sellshelf.app --name "Sell Shelf"
```

To catch messages sent to any unassigned address across the domain, you can also add a catch-all mailbox:

```bash
vibiz email mailbox add '*@sellshelf.app' --name "Catch-All"
```

If your domain was purchased via `vibiz domains buy`, all the required DNS entries are configured for you instantly. If your domain is registered elsewhere, thelastapi provides the DNS entries you need to publish.

## The DNS records you need

Receiving mail, passing spam filters, and signing your outbound messages requires five specific records in your DNS management interface:

| For | Type | Name | Value / What it does |
| --- | --- | --- | --- |
| Receive | `MX` | `@` | Routes incoming messages for the domain directly to thelastapi |
| Receive / Sign | `CNAME` ×3 | `<token>._domainkey` | Proves domain ownership and signs outgoing mail with DKIM |
| Send | `MX` | `bounce` | Receives delivery failure notifications and bounce events |
| Send | `TXT` | `bounce` | `v=spf1 …`: Authorizes sending for `bounce.yourcompany.com` so SPF and DMARC align |
| Recommended | `TXT` | `_dmarc` | `v=DMARC1; p=none;` (recommended if no DMARC record exists yet) |

Check the verification status of your domain at any time:

```bash
vibiz email dns sellshelf.app --check
```

The CLI inspects each record and reports whether it is *Found*, *Missing*, or has a *Different value*. 

If the domain already receives mail through an existing provider, the system will not overwrite your configuration silently. You will see a warning listing the existing mail servers. To confirm the migration, pass the `--replace-mx` flag in the CLI, use the console confirmation, or call `POST /v1/inbox/domains/:domain/replace-mx`.

## Reading and replying to conversations

Once your DNS records verify, incoming messages appear in the **Inbox** tab of your console and in the CLI.

### From the terminal

List recent conversations across all folders:

```bash
vibiz email inbox
```

Read an entire thread by its thread ID:

```bash
vibiz email read mthr_123 --read
```

Reply to the sender, keeping the email quoted and correctly threaded using standard headers (`In-Reply-To` and `References`):

```bash
vibiz email reply mthr_123 --text "Thanks for reaching out. We are looking into this."
```

Send a new outbound email directly from your custom mailbox:

```bash
vibiz email send --from hello@sellshelf.app --to ana@example.com --subject "Partnership Inquiry" --text "Hi Ana, following up on our call."
```

Move threads between folders (`inbox`, `archive`, `spam`, `trash`) or flag them:

```bash
vibiz email mark mthr_123 --folder archive --star
```

### Over HTTP

You can integrate your inbox into custom admin tools or scripts using the REST API:

```bash
curl https://thelastapi.dev/v1/inbox/threads \
  -H "Authorization: Bearer $VIBIZ_API_KEY"
```

To send an outbound message via HTTP, include an `Idempotency-Key` header so retries cannot duplicate the email:

```bash
curl https://thelastapi.dev/v1/inbox/send \
  -H "Authorization: Bearer $VIBIZ_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: msg-out-456" \
  -d '{
    "from": "hello@sellshelf.app",
    "to": "ana@example.com",
    "subject": "Order Confirmation",
    "text": "Your order is confirmed."
  }'
```

For sending transactional notifications directly inside your application code rather than conversational mail, see [send transactional email from your app without touching DNS](https://thelastapi.dev/blog/send-transactional-email-no-dns) and [send a welcome email from a Next.js app](https://thelastapi.dev/blog/welcome-email-nextjs).

## Keeping mail in your inbox vs. forwarding

You do not have to choose between a web inbox and forwarding; you can use both. If you prefer to receive incoming inquiries in an existing personal email account, you can set up a forwarding rule instead of checking the dashboard manually:

```bash
vibiz email forward hello@sellshelf.app me@gmail.com
```

When forwarded, the email retains the sender's details ("Ann Smith via thelastapi"), and pressing reply sends your response directly back to Ann. To learn how to configure rules and verify recipient addresses, read how to [forward hello@yourdomain.com to the inbox you already use](https://thelastapi.dev/blog/forward-domain-email-to-gmail).

## Letting AI agents read and reply safely

AI agents can triage your inbox, draft responses, and mark threads without human intervention. By default, agent access is enabled for mailboxes (**Inbox ▸ Settings ▸ Agents may read and reply here**).

Agents use five dedicated commands:
- `vibiz_inbox_threads` to check conversations
- `vibiz_inbox_read` to fetch thread contents
- `vibiz_inbox_reply` to send a response
- `vibiz_inbox_send` to initiate new emails
- `vibiz_inbox_mark` to archive, trash, or star threads

To protect your system from prompt injection, thelastapi strips executable markup and tags all received email bodies as untrusted input. The system enforces strict boundaries: agents cannot create new mailboxes or alter domain DNS records. If an agent attempts an administrative action, the API returns an `owner_only` error containing a console link where the account owner can review and approve the proposal.

If you are building an application for enterprise teams, you may also want to enforce domain-level restrictions on who can access your product; see [restrict sign-up to your company's email domain](https://thelastapi.dev/blog/restrict-sign-up-email-domain).

## Inbox limits, security, and spam handling

Every business mailbox operates under the following safeguards and operational limits:

- **Daily sending volumes:** Each mailbox can send up to 200 messages per UTC day, with an account ceiling of 1,000 messages per UTC day. Hitting this ceiling returns a `429 rate_limited` response with a `resets_at` timestamp.
- **Size and attachments:** Attachments can be up to 15 MB per file, with a maximum message size of 20 MB. Attachment links remain valid for one hour.
- **Recipients:** Up to 50 recipients per individual message.
- **Spam isolation:** Incoming mail that fails spam checks, contains viruses, or fails domain authentication policies is routed to the **Spam** folder. Executable attachments (`.exe`, `.js`, `.bat`) are dropped entirely.
- **Retention:** Messages in the **Spam** and **Trash** folders are permanently deleted after 30 days. Everything else stays until you remove it.
- **Reputation protection:** If an account experiences an excessive bounce rate or high spam complaint rate, outbound sending is paused (`403 sending_paused`) while incoming mail continues to be delivered.

If you don't need a custom domain immediately and simply need an isolated email address for an automated testing script or personal agent, you can create a shared-domain inbox:

```bash
vibiz email personal lautaro
# Gives: lautaro@agent.vibiz.app (sends up to 20 emails a day)
```

To launch your custom inbox, claim your business domain or configure your existing DNS records inside the dashboard today.

## Frequently asked questions

### How many messages can I send each day from my custom mailbox?

Each individual mailbox can send up to 200 messages per UTC day, and the entire account has a maximum limit of 1,000 outbound messages per UTC day across all mailboxes.

### What happens if someone sends an executable attachment or malware to my inbox?

Incoming messages with viruses have their attachments stripped and are sent to the Spam folder, while executable files like `.exe` or `.js` are dropped entirely.

### Can an AI agent configure mailboxes or change MX records automatically?

No, creating mailboxes and updating domain MX records are owner-only actions; an agent attempting them receives a `403 owner_only` error containing a link for the account owner to review and confirm.

---

Published 2026-11-15 · https://thelastapi.dev/blog/business-inbox-own-domain
