# Frostmailer API

Order cold-email infrastructure, track it, and read your inboxes and domains programmatically, from your own code or any AI tool (Claude, Cursor, Codex).

- **Base URL:** `https://app.frostmailer.com/api/v1`
- **Auth:** `Authorization: Bearer fm_live_...` on every request
- **Format:** JSON request and response bodies (`Content-Type: application/json`)
- **Currency:** all amounts are in cents, in your account's currency (EUR unless agreed otherwise)

---

## How it works

Frostmailer provisions Microsoft (Outlook, also called Azure) or Google Workspace mailboxes on their own domains, with DNS authentication (SPF, DKIM, DMARC) pre-configured, ready to plug into any sending tool.

**Domains, two ways:**

- **Buy** (`domain_mode: "buy"`, the default): we register the domains for you. Google buy adds a one-time domain registration fee at checkout; Microsoft includes the domain.
- **Bring your own** (`domain_mode: "byo"`): you use domains you already own and pass a `hosting` object (where they are hosted plus login/password or backup codes) so we can configure DNS. No domain fee, you just pay the monthly subscription.

The resource model:

- **Order**: one purchase of N inboxes on M domains. Has a status that moves through a lifecycle (see Statuses).
- **Domain**: a sending domain attached to an order.
- **Inbox**: a single mailbox on a domain (email address + sender persona).
- **Account**: your profile and a live summary of active orders.

**The ordering + payment flow:**

1. Optional: `POST /domains/suggest` for free domain names, and `POST /orders/quote` for the exact price (nothing is created).
2. `POST /orders` with the product, inbox count, domains, and sender personas.
3. The API prices the order server-side, then either:
   - returns a `checkout_url` (a Stripe payment link) with status `awaiting_payment`. You open that link and pay. **Nothing is provisioned until payment completes.** Or,
   - with `"payment": "saved_card"` (on accounts where it is switched on, see Saved-card payment), charges the card on file and returns status `pending` straight away.
4. Once paid the order is `pending` and enters fulfilment. Track it with `GET /orders/{id}`.
5. When it reaches `completed`, `GET /orders/{id}/inboxes` and `GET /domains` return the live mailboxes and domains.

There is no way to place an order without paying. Order status and price cannot be set by the caller, they are computed server-side, and only a completed Stripe payment moves an order out of `awaiting_payment`.

**Building automation** (for example, replacing domains when placement drops): call `/orders/quote` to check the price against your budget, `/domains/suggest` to get names in one call, then `POST /orders` with `"payment": "saved_card"` and `max_amount_cents` so the order is refused, not created, if it would cost more than you allow.

---

## Get set up in 5 minutes (paste into Claude or Codex)

New to this? You do not need to read the whole reference. Open Claude Code, Claude Desktop, Cursor, or Codex and paste the prompt below. It acts as your setup guide and walks you through everything, one step at a time.

```
I want to connect Frostmailer to this tool so I can order cold-email inboxes
right here. Act as my setup guide: walk me through it one step at a time, and
wait for me to confirm each step before moving to the next.

Steps:
1. Check I have Node.js 18+ (have me run: node --version). If it is missing,
   point me to https://nodejs.org to install it.
2. Tell me to create an API key at https://app.frostmailer.com/developers, copy
   it (it starts with fm_live_ and is shown only once), and paste it back to you.
3. Connect the Frostmailer MCP server:
   - Claude Code: give me the exact terminal command:
     claude mcp add --env FROSTMAILER_API_KEY=<my key> --transport stdio frostmailer -- npx -y frostmailer-mcp
   - Claude Desktop / Cursor / Codex: give me the JSON to paste into my MCP
     config, and tell me where that config file lives for my specific tool.
4. Have me restart or reload the tool, then confirm the "frostmailer" tools show
   up (get_account, create_order, check_domain, list_orders, and so on).
5. Run a safe check: call get_account and show me my profile to prove it works.
6. Explain how to order: I tell you the product (Microsoft or Google), how many
   inboxes, whether to buy domains from you or bring my own (with hosting
   details), and my sender names. You call create_order and hand me the Stripe
   checkout link to pay. Remind me nothing is provisioned until I pay.

Begin with step 1 now.
```

