# Give your agent an inbox

> Your agent gets its own address on `@zurchin.email` in a minute: no domain, no DNS. Connect Zurchin from your coding agent, any MCP client or the API, create an inbox, send, and read the replies.

Source: https://zurchin.com/docs/agent-builders

## 1. Connect Zurchin

Pick one. You need a Zurchin account, made with your email or Google at [zurchin.com/sign-in](https://zurchin.com/sign-in); the MCP server asks you to sign in the first time.

### Your coding agent

Paste this into Claude Code, Codex, Cursor or any agent that can read the web. It reads these docs and asks before it makes an account or touches DNS.

Give this to your coding agent:

```text
Give this agent an email inbox with Zurchin. Read https://zurchin.com/llms.txt and follow the Email guide. Ask me before creating an account or changing DNS.
```

### Any MCP client

Add `https://zurchin.com/mcp` (streamable HTTP). Your client signs you in the first time, or send an API key as `Authorization: Bearer pgn_…`. Then ask: “Make an inbox called scout and email ana@supplier.example from it.” Every tool: [The MCP server](https://zurchin.com/docs/sdks.md#mcp).

Claude Code:

```bash
claude mcp add --transport http zurchin https://zurchin.com/mcp
```

Other clients:

```json
{ "mcpServers": { "zurchin": { "url": "https://zurchin.com/mcp" } } }
```

### The API

Sign in, open **Settings → API keys** and make a key with **Admin** access: making inboxes needs it. It is shown once, as `pgn_…`. Keep it on your server as `ZURCHIN_API_KEY`. [API keys](https://zurchin.com/docs/api-keys.md)

TypeScript:

```bash
npm install @zurchin/sdk
```

Python:

```bash
pip install zurchin
```

## 2. Create an inbox

Give it a name: the part before the @. It is live at once on `zurchin.email`.

TypeScript:

```ts
import { Zurchin } from '@zurchin/sdk';

const zurchin = new Zurchin({ apiKey: process.env.ZURCHIN_API_KEY! });
const inbox = await zurchin.inboxes.create({ name: 'scout', displayName: 'Scout' });
```

Python:

```python
import os
from zurchin import Zurchin

zurchin = Zurchin(api_key=os.environ["ZURCHIN_API_KEY"])
inbox = zurchin.inboxes.create("scout", display_name="Scout")
```

curl:

```bash
curl https://zurchin.com/v1/email/inboxes \
  -H "Authorization: Bearer $ZURCHIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "scout", "display_name": "Scout"}'
```

Response 201:

```json
{
  "id": "5a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
  "address": "scout@zurchin.email",
  "kind": "agent",
  "display_name": "Scout",
  "pod_id": "7c6b5a49-3827-4161-9f0e-d1c2b3a49586",
  "agent_id": null,
  "status": "active",
  "hold_suspicious": true,
  "created_at": "2026-11-20T10:02:31.118Z"
}
```

Names are 1–64 of `a-z 0-9 . _ + -`. A name that is taken answers `409`; try another. Every field: [Create an inbox](https://zurchin.com/docs/email.md#create).

## 3. Send

TypeScript:

```ts
const sent = await zurchin.messages.send(inbox.id, {
  to: ['ana@supplier.example'],
  subject: 'Quote for 400 units',
  text: 'Hi Ana, could you send us a quote?',
});
// sent.status: 'sent', or 'held' while a person approves it
```

Python:

```python
sent = zurchin.messages.send(inbox["id"], to=["ana@supplier.example"],
                             subject="Quote for 400 units",
                             text="Hi Ana, could you send us a quote?")
```

curl:

```bash
curl https://zurchin.com/v1/email/inboxes/$INBOX_ID/messages \
  -H "Authorization: Bearer $ZURCHIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"to": ["ana@supplier.example"], "subject": "Quote for 400 units",
       "text": "Hi Ana, could you send us a quote?"}'
```

A new account sends to 50 people a day. A [verified domain](https://zurchin.com/docs/email.md#verify-domain) raises that, and time raises it again: [Limits by reputation](https://zurchin.com/docs/sending.md#limits). HTML, attachments, replies and drafts: [Send mail](https://zurchin.com/docs/sending.md).

## 4. Read the replies

Wait for mail: the call answers as soon as something arrives, or after `timeout` seconds (at most 50). Pass `next_since` back to wait for the next.

TypeScript:

```ts
const { data, next_since } = await zurchin.messages.await(inbox.id, { timeout: 50 });
for (const message of data) console.log(message.from.address, message.subject, message.text);

// Answer in the same thread
await zurchin.messages.send(inbox.id, {
  to: [data[0].from.address],
  text: 'Thanks, Ana. We’ll take them.',
  replyTo: data[0].id,
});
```

Python:

```python
page = zurchin.messages.wait(inbox["id"], timeout=50)
for message in page["data"]:
    print(message["from"]["address"], message["subject"], message["text"])

# Answer in the same thread
first = page["data"][0]
zurchin.messages.send(inbox["id"], to=[first["from"]["address"]],
                      text="Thanks, Ana. We’ll take them.", reply_to=first["id"])
```

curl:

```bash
curl "https://zurchin.com/v1/email/inboxes/$INBOX_ID/messages/await?timeout=50" \
  -H "Authorization: Bearer $ZURCHIN_API_KEY"
```

On a server, a [webhook](https://zurchin.com/docs/webhooks.md) tells you the moment mail arrives (`message.received`). Mail the [Firewall](https://zurchin.com/docs/email.md#firewall) calls suspicious waits for a person before the agent reads it.

## Next

- Send from your own domain: [Your own domain](https://zurchin.com/docs/email.md#domains).
- Have a person approve what matters: [Drafts and approval](https://zurchin.com/docs/sending.md#drafts).
- Try it with mail that never leaves Zurchin: [Test keys](https://zurchin.com/docs/email.md#test-mode).
- Give each of your users their own inboxes: [Platforms](https://zurchin.com/docs/platforms.md).
