# Mailbox

URL: /business/nouns/mailbox · Id: `noun:mailbox`

> A Mailbox is an email Channel at a Domain, held by a Startup, a Role, or a Worker, so every Agent has its own.

A Mailbox is an email [Channel](/business/nouns/channel) at a [Domain](/business/nouns/domain), held by a [Startup](/business/nouns/startup), a [Role](/business/nouns/role), or a [Worker](/business/nouns/worker), so every [Agent](/business/nouns/agent) has its own.

## Properties
| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `address` | `email` | Yes | The email address. |
| `stream` | `string` | Yes | What it sends: receipts and resets, broadcasts, or cold outbound; one stream per Mailbox. |
| `dailyCap` | `integer` | No | Sends allowed today, raised by the warmup ramp and cut by the brakes. |
| `status` | `string` | No | Where the Mailbox stands in its warmup and rest cycle. |
| `tenant` | [Tenant](/business/nouns/tenant) | No | The Tenant it sends for, at a Domain that Tenant’s Customer holds; replies land in the Tenant’s Threads. |

<details>
<summary>Inherited from [Channel](/business/nouns/channel): 5 properties</summary>

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `medium` | `string` | Yes | The platform type, such as `email`, `sms`, or `chat`. |
| `organization` | [Organization](/business/nouns/organization) | No | The outside Organization the Channel is shared with; its new Messages open Conversations for that Customer. |
| `external` | `boolean` | No | True when people from another Organization post in it, as in a channel two companies share. |
| `areaCode` | `string` | No | For an `sms` Channel, the phone area code its number is drawn from, such as `512`. |
| `number` | `string` | No | For an `sms` Channel, its phone number in international form, assigned when it is created. |

</details>

## Object
```json
{
  "$id": "https://api.sb/tutorloop.com/mailboxes/mailbox_1",
  "$type": "Mailbox",
  "medium": "email",
  "organization": "organization_1",
  "external": true,
  "areaCode": "Example area code",
  "number": "Example number",
  "address": "malik@tutorloop.com",
  "stream": "transactional",
  "dailyCap": 1,
  "status": "warming",
  "tenant": "tenant_1"
}
```

## Relationships
- <a id="rel-belongs-to"></a>A Mailbox **belongs to** one [Worker](/business/nouns/worker): every [Worker](/business/nouns/worker), [Agent](/business/nouns/agent) or [Human](/business/nouns/human), has its own Mailbox. `belongsTo`, inverse [`mailbox`](/business/nouns/worker#rel-mailbox).

## Lifecycle

| State | Meaning | Moves to |
| --- | --- | --- |
| `warming` (first) | Its daily sends ramp toward its cap over two to four weeks. | `active` by [Mailbox.warm](/business/nouns/mailbox/warm); `retired` by [Mailbox.retire](/business/nouns/mailbox/retire) |
| `active` | It sends up to its cap while its readings stay inside their brakes. | `resting` by [Mailbox.rest](/business/nouns/mailbox/rest); `retired` by [Mailbox.retire](/business/nouns/mailbox/retire) |
| `resting` | A brake fired, so it sends nothing until the reading clears. | `active` by [Mailbox.warm](/business/nouns/mailbox/warm); `retired` by [Mailbox.retire](/business/nouns/mailbox/retire) |
| `retired` | It sends nothing again; its address, Messages and sending history stay. | None: it ends here. |

## Verbs
| Verb | Description | Subject | Event | Class |
| --- | --- | --- | --- | --- |
| [Mailbox.rest](/business/nouns/mailbox/rest) | Rest pauses a Mailbox’s sending when a brake fires and resumes it when the reading clears. | [Customer Lead](/agents/customer/customer-lead) | [`Mailbox.rested`](/business/events/Mailbox.rested) | Two-way: `try`, `send`, `do` |
| [Mailbox.retire](/business/nouns/mailbox/retire) | Retire stops a Mailbox for good and keeps its address, Messages and sending history. | [Customer Lead](/agents/customer/customer-lead) | [`Mailbox.retired`](/business/events/Mailbox.retired) | One-way: `send`, `do` |
| [Mailbox.warm](/business/nouns/mailbox/warm) | Warm ramps a new Mailbox from a few sends a day to its cap over two to four weeks. | [Customer Lead](/agents/customer/customer-lead) | [`Mailbox.warmed`](/business/events/Mailbox.warmed) | Two-way: `try`, `send`, `do` |
| <a id="create"></a>[Mailbox.create](/business/nouns/mailbox/create) | Creates a Mailbox. Inherited from [Noun](/business/nouns/noun). | None. | `Mailbox.created` | Two-way: `try`, `send`, `do` |
| <a id="get"></a>[Mailbox.get](/business/nouns/mailbox/get) | Returns one Mailbox by id. Inherited from [Noun](/business/nouns/noun). | None. | None. | Read: `try`, `do` |
| <a id="list"></a>[Mailbox.list](/business/nouns/mailbox/list) | Returns Mailboxes, newest first, one page at a time. Inherited from [Noun](/business/nouns/noun). | None. | None. | Read: `try`, `do` |
| <a id="update"></a>[Mailbox.update](/business/nouns/mailbox/update) | Changes the given properties of a Mailbox. Inherited from [Noun](/business/nouns/noun). | None. | `Mailbox.updated` | Two-way: `try`, `send`, `do` |

A Mailbox is never deleted: it ends by [Mailbox.retire](/business/nouns/mailbox/retire), and its records stay.

## Permissions
Which Access level may call each Verb. One-way Verbs wait their delay window.

| Operation | `owner` | `admin` | `member` | `viewer` |
| --- | --- | --- | --- | --- |
| `Mailbox.create` | Yes | Yes | Yes | No |
| `Mailbox.get` | Yes | Yes | Yes | Yes |
| `Mailbox.list` | Yes | Yes | Yes | Yes |
| `Mailbox.update` | Yes | Yes | Yes | No |
| `Mailbox.rest` | Yes | Yes | Yes | No |
| `Mailbox.retire` | Yes | No | No | No |
| `Mailbox.warm` | Yes | Yes | Yes | No |

## Call it

**Ask**

```text
Warm my mailbox.
```

**API**

```bash
curl -X POST https://api.sb/ledgerlark.com/mailboxes/mailbox_1/warm \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"cap":1}'
```

```json
{
  "api": "https://api.sb/ledgerlark.com",
  "mailbox": {
    "$id": "https://api.sb/ledgerlark.com/mailboxes/mailbox_1",
    "$type": "Mailbox",
    "medium": "email",
    "address": "priya@ledgerlark.com",
    "stream": "transactional"
  },
  "action": {
    "$id": "https://api.sb/ledgerlark.com/actions/action_1",
    "operation": "Mailbox.warm",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/ledgerlark.com/actions/action_1"
  }
}
```

**SDK**

```ts
import { $ } from 'startup-builder'

const mailbox = await $.Mailbox.warm({ mailbox: 'mailbox_1', cap: 1 })
```

**CLI**

```bash
npx startup-builder do Mailbox.warm --json '{"mailbox":"mailbox_1","cap":1}'
```

**MCP**

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.Mailbox.warm({ mailbox: 'mailbox_1', cap: 1 })"
  }
}
```

## Example
`susan@lessonloft.app` is the Mailbox of Susan, the [Customer Lead](/agents/customer/customer-lead) of a lesson-booking [App](/business/nouns/app). Teachers' replies to her land there, not in a shared inbox.