Prefer to set it up by hand? The exact commands are in the MCP section below.

---

## Authentication

Create keys on the [API & MCP page](https://app.frostmailer.com/developers). The plaintext key is shown once at creation, store it somewhere safe. Send it as a bearer token on every request:

```
Authorization: Bearer fm_live_...
```

Notes:

- Keys are scoped to your account. Every response only ever returns your own data.
- Only a SHA-256 hash of the key is stored, we cannot recover a lost key. Create a new one and revoke the old.
- Revoke a key any time on the API & MCP page. Revoked keys immediately return `401`.

---

## Rate limits

Per API key, per minute:

| Type | Limit |
| --- | --- |
| Reads (GET) | 120 / min |
| Writes (POST) | 30 / min |

Over the limit returns `429` with a `Retry-After` header (seconds) and body `{ "error": "rate_limited", "retry_after_seconds": N }`.

---

## Errors

Non-2xx responses are JSON: `{ "error": "snake_case_code", "message"?: "...", "issues"?: {...} }`.

| HTTP | error | Meaning |
| --- | --- | --- |
| 400 | `invalid_request` | Body failed validation. `issues` (zod) or `message` explains what. |
| 401 | `unauthorized` | Missing, malformed, unknown, or revoked API key. |
| 402 | `over_cap` | A saved-card order would take your charges over your 30-day cap. Includes `cap_cents`, `charged_last_30_days_cents`, `order_cents`. No order was created. |
| 403 | `auto_charge_disabled` | `"payment": "saved_card"` on an account where it is not switched on. Contact support. No order was created. |
| 403 | `byo_not_allowed` | Bring-your-own domains are not enabled for Microsoft on your account. |
| 404 | `not_found` | The resource does not exist, or is not yours. |
| 409 | `domain_taken` | One of the requested domains is already reserved in Frostmailer. |
| 409 | `out_of_stock` | Pre-warmed only: not enough stock. Includes `requested`, `available`, `warming`. No order was created. |
| 409 | `already_cancelled` | The order is already cancelled. |
| 422 | `over_budget` | The first invoice would exceed your `max_amount_cents`. Includes the `quote`. No order was created. |
| 429 | `rate_limited` | Too many requests. See `retry_after_seconds`. |
| 500 | `order_create_failed` / `query_failed` | Server error, safe to retry. |
| 502 | `checkout_failed` / `check_failed` | An upstream (Stripe / registrar) call failed, retry. |
| 502 / 409 | `charge_unknown` | Saved card: the payment provider did not answer, so we can't confirm whether the card was charged. The order is held for our team to check (we are alerted). Retrying with the same `Idempotency-Key` returns 409 until it is resolved; do not retry with a new key before checking your invoices. |
| 503 | `payment_unavailable` | Payments are temporarily unavailable, no order was created. |
| 503 | `nameservers_unavailable` / `suggest_unavailable` / `cap_check_failed` | A dependency is down for a moment. Nothing was created, retry in a few minutes. |

---

## Statuses

**Order status** (`status`):

| Status | Meaning |
| --- | --- |
| `awaiting_payment` | Order created, waiting for the Stripe payment. Not yet in fulfilment. |
| `pending` | Paid, queued for fulfilment. |
| `in_progress` | Being built. |
| `completed` | Live and delivered. Inboxes and domains are ready. |
| `cancelled` | Cancelled. |

**Domain status** (`status`): `reserved`, `purchased`, `connected`, `active`, `failed`. **Domain source** (`source`): `spaceship` (we register it) or `byo` (bring your own).

**Inbox status** (`status`): `pending`, `active`, `disabled`.

---

## Create an order

`POST /orders`  (write)

Prices server-side, then charges your saved card or returns a Stripe `checkout_url`. Use `POST /domains/suggest` (or `/domains/check`) first to pick available domain names. For pre-warmed mailboxes see Pre-warmed orders below, the body is smaller.

**Request body**

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `product` | string | yes | `"microsoft"` (Outlook / Azure) or `"google"` (Workspace). |
| `inbox_count` | integer | yes | Microsoft: a multiple of `per_domain`, max 5000. Google: from your account's minimum (15 unless agreed otherwise) to 750. |
| `domains` | array | yes | `[{ "domain": "getbrand.com" }]`. Provide exactly `ceil(inbox_count / per_domain)` domains. Lowercase, no duplicates. |
| `personas` | array | yes | Sender identities: `[{ "first_name": "Alex", "last_name": "Morgan" }]`. `last_name` optional. **Microsoft: 1 to 4. Google: 1 to 3** (and never more than `per_domain`). |
| `domain_mode` | string | no | `"buy"` (default, we register the domains) or `"byo"` (you bring your own, requires `hosting`). |
| `hosting` | object | if BYO | How we get DNS control of your domains. Either registrar access, `{ "platform": "Spaceship", "login": "...", "password": "...", "backup_codes": "..." }` (`platform` plus a `password` or `backup_codes`), or for Google `{ "mode": "nameservers" }`: you point the domains at our nameservers yourself, no logins. The zones are created in our Cloudflare the moment the order exists and the response returns each domain's pair (`domains[]`, plus `nameservers` when all share one) with a 6-hour deadline; we detect the change automatically (each domain's `status` moves to `connected`). |
| `platform` | object | no | Sending tool to load the inboxes into: `{ "provider": "smartlead", "api_key": "...", "login": "...", "password": "...", "workspace": "..." }`. `provider` one of emailbison, smartlead, instantly, manyreach, plusvibe, prospectai, none, other. `api_key`, `login` and `password` are all required unless `provider` is `none` or `prospectai`; for `prospectai` (Google orders only) send only `workspace` (your client's email); `url` is required for emailbison (your instance address). For a tool we don't list, use `other` with `name` (the tool's name), `login` and `password`; `api_key` is optional there. |
| `per_domain` | integer | no | Inboxes per domain. Microsoft: 50 / 25 (default 50; 100 only on accounts that have it, where it stays the default). Google: 3 / 2 / 1 (default 3). Fewer per domain is safer for deliverability. |
| `redirect_url` | string (URL) | no | Where the domains redirect visitors. Required for `stealth_redirect`. |
| `stealth_redirect` | boolean | no | Domain masking (Stealth Redirect): each domain shows `redirect_url` with no visible redirect. Requires `redirect_url`. Billed per domain on the subscription at your account's rate (standard 1 EUR per domain per cycle), shown as its own line at checkout. |
| `profile_picture_url` | string (URL) | no | Profile picture for the sender personas, e.g. a shared Google Drive link. |
| `name` | string | no | A label for the order, max 120 chars. Defaults to "<Company> order N (<first persona>)" when omitted. |
| `payment` | string | no | `"checkout"` (default): returns a Stripe link to pay. `"saved_card"`: charges the card on file, see Saved-card payment. |
| `max_amount_cents` | integer | no | Budget guard. If the first invoice (recurring plus one-time, before tax) would be higher, the request fails with `422 over_budget` and nothing is created. |

When an order is paid, our fulfilment team is notified automatically with all of these details (domains, hosting access, sending platform, personas, redirect). You get an email confirmation, and another email when the order goes live. Track progress any time with `GET /orders/{id}`.

**Response** `200`

| Field | Type | Notes |
| --- | --- | --- |
| `order_id` | string (uuid) | The new order. |
| `name` | string | The order name, yours or the default. |
| `status` | string | `pending` when the saved card was charged, otherwise `awaiting_payment`. |
| `payment_status` | string | `paid` (saved card charged), `awaiting_payment` (pay at `checkout_url`), or `action_required` (you asked for the saved card but it could not be charged, see `payment_message`, and `checkout_url` is the fallback). |
| `checkout_url` | string (URL) or null | Open this to pay. Null when `payment_status` is `paid`. A checkout link stays payable for 20 minutes, after which the unpaid order is cancelled and its domains released. |
| `payment_message` | string | Only with `action_required`: why the saved card was not charged (no card, declined, bank wants 3D Secure). |
| `invoice_id` | string | Only when `paid`: the Stripe invoice. |
| `amount_charged_cents` | integer | Only when `paid`: what was charged, tax included. |
| `quote` | object | The price, same shape as `POST /orders/quote`. |
| `stealth_redirect` | string or null | `ordered` when domain masking is on this order, otherwise null. |
| `warnings` | array | Google only, when present: `[{ code: "domain_occupied", domains, message }]`, domains still verified in another Google Workspace. The order stands, but get them released or swap them. |
| `nameservers` | array or null | For `hosting.mode: "nameservers"`: the two nameservers, when every domain on the order got the same pair. Otherwise null (see `domains`). |
| `domains` | array | For `hosting.mode: "nameservers"`: `[{ domain, nameservers }]`, each domain's own pair. Pairs can differ per domain. |
| `nameserver_deadline_hours` | integer | Only with `nameservers`: always 6. Make the change within this window. |
| `message` | string | Only with `nameservers`: the instruction to show whoever changes the DNS. |

**Microsoft example** (100 inboxes, 50 per domain = 2 domains):

```bash
curl -X POST https://app.frostmailer.com/api/v1/orders \
  -H "Authorization: Bearer fm_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "product": "microsoft",
    "inbox_count": 100,
    "per_domain": 50,
    "domains": [{ "domain": "getbrandmail.com" }, { "domain": "trybrandmail.com" }],
    "personas": [{ "first_name": "Alex", "last_name": "Morgan" }],
    "name": "Q3 outbound"
  }'
```

```json
{
  "order_id": "5f6a...",
  "name": "Q3 outbound",
  "status": "awaiting_payment",
  "payment_status": "awaiting_payment",
  "checkout_url": "https://checkout.stripe.com/...",
  "quote": { "currency": "eur", "interval": "4_weeks", "recurring_cents": 6000, "one_time_cents": 0, "first_invoice_cents": 6000, "inbox_count": 200, "domain_count": 2, "lines": [ ... ] },
  "stealth_redirect": null,
  "nameservers": null
}
```

The same order with `"payment": "saved_card"`:

```json
{
  "order_id": "5f6a...",
  "name": "Q3 outbound",
  "status": "pending",
  "payment_status": "paid",
  "checkout_url": null,
  "invoice_id": "in_1Q...",
  "amount_charged_cents": 6000,
  "quote": { ... },
  "stealth_redirect": null,
  "nameservers": null
}
```

**Google example** (30 inboxes, 3 per domain = 10 domains):

```bash
curl -X POST https://app.frostmailer.com/api/v1/orders \
  -H "Authorization: Bearer fm_live_..." \
  -H "Content-Type: application/json" \
  -d '{ "product": "google", "inbox_count": 30, "domains": [ /* 10 domains */ ], "personas": [{ "first_name": "Sam" }] }'
```

**Bring-your-own-domains example** (you own the domains, we set up DNS):

```bash
curl -X POST https://app.frostmailer.com/api/v1/orders \
  -H "Authorization: Bearer fm_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "product": "microsoft",
    "inbox_count": 50,
    "domain_mode": "byo",
    "domains": [{ "domain": "mydomain.com" }],
    "personas": [{ "first_name": "Alex" }],
    "hosting": { "platform": "Spaceship", "login": "me@email.com", "password": "..." },
    "platform": { "provider": "smartlead", "api_key": "sl_..." },
    "redirect_url": "https://mybrand.com"
  }'
```

**Pricing model:** Microsoft is billed per domain (tenant). Google is billed per inbox on a volume-tiered rate. Subscriptions renew every 4 weeks unless your account is agreed otherwise. Buying domains from us adds a one-time domain-registration charge on the first invoice (Google buy mode); bringing your own domains has no domain fee, just the subscription. Stealth Redirect, when requested, is a separate per-domain line on the same subscription. The exact amount is computed server-side: get it up front with `POST /orders/quote`.

---

## Quote an order

`POST /orders/quote`  (read)

What an order would cost, without creating anything. Takes the same body as `POST /orders` (standard or pre-warmed). For standard orders `domains` and `personas` may be left out, since the price does not depend on the names. `domain_mode` defaults to `buy`, so a Google quote includes the one-time domain fee unless you send `"domain_mode": "byo"`.

```bash
curl -X POST https://app.frostmailer.com/api/v1/orders/quote \
  -H "Authorization: Bearer fm_live_..." \
  -H "Content-Type: application/json" \
  -d '{ "product": "google", "inbox_count": 30 }'
```

```json
{
  "quote": {
    "currency": "eur",
    "interval": "4_weeks",
    "recurring_cents": 9000,
    "one_time_cents": 12000,
    "first_invoice_cents": 21000,
    "inbox_count": 30,
    "domain_count": 10,
    "lines": [
      { "name": "Google Workspace (30 accounts)", "unit_amount_cents": 9000, "quantity": 1, "recurring": true },
      { "name": "Domain registration (one-time)", "unit_amount_cents": 1200, "quantity": 10, "recurring": false }
    ]
  },
  "saved_card": { "enabled": true, "cap_cents": 200000, "charged_last_30_days_cents": 45000, "within_cap": true }
}
```

- `recurring_cents` is charged every `interval` (`4_weeks` or `month`). `one_time_cents` only on the first invoice. `first_invoice_cents` is the two together. All amounts are before any tax Stripe adds.
- `lines` are exactly the lines that will be billed.
- `saved_card` says whether `"payment": "saved_card"` is available to you, your cap (null = none) and how much of it is used.
- Pre-warmed quotes also return `stock`: `{ in_stock, available_accounts, warming_accounts }`.

---

## Saved-card payment

Send `"payment": "saved_card"` on `POST /orders` and the order is charged to the card on your Frostmailer billing account, with no checkout page. The order goes straight to `pending` and into fulfilment, so automated systems can order without a person.

- **Off by default.** Ask support to switch it on for your account. We can set a rolling 30-day spend cap; orders that would go over it are refused with `402 over_cap` and nothing is created.
- **Your card must be on file.** It is the card from your previous Frostmailer payment (manage it under Billing in the dashboard). Pay one order by checkout first if you have never paid.
- **If the card can't be charged** (no card, declined, or your bank asks for 3D Secure), the order is still created and you get `payment_status: "action_required"`, a `payment_message`, and a `checkout_url` to pay it by hand. The link is payable for 20 minutes.
- **Combine with `max_amount_cents`** to make sure an automated order never costs more than you expect. Budgets and the cap compare amounts before tax; if VAT applies to your account, the charge includes it on top.
- **Send an `Idempotency-Key` header** (any unique string per intended order, up to 200 characters) so a retry after a timeout returns the first order (`replayed: true`) instead of placing and charging a second one. Works on every `POST /orders`, and we strongly recommend it for automation.
- Billing is identical to checkout: same subscription, same renewal cycle, same invoices in your billing portal.

---

## Pre-warmed orders

Mailboxes delivered already warmed for 4 weeks, domain included. The supplier picks the domains and personas, so you only choose the product and quantity.

`POST /orders` with:

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `product` | string | yes | `"microsoft_prewarmed"` or `"google_prewarmed"`. |
| `accounts` | integer | yes | Microsoft: multiples of 100, minimum 200. Google: multiples of 3, from 6 to 150. |
| `redirect_url` | string (URL) | no | Where the domains redirect visitors. |
| `platform` | object | no | Sending tool, same as standard orders. |
| `name` | string | no | A label for the order. |
| `payment` | string | no | `"checkout"` (default) or `"saved_card"`. |
| `max_amount_cents` | integer | no | Budget guard, as above. |

If the supplier does not have enough in stock, you get `409 out_of_stock` with `requested`, `available` and `warming` (accounts still in warmup, released over the coming days), and nothing is created. The response is otherwise the same as a standard order.

```bash
curl -X POST https://app.frostmailer.com/api/v1/orders \
  -H "Authorization: Bearer fm_live_..." \
  -H "Content-Type: application/json" \
  -d '{ "product": "microsoft_prewarmed", "accounts": 200, "redirect_url": "https://mybrand.com/?utm_source=cold" }'
```

### Pre-warmed stock

`GET /prewarmed/stock`  (read)

```json
{
  "products": {
    "microsoft_prewarmed": {
      "available_accounts": 2600, "available_domains": 26, "warming_accounts": 1200,
      "max_order_accounts": 2600, "min_accounts": 200, "step": 100, "accounts_per_domain": 100,
      "price_cents_per_account": 50, "currency": "eur", "warmup_weeks": 4, "updated_at": "2026-11-06T09:00:00Z"
    },
    "google_prewarmed": { "...": "same fields" }
  }
}
```

`price_cents_per_account` is your own rate. `max_order_accounts` is the largest order that would go through right now (0 when there is not enough for the minimum).

---

## List orders

`GET /orders`  (read)

Returns `{ "orders": [ ... ] }`, newest first. Each order:

| Field | Type |
| --- | --- |
| `id` | string (uuid) |
| `name` | string or null |
| `provider` | `google` or `azure` (azure = Microsoft) |
| `status` | see Statuses |
| `inbox_count` | integer |
| `domain_count` | integer |
| `amount_cents` | integer (cents in `currency`, per billing cycle, add-ons included) |
| `currency` | `eur` or `usd` |
| `created_at` | ISO 8601 |

---

## Get an order

`GET /orders/{id}`  (read)

The order (fields above) plus its settings and history:

- `domain_mode` (`buy` or `byo`), `per_domain`, `redirect_url`, `stealth_redirect` (`ordered` or null), `personas` (`[{ first_name, last_name }]`) and `nameservers` (the pair to point your own domains at when you chose to change them yourself, otherwise null). Credentials are never returned.
- `events`: the status timeline: `{ actor, from_status, to_status, note, created_at }`.
- `domains`: `{ domain, source, status, nameservers, redirect_url, created_at }`.

Returns `404` if the order is not yours.

---

## List inboxes

`GET /orders/{id}/inboxes`  (read)

Returns `{ "inboxes": [ { email, persona_name, status, domain, created_at } ] }`.

Mailbox passwords are **not** returned by the API. Retrieve credentials from your dashboard.

---

## List domains

`GET /domains`  (read)

Every domain you own across all orders: `{ "domains": [ { domain, source, status, nameservers, redirect_url, order_id, created_at } ] }`.

---

## Check domain availability

`POST /domains/check`  (write)

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `domains` | array of string | yes | 1 to 20 domains to check. |
| `product` | string | no | `microsoft` or `google` (which registrar account to check). Defaults to `google`, so pass `microsoft` for Microsoft orders. |

```bash
curl -X POST https://app.frostmailer.com/api/v1/domains/check \
  -H "Authorization: Bearer fm_live_..." \
  -H "Content-Type: application/json" \
  -d '{ "domains": ["getbrandmail.com", "trybrandmail.com"], "product": "microsoft" }'
```

```json
{ "configured": true, "availability": { "getbrandmail.com": true, "trybrandmail.com": false } }
```

- `availability` is an object keyed by domain: `true` = free to register, `false` = taken.
- A domain the registrar gives no answer for is left out of `availability`. Treat a missing key as not available.
- `{ "configured": false, "availability": {} }` means availability can't be checked right now. Retry later.
- Availability is not a reservation. A name is only held once it is on an order.

---

## Suggest domain names

`POST /domains/suggest`  (write)

Names that are free to register right now, built from your brand. One call instead of rounds of `/domains/check`. For Google, names still verified in another Google Workspace are left out.

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `seeds` | array of string | yes | 1 to 5 brand names or websites, e.g. `["unstuckengine"]`. |
| `count` | integer | yes | How many names you want, 1 to 100. |
| `tld` | string | no | `.com` (default), `.org` or `.co`. |
| `product` | string | no | `microsoft` or `google` (default). Use the product you will order. |
| `exclude` | array of string | no | Names to skip, e.g. ones you already have. Up to 500. |

```bash
curl -X POST https://app.frostmailer.com/api/v1/domains/suggest \
  -H "Authorization: Bearer fm_live_..." \
  -H "Content-Type: application/json" \
  -d '{ "seeds": ["brandmail"], "count": 10, "product": "microsoft" }'
```

```json
{ "domains": ["getbrandmail.com", "trybrandmail.com", "..."], "requested": 10, "returned": 10 }
```

`returned` can be lower than `requested` when the seeds run out of free variants: add another seed. Names are not reserved until you order them, so order soon after suggesting.

---

## Request cancellation

`POST /orders/{id}/cancel`  (write)

Flags the order for the retention team. It does **not** cancel immediately, the team processes the actual cancellation and Stripe change.

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `note` | string | yes | Why you are cancelling, 10 to 1000 chars. |
| `reason` | string | no | Short reason category, max 120 chars. |

```bash
curl -X POST https://app.frostmailer.com/api/v1/orders/ORDER_ID/cancel \
  -H "Authorization: Bearer fm_live_..." \
  -H "Content-Type: application/json" \
  -d '{ "note": "Winding down this campaign for now." }'
```

Returns `{ "ok": true, "status": "cancellation_requested" }`.

---

## Account

`GET /account`  (read)

```json
{
  "email": "you@company.com",
  "full_name": "You",
  "company_name": "Company",
  "created_at": "2026-01-01T00:00:00Z",
  "subscription": { "active_orders": 3, "total_inboxes": 260, "monthly_amount_cents": 78000, "currency": "eur" }
}
```

---

## MCP (Claude, Cursor, Codex)

Every MCP-capable tool can drive this API through the `frostmailer-mcp` npm package.

**Claude Code:**

```
claude mcp add --env FROSTMAILER_API_KEY=fm_live_... --transport stdio frostmailer -- npx -y frostmailer-mcp
```

**Claude Desktop / Cursor / Codex:**

```json
{
  "mcpServers": {
    "frostmailer": {
      "command": "npx",
      "args": ["-y", "frostmailer-mcp"],
      "env": { "FROSTMAILER_API_KEY": "fm_live_..." }
    }
  }
}
```

Tools: `create_order`, `create_prewarmed_order`, `quote_order`, `list_orders`, `get_order`, `list_inboxes`, `list_domains`, `check_domain`, `suggest_domains`, `get_prewarmed_stock`, `cancel_order`, `get_account`.

Optional env `FROSTMAILER_BASE_URL` (defaults to `https://app.frostmailer.com/api/v1`). The server refuses to start without a key or on a non-https base URL.

---

## Order from Slack

**Easiest: our native Slack app.** On the [Developers page](https://app.frostmailer.com/developers), click **Add to Slack** to install the Frostmailer bot into your workspace. Then in Slack:

1. `/frostmailer connect fm_live_...` — link your account (a key from the Developers page).
2. `/frostmailer order 50 microsoft inboxes on getbrand.com with sender Alex Morgan` — or just DM the bot / @mention it in plain English.

The bot replies with a priced order summary and a **Place order** button that returns your Stripe checkout link (nothing is provisioned until you pay). Also: `/frostmailer status`, `/frostmailer domains getbrand.com`, and `/frostmailer cancel <order-id>`.

### Or wire it into another assistant yourself

Connect the `frostmailer-mcp` server to any AI assistant that lives in Slack (or Claude, Cursor, Codex), then paste this prompt once. After that you can order in plain English and it hands you a payment link.

**Setup prompt (paste once):**

```
You can place Frostmailer cold-email orders through the "frostmailer" MCP.

When I ask to order inboxes, collect these, asking only for what is missing:
- Product: Microsoft (Outlook / Azure) or Google.
- How many inboxes.
- Domains: do I want you to BUY them or am I bringing my own?
  - Buy: for Google, domains are 12 EUR one-time per .com; for Microsoft the
    domain is included in the price. Suggest good names and check availability
    with check_domain.
  - Bring my own: get my domain names AND where they are hosted (platform +
    login + password or backup codes) for the hosting field. No domain fee.
- Sender personas (names on the mailboxes): Microsoft allows 1 to 4, Google up
  to 3 (per domain).
- Optional: a redirect URL, a profile picture link (e.g. Google Drive), and my
  sending tool (provider + API key, and login + password if it has them).

Then call create_order. It returns a checkout_url. Give me that link to pay,
and tell me nothing is provisioned until I pay. After I confirm payment, use
get_order to track it, and list_inboxes / list_domains once it is live.
```

**Fill-in order template, buy domains (paste your details):**

```
Place a Frostmailer order:
- Product: Google
- Inboxes: 30 (3 per domain)
- Domains: buy them for me (12 EUR each, suggest 10 good .com and check availability)
- Personas: Sam Carter, Jordan Lee, Riley Fox
- Redirect (optional): https://mybrand.com
- Profile picture (optional): <Google Drive link>
- Sending tool: Smartlead, API key sl_xxx (+ login / password if needed)
Give me the checkout link.
```

**Bring-your-own domains template:**

```
Place a Frostmailer order:
- Product: Microsoft (domain included, up to 4 personas)
- Inboxes: 50
- Domains: I am bringing my own: mydomain.com
- Hosting: Spaceship, login me@email.com, password ******
- Personas: Alex Morgan
- Sending tool (optional): Smartlead, API key sl_xxx
Give me the checkout link.
```

---

## FAQ

**How do I pay for an order?** `POST /orders` returns a `checkout_url`. Open it and pay with card. Nothing is built until payment completes. Accounts with saved-card payment switched on can send `"payment": "saved_card"` instead and skip the link.

**Can my system order without a person paying?** Yes, with saved-card payment (see that section). Ask support to switch it on, optionally with a 30-day spend cap.

**Can I see the price before ordering?** Yes, `POST /orders/quote` with the same body. Nothing is created.

**Can I place an order without paying?** No. Orders are created as `awaiting_payment` and only a completed Stripe payment moves them into fulfilment. Price and status are set server-side, not by the caller.

**What happens after I pay?** The order moves to `pending`, then `in_progress`, then `completed`. Poll `GET /orders/{id}` to follow it.

**How many domains do I need?** `ceil(inbox_count / per_domain)`. Microsoft defaults to 50 inboxes per domain, Google to 3. The API returns a clear error telling you the exact count if it does not match.

**What is the difference between Microsoft and Google?** Microsoft (Outlook / Azure) is billed per domain, is best for high volume (50 inboxes per domain, about 200 sends a day), and allows up to 4 sender personas. Google (Workspace) is billed per inbox on a volume tier, from your account's minimum (15 by default) to 750 inboxes, runs fewer inboxes per domain, and allows up to 3 personas. Both include DNS setup.

**Can I bring my own domains?** Yes. Set `domain_mode: "byo"`, list your domains, and pass a `hosting` object (where they are hosted plus login/password or backup codes) so we can configure DNS. On Google you can instead send `hosting: { "mode": "nameservers" }` and point the domains at the nameservers we return, within 6 hours, with no logins shared. No domain fee, just the subscription. Prefer us to register them? Use `domain_mode: "buy"` (the default).

**What is Stealth Redirect?** Domain masking. Each sending domain shows your `redirect_url` site without a visible redirect. Pass `stealth_redirect: true` together with a `redirect_url`. It is billed per domain as its own line on the subscription.

**Can I connect my sending tool?** Yes. Pass a `platform` object with your provider and API key (or login/password/workspace). We load the inboxes into it during fulfilment.

**Microsoft, Outlook, or Azure, what is the difference?** They are the same product. Send `"microsoft"`, the API and dashboard may show the provider as `azure`.

**How do I get my mailbox passwords?** Credentials are available in your dashboard. For security they are not returned by the API in v1.

**How do I cancel?** `POST /orders/{id}/cancel` with a note. This notifies the retention team, who handle the cancellation. It is not instant.

**Do you have webhooks?** Not yet. Poll `GET /orders/{id}` for status for now. Outbound webhooks are on the roadmap.

**Is my API key safe to share?** No, treat it like a password. It can place orders and read your data. Revoke it any time on the API & MCP page.
