# Set up a support inbox

URL: /systems/customer-service/set-up-a-support-inbox · Id: `guide:set-up-a-support-inbox` · Status: `live`

> Say "set up a support inbox" and get support@ at your domain, with every customer email answered by your agent within the hour.

Give customers one address to write to. Your agent answers each email within the hour and hands you the ones it should not answer alone.

Needs: [Connect my domain](/products/site/domains/connect-my-domain)

**Before it runs**

- You leave the chat: Never.
- What it costs: Nothing.
- To undo it: Retire the Mailbox. Open Conversations stay open.

## What you get
- 1 support address at your Domain (Mailbox)
- 1 Conversation per customer email, answered within the hour (Conversation)

## Your agent does
**For agents**

- Guide: `guide:set-up-a-support-inbox`, status `live`. Page: [/systems/customer-service/set-up-a-support-inbox.md](/systems/customer-service/set-up-a-support-inbox.md).
- Approval: none. Run it when the founder asks.
- Leaves the chat: never.
- Needs first: [Connect my domain](/products/site/domains/connect-my-domain).
- Run: call the steps in order, each through the API, SDK, CLI or MCP tab below; a later step passes the `$id` an earlier one returns. Each value marked example is the sample business’s: pass the founder’s own.

| Step | Verb | Inputs (type, required, this guide’s value) | Returns |
| --- | --- | --- | --- |
| 1 | [`Mailbox.create`](/business/nouns/mailbox/create) (`verb:Mailbox.create`) | `medium` string, required: example `"email"`; `address` email, required: example `"support@leaseline.app"`; `stream` string, required: example `"transactional"` | `mailbox` Mailbox |
| 2 | [`Setting.update`](/business/nouns/setting/update) (`verb:Setting.update`) | `id` string, required: example `"setting_mfZPXxFQYD"`; `key` string: example `"support.firstResponse"`; `value` json: example `"1h"` | `setting` Setting |

Returns: the last call answers with `setting` and its `action`, whose `status` is `done`, `pending` (waiting on an Approval or a Worker), `failed`, `canceled` or `refused`:

```json
{
  "api": "https://api.sb/leaseline.app",
  "setting": {
    "$id": "https://api.sb/leaseline.app/settings/setting_mfZPXxFQYD",
    "$type": "Setting",
    "key": "support.firstResponse",
    "value": "1h"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Setting.update",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}
```

Next: offer “Answer within 15 minutes during business hours”, or “Send every refund question to me”.

Calls: `Mailbox.create` → `Setting.update`

Ask:

```text
Set up a support inbox.
Answer my customers within an hour.
Answer support email for me.
```

API:

```bash
# 1. Mailbox.create
curl -X POST https://api.sb/leaseline.app/mailboxes \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"medium":"email","address":"support@leaseline.app","stream":"transactional"}'

# 2. Setting.update
curl -X PATCH https://api.sb/leaseline.app/settings/setting_mfZPXxFQYD \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"value":"1h","key":"support.firstResponse"}'
```

SDK:

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

await $.Mailbox.create({ medium: 'email', address: 'support@leaseline.app', stream: 'transactional' })
await $.Setting.update({ id: 'setting_mfZPXxFQYD', value: '1h', key: 'support.firstResponse' })
```

CLI:

```bash
npx startup-builder do Mailbox.create --json '{"medium":"email","address":"support@leaseline.app","stream":"transactional"}'
npx startup-builder do Setting.update --json '{"id":"setting_mfZPXxFQYD","value":"1h","key":"support.firstResponse"}'
```

MCP:

```json
{
  "name": "do",
  "arguments": {
    "code": "await $.Mailbox.create({ medium: 'email', address: 'support@leaseline.app', stream: 'transactional' })\nreturn await $.Setting.update({ id: 'setting_mfZPXxFQYD', value: '1h', key: 'support.firstResponse' })"
  }
}
```

## Change it
- Answer within 15 minutes during business hours.
- Send every refund question to me.
- Add a chat box to the site.

## Under the hood
- Systems: [Support](/systems/support), [Mailboxes](/systems/mailboxes)
- Nouns: [Mailbox](/business/nouns/mailbox), [Conversation](/business/nouns/conversation), [Message](/business/nouns/message)
- Events: `Mailbox.created`, `Setting.updated`

Each email opens a [Conversation](/business/nouns/conversation) in [Support](/systems/support). The first-response time is the `support.firstResponse` [Setting](/business/nouns/setting) of the Support [Process](/business/nouns/process).