---
title: "Let an unattended agent mail invoice reminders on a schedule"
description: "An agent on a cron job mails overdue invoice reminders with an API key, a per-letter price limit, an undo window and optional approval of every letter."
url: https://sendforme.co/use-cases/unattended-agents
updated: 2026-11-29
---

# Let an unattended agent mail invoice reminders on a schedule

> Make an API key on your account page and give it to the agent that runs on a schedule. It calls the REST API (or MCP with the key) to mail reminders from your prepaid balance. A per-letter price limit sends anything pricier to you for approval, approval mode 'each' makes every letter wait for your click, and every letter sits in an undo window before printing.

**Say to your agent:** "Every Monday, mail a First-Class reminder to any client whose invoice is more than 30 days overdue. Never send anything over $5 without asking me."

Most letters start in a conversation: you ask, your agent writes, you look at the proof. Some mail is routine enough to run on its own, like a reminder to every client 30 days past due. Those need an agent that can mail with nobody watching, and limits you set once.

## The setup

1. **Sign in at [your account page](/account)** (we email you a sign-in link). The page shows your balance, saved return address, signature and letters.
2. **Make an API key** there and give it a label ("invoice bot"). It's shown once; store it in your agent's secrets as `SENDFORME_KEY`.
3. **Set the guardrails** (on the account page, or by telling your agent to call the `account` tool):
   - `max_letter_usd`: a per-letter price limit. Letters that cost more return `awaiting_approval` with a link instead of mailing.
   - `approval: "each"`: every letter waits for your click on its proof page. Good for the first few weeks.
   - `hold_minutes`: the undo window before a letter goes to the printer (default 10, up to 1440).
   - `return_address` and `default_style`, so the agent never has to send them.
4. **Add credit.** Letters charge the prepaid balance. Auto-reload is optional and off by default; leave it off if you want the balance to be a hard ceiling.

## What it sounds like (setting it up)

> **You:** Every Monday at 9, look at the invoices in our accounting export. For anything over 30 days past due, mail a friendly First-Class reminder with the invoice attached. Never mail anything over $5 without asking me, and let me approve every letter for the first month.
>
> **Agent:** Done. I set a $5 per-letter limit and approval for every letter on your account. Each Monday I'll preview the reminders and send them; each one will come back as awaiting approval with a link, and I'll post the links in our #billing channel. After the first month, tell me and I'll switch approval to automatic. The $5 limit stays.

## What the agent does each run

1. Finds overdue invoices in your system.
2. Calls `POST /v1/letters/preview` for each, with the invoice PDF in `attachments` and the [invoice reminder](/templates/invoice-reminder) structure in `body`. Previews are free and return the price, the proof link and warnings.
3. Calls `POST /v1/letters` with the `letter_id` and an `Idempotency-Key` (for example the invoice number plus the week), so a retry never mails twice.
4. Gets back one of:
   - `scheduled` with `cancel_until`: it will mail when the undo window ends.
   - `awaiting_approval` with a `setup_url`: over the price limit, or approval mode is on. The agent forwards the link to you; the letter mails when you approve.
   - `needs_setup` with a link: the balance is short and auto-reload is off.
5. Later, `GET /v1/letters?status=delivered` or `GET /v1/letters/{id}` to record delivery in your system.

```bash
curl -X POST https://sendforme.co/v1/letters \
  -H "Authorization: Bearer $SENDFORME_KEY" \
  -H "Idempotency-Key: inv-1042-2026-w49" \
  -H "Content-Type: application/json" \
  -d '{"letter_id":"ltr_..."}'
```

Full endpoint list: [REST API docs](/docs/rest-api). The same tools work over MCP with the key as `account_key` for clients without OAuth.

## What gets mailed

A one-page reminder on your letterhead with the invoice numbers, amounts and how to pay, followed by the invoice. First-Class for reminders; if your workflow escalates to a final notice, it uses `certified_return_receipt`, which costs more and so hits your price limit and comes to you for approval by design.

## What it costs

| Item | Price |
|---|---|
| First-Class reminder, first page | $2.49 |
| Each extra page (the attached invoice) | $0.25 |
| Final notice, Certified Mail with electronic return receipt | $13.99 |
| API keys, previews, address checks | No charge |

A one-page reminder with a one-page invoice is $2.49 plus $0.25. A $5 price limit lets those through and sends certified final notices to you.

## Guardrails, in one place

| Setting | What it does |
|---|---|
| Per-letter price limit | Above it, the letter waits for your approval |
| Approval: each | Every letter waits for a click on its proof |
| Undo window | Minutes before printing when `cancel_letter` always works and the credit goes back to your balance |
| Prepaid balance, auto-reload off | The agent can't spend more than you've added |
| Revocable keys | Revoke the key on the account page and the agent stops |
| Content rules | No threats, harassment, or letters in someone else's name; a real return address on every letter |

## Related

- [Overdue invoice reminders (with a person in the loop)](/use-cases/small-business-overdue-invoices)
- [Customer notices by mail merge](/use-cases/customer-notices-mail-merge)
- [MCP docs](/docs/mcp)
- [Pricing](/pricing)

## FAQ

### How does an agent authenticate without a person present?

With an API key from your account page, sent as a Bearer token on REST calls or as account_key on MCP tools. Keys can be revoked from the same page at any time.

### What stops a runaway agent from mailing hundreds of letters?

Three settings: a per-letter price limit (letters above it wait for your approval), approval mode 'each' (every letter waits for a click on its proof page), and the prepaid balance itself. Auto-reload is off unless you turn it on.

### Can a retry mail the same letter twice?

Not if the agent sends an Idempotency-Key header on POST /v1/letters: a retry with the same key returns the first response instead of mailing again.

### Does SendForMe run the schedule?

No. Your agent runs on its own schedule (cron, a CI job, an agent platform's scheduled tasks) and calls the API when it's time. For a single letter on a set day, mail_date schedules it up to 180 days ahead.
