---
agent:
  instructions: "Use this search API to find what Blueping's public pages say, with keywords or a question, instead of crawling them one by one. Results are returned in Markdown, best first, each with its link."
  endpoint: "https://blueping.dev/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
---

> The index of these docs for agents is at https://blueping.dev/llms.txt

# Answer every lead in minutes.

The agent answers each demo request in the thread, schedules two follow-ups and cancels them the moment the lead replies.

Jordan's demo request reaches selbywick-leads@blueping.dev, the agent schedules two follow-ups, and its answer goes to Jordan within a minute.

## How can an AI sales agent qualify and follow up inbound leads by email?

Send your demo form's notifications to the agent's address, let it answer each lead in the thread with two qualifying questions, and schedule the follow-ups as drafts with `send_at` three and seven days out. When the lead replies, the agent deletes the pending follow-ups, and Blueping paces mail to people who never wrote with the ramp of new recipients, so the agent stays within what mail providers trust.

## Why inbound leads go cold

Selbywick sells route planning software to logistics companies and gets about 200 inbound leads a month: demo requests from the website's form, which arrive as notifications with the lead in Reply-To, and questions sent straight to the sales address. Leads ask for a demo while they are comparing tools, and the two account executives are on calls most of the day, so a lead that writes at noon often hears back the next morning.

An agent can send the first answer in minutes, ask the two questions that qualify a lead, and follow up when the lead goes quiet. The usual way to build it, a sales tool's sequences or a script on a shared mailbox, sends from a person's address, keeps no clean record of what the agent sent, and makes it easy to send to people who never asked.

Now the form writes to selbywick-leads@blueping.dev. The agent keeps one thread per lead, schedules follow-ups that cancel themselves when the lead replies, and writes to new people at a pace that keeps its address trusted by the providers it writes to.

## From a demo request to a qualified conversation

The agent writes and decides; Blueping keeps the threads, the scheduled follow-ups and the pace.

### 1. Point the form at the agent

Set the agent's address as the recipient of your demo form's notifications, and give it out as the sales address. A form tool that sets `Reply-To` puts the lead's address there.

**Call:** POST `/v1/inboxes` with `client_id` and `display_name`

**Answer:** `201` with `id` and `address`

**Checked:** The address receives at once; usernames that pose as another company are refused

### 2. Answer within minutes

The agent replies in the thread with a thank-you and two qualifying questions. The reply goes to the lead's `Reply-To` when the form set one, so the conversation runs with the lead from the first message.

**Call:** POST `/v1/messages/{id}/reply` with `text` and `Idempotency-Key`

**Answer:** `202` with `status` `sent`, or `queued` with `sends_at` when a pace limit applies

**Checked:** A lead who wrote to the inbox is a reply; a lead behind a form's Reply-To counts once as a new recipient: 3 in the first hour, 10 in the first day and 25 in the first week after the claim, then 20 an hour on Free, 100 on Developer, 500 on Startup and 2,000 on Scale

### 3. Schedule the follow-ups

Two drafts that answer the lead's message, with `send_at` three and seven days out. They go by themselves, with every check a send makes, unless someone deletes them first.

**Call:** POST `/v1/inboxes/{id}/drafts` with `reply_to_message_id` and `send_at`

**Answer:** `201` with `status: scheduled`

**Checked:** 100 scheduled sends at most per agent, each between one minute and 30 days ahead

### 4. Cancel them when the lead replies

When the lead's answer lands in the thread, the agent lists the scheduled drafts, deletes the ones that answer this thread, and labels the lead `lead:replied` for an account executive.

**Call:** GET `/v1/inboxes/{id}/drafts?status=scheduled`, then DELETE `/v1/drafts/{id}`

**Answer:** The drafts, then `status: canceled` for each deleted one

**Checked:** A deleted scheduled send never goes

### 5. Hand over to a person

A qualified lead goes to an account executive: the agent forwards the thread with a summary on top, or writes the lead a new message with the account executive in `cc`.

**Call:** POST `/v1/messages/{id}/forward` with `to` and `text`

**Answer:** `202` with the forward, in a thread of its own

**Checked:** Teammates count once as new recipients; a send allow rule can keep forwards inside your domain

Step 3's follow-ups as GET `/v1/inboxes/{id}/drafts?status=scheduled` lists them, cut to the fields the desk reads:

```json
{
  "data": [
    {
      "id": "dr_7Kp1R4Df6Gh7Jk0Lw9T",
      "status": "scheduled",
      "to": [],
      "subject": "",
      "preview": "Last note from me. If the timing is wrong, tell me when to check back.",
      "reply_to_message_id": "em_5Vb8Kp1R4Df6Gh7J",
      "send_at": "2026-11-30T10:12:00.000Z",
      "message_id": null
    },
    {
      "id": "dr_2Lw9Tc3Vb8Kp1R7Hn2Q",
      "status": "scheduled",
      "to": [],
      "subject": "",
      "preview": "Following up on your demo request: how many trucks do you run today?",
      "reply_to_message_id": "em_5Vb8Kp1R4Df6Gh7J",
      "send_at": "2026-11-26T10:12:00.000Z",
      "message_id": null
    }
  ],
  "order": "newest_first",
  "next_cursor": null
}
```

## The lead desk in Python and Node.js

The program handles each new email once. A new lead gets the first answer and two scheduled follow-ups; a lead's reply cancels that thread's follow-ups. The wording is yours; the qualifying questions are where your model and your sales playbook come in.

Python:

```python
# answer_leads.py: answer each new lead, schedule two follow-ups, and cancel them when the lead replies.
# pip install requests
import os
from datetime import datetime, timedelta, timezone

import requests

API = "https://blueping.dev/v1"
ANSWER = "Thanks for asking about Selbywick. Two questions so I can show you the right demo: how many trucks do you run, and what do you plan routes with today?"
FOLLOW_UPS = {
    3: "Following up on your demo request: how many trucks do you run today?",
    7: "Last note from me. If the timing is wrong, tell me when to check back.",
}
session = requests.Session()
session.headers["Authorization"] = f"Bearer {os.environ['BLUEPING_API_KEY']}"


def later(days):
    return (datetime.now(timezone.utc) + timedelta(days=days)).isoformat(timespec="seconds")


inbox = session.post(f"{API}/inboxes", json={"client_id": "sales", "display_name": "Selbywick Sales"}).json()
page = session.get(f"{API}/inboxes/{inbox['id']}/messages", params={"limit": 50}).json()
for message in reversed(page["data"]):
    if message["direction"] != "in" or message["auto_reply"] or any(name.startswith("lead:") for name in message["labels"]):
        continue  # an out-of-office answer is no reply: the follow-ups stay
    lead = message.get("reply_to") or message["from"]["address"]  # form notifications carry the lead in Reply-To
    thread = session.get(f"{API}/threads/{message['thread_id']}").json()
    if any(item["direction"] == "out" for item in thread["messages"]):
        # The lead answered: this thread's follow-ups go, and an account executive takes it from here.
        ids = {item["id"] for item in thread["messages"]}
        scheduled = session.get(f"{API}/inboxes/{inbox['id']}/drafts", params={"status": "scheduled", "limit": 100}).json()
        canceled = [draft["id"] for draft in scheduled["data"] if draft["reply_to_message_id"] in ids]
        for draft_id in canceled:
            session.delete(f"{API}/drafts/{draft_id}")
        session.patch(f"{API}/messages/{message['id']}", json={"add_labels": ["lead:replied"]})
        print("replied", lead, "follow-ups canceled:", len(canceled))
        continue
    sent = session.post(
        f"{API}/messages/{message['id']}/reply",
        json={"text": ANSWER},
        headers={"Idempotency-Key": f"lead-{message['id']}"},
    ).json()
    if "error" in sent:
        print("not sent", lead, sent["error"]["next_action"])
        continue
    for days, text in FOLLOW_UPS.items():
        session.post(
            f"{API}/inboxes/{inbox['id']}/drafts",
            json={"reply_to_message_id": message["id"], "text": text, "send_at": later(days)},
            headers={"Idempotency-Key": f"follow-{days}-{message['id']}"},
        )
    session.patch(f"{API}/messages/{message['id']}", json={"add_labels": ["lead:contacted"]})
    print("answered", lead, sent["status"], sent.get("sends_at", ""))
```

Node.js:

```javascript
// answer-leads.mjs: answer each new lead, schedule two follow-ups, and cancel them when the lead replies.
// Node.js 18 or later, nothing to install.
const API = "https://blueping.dev/v1";
const ANSWER = "Thanks for asking about Selbywick. Two questions so I can show you the right demo: how many trucks do you run, and what do you plan routes with today?";
const FOLLOW_UPS = {
  3: "Following up on your demo request: how many trucks do you run today?",
  7: "Last note from me. If the timing is wrong, tell me when to check back.",
};
const headers = { Authorization: `Bearer ${process.env.BLUEPING_API_KEY}`, "Content-Type": "application/json" };
const call = async (method, path, body, extra = {}) =>
  (await fetch(API + path, { method, headers: { ...headers, ...extra }, body: body && JSON.stringify(body) })).json();
const later = (days) => new Date(Date.now() + days * 86_400_000).toISOString();

const inbox = await call("POST", "/inboxes", { client_id: "sales", display_name: "Selbywick Sales" });
const page = await call("GET", `/inboxes/${inbox.id}/messages?limit=50`);
for (const message of page.data.reverse()) {
  if (message.direction !== "in" || message.auto_reply || message.labels.some((name) => name.startsWith("lead:"))) continue; // an out-of-office answer is no reply
  const lead = message.reply_to ?? message.from.address; // form notifications carry the lead in Reply-To
  const thread = await call("GET", `/threads/${message.thread_id}`);
  if (thread.messages.some((item) => item.direction === "out")) {
    // The lead answered: this thread's follow-ups go, and an account executive takes it from here.
    const ids = new Set(thread.messages.map((item) => item.id));
    const scheduled = await call("GET", `/inboxes/${inbox.id}/drafts?status=scheduled&limit=100`);
    const canceled = scheduled.data.filter((draft) => ids.has(draft.reply_to_message_id));
    for (const draft of canceled) await call("DELETE", `/drafts/${draft.id}`);
    await call("PATCH", `/messages/${message.id}`, { add_labels: ["lead:replied"] });
    console.log("replied", lead, "follow-ups canceled:", canceled.length);
    continue;
  }
  const sent = await call("POST", `/messages/${message.id}/reply`, { text: ANSWER }, { "Idempotency-Key": `lead-${message.id}` });
  if (sent.error) {
    console.log("not sent", lead, sent.error.next_action);
    continue;
  }
  for (const [days, text] of Object.entries(FOLLOW_UPS)) {
    await call("POST", `/inboxes/${inbox.id}/drafts`, { reply_to_message_id: message.id, text, send_at: later(Number(days)) }, { "Idempotency-Key": `follow-${days}-${message.id}` });
  }
  await call("PATCH", `/messages/${message.id}`, { add_labels: ["lead:contacted"] });
  console.log("answered", lead, sent.status, sent.sends_at ?? "");
}
```

A follow-up is a reply to the lead's first message with nobody in `to`, so it goes to the same person the first answer reached, Reply-To included, and stays in the thread.

When a pace limit applies, the answer comes back with `status` `queued` and the `sends_at` it goes at, and the program prints both: nothing needs sending again. Pass `"if_limited": "refuse"` to get the limit's `429` instead and decide yourself.

## Work the leads from an MCP client

An account executive can run the desk from Claude or Cursor with the [MCP server](https://blueping.dev/agents.md), and take over any thread in the conversation.

```text
Answer new leads in selbywick-leads: thank them, ask how many trucks they run and what they plan routes with today, and schedule two follow-ups as drafts, three and seven days out. If a lead already replied, delete their follow-ups and give me a two-line summary of the thread.
```

| Tool | What it does here |
| --- | --- |
| `list_messages` | Reads the new leads and replies. |
| `reply_to_email` | Answers the lead, or the form's Reply-To, in the thread. |
| `create_draft` | Schedules each follow-up with `send_at`. |
| `list_drafts` | Finds the follow-ups waiting, with `status` `scheduled`. |
| `delete_draft` | Cancels a follow-up when the lead answered. |
| `get_limits` | Shows the new recipients the agent may still add, and when more fit. |

The tools ask the model to check with you before writing to someone for the first time, so an agent working a list it was handed asks before every new address.

## Cancel follow-ups the second a lead replies

A follow-up that goes an hour after the lead replied reads as careless. Subscribe to `email.received`, check the signature as [Webhooks](https://blueping.dev/docs/webhooks.md#verify) shows, and let the handler below delete a thread's pending follow-ups the moment the lead's reply lands.

```python
# lead_reply_hook.py: the part of your webhook server that cancels follow-ups when a lead replies.
# Check the Blueping-Signature header before calling handle(): /docs/webhooks#verify has the code.
import os

import requests

API = "https://blueping.dev/v1"
session = requests.Session()
session.headers["Authorization"] = f"Bearer {os.environ['BLUEPING_API_KEY']}"


def handle(event):
    if event["type"] != "email.received" or event["data"]["message"]["auto_reply"]:
        return  # an out-of-office answer is no reply: the follow-ups stay
    message = event["data"]["message"]
    thread = session.get(f"{API}/threads/{message['thread_id']}").json()
    if not any(item["direction"] == "out" for item in thread["messages"]):
        return  # a new lead: the desk answers it
    ids = {item["id"] for item in thread["messages"]}
    inbox_id = event["data"]["inbox"]["id"]
    scheduled = session.get(f"{API}/inboxes/{inbox_id}/drafts", params={"status": "scheduled", "limit": 100}).json()
    canceled = [draft["id"] for draft in scheduled["data"] if draft["reply_to_message_id"] in ids]
    for draft_id in canceled:
        session.delete(f"{API}/drafts/{draft_id}")
    session.patch(f"{API}/messages/{message['id']}", json={"add_labels": ["lead:replied"]})
    print("canceled", len(canceled), "follow-ups for", message["from"]["address"])
```

Deleting a scheduled draft answers with `status: canceled`, and a draft already sent can't be deleted, so the handler is safe to run at any moment.

## Selling by email without burning the address

Mail providers rate an address by how it writes to strangers. The inbox keeps the agent on the side of what they trust.

### A pace for new people

After the claim, an agent writes to people who never wrote to it a few at a time: 3 in the first hour, 10 in the first day and 25 in the first week, then 20 an hour on Free, 100 on Developer, 500 on Startup and 2,000 on Scale. Replies to leads whose mail passed DMARC never count, so inbound sales is mostly replies.

### A bounced address is not mailed again

Each email says whether it reached each lead: `email.delivered`, `email.bounced` or `email.complained`. Addresses that bounce or report spam join the agent's suppression list and are refused with `422 recipient_suppressed` from then on, so a bad address costs one send, never a whole sequence.

### Text that reads like phishing never leaves

A message with a link shortener, or one that asks for passwords or card details next to a link, is refused with `422 content_refused` before it goes.

### Stop means stop

When a lead asks not to be contacted, the agent deletes their follow-ups and adds a send block rule for their address: any later message to them is refused with `403 recipient_blocked`.

### Forged replies

A reply forged in the lead's name fails the DMARC policy of the lead's domain: it is turned away or held, so it can't cancel follow-ups or reach an account executive as a real answer.

## What 200 leads a month need

Two hundred leads get a first answer and up to two follow-ups each, about 600 sends a month, plus forwards to account executives. Half the leads arrive through the form, so about 100 new recipients a month, well inside the ramp once the first week is past.

**Developer fits this setup**: 50 inboxes, 15,000 sends a month and 1,500 a day, and 15 GB of storage, for $19 a month, or $180 a year. Its mail goes to people outside your company without a footer. Free runs the same flow at no cost, with a one-line footer on each email, which suits a trial.

Receiving is never counted, and each recipient of a send counts once. Every limit is on [Limits](https://blueping.dev/docs/limits.md), and every price on [Pricing](https://blueping.dev/pricing.md).

[The API reference](https://blueping.dev/docs/api.md) · [Webhooks](https://blueping.dev/docs/webhooks.md) · [The MCP server](https://blueping.dev/agents.md) · [Blueping vs AgentMail](https://blueping.dev/compare/agentmail.md) · [All use cases](https://blueping.dev/use-cases.md)

Last checked against the API on 27 November 2026.

## Questions about inbound leads

What builders ask before they set it up. The docs answer the rest.

[Read the docs](https://blueping.dev/docs.md)

### Can the agent send cold outreach?

It writes to people who never wrote to it at the ramp's pace: 3 in the first hour, 10 in the first day and 25 in the first week after the claim, then 20 an hour on Free, 100 on Developer, 500 on Startup and 2,000 on Scale. That pace suits answering people who asked, and keeps the agent's address trusted by the providers it writes to.

### Why did an answer come back queued?

It met a pace limit, such as the ramp of new recipients. It is accepted with `status` `queued` and `sends_at`, and goes out by itself then, with every check run again.

### Will a follow-up go out after the lead replies?

Not when the agent deletes it on the reply, as the program and the webhook above do. A deleted scheduled draft never goes. An out-of-office answer carries `auto_reply: true`, so it cancels nothing and gets no answer.

### Can an account executive take over the thread?

Yes. Forward the thread with a summary on top, and the account executive writes to the lead from their own address. Or send the lead a new message with the account executive in `cc`, which introduces them in one email.

### How do I stop mailing someone who asks?

Add a send block rule for their address with POST `/v1/inboxes/{id}/rules`. Every later message to them stops with `403 recipient_blocked`, whatever the agent writes.

### What happens when a lead's address bounces?

That send is refused with `422 recipient_refused`, and an address that bounced or reported spam before is refused at once with `422 recipient_suppressed`. GET `/v1/inboxes/{id}/deliverability` shows the inbox's bounce and complaint rates over 7, 30 or 90 days.

## More agents at work

- [Books Dana's meetings, dana-scheduling@blueping.dev. The demo itself: times offered, slot booked, reminder sent.](https://blueping.dev/use-cases/meeting-scheduling.md)
- [Answers Orlenwood's customers, orlenwood-support@blueping.dev. The same answer-in-the-thread desk, for customers after the sale.](https://blueping.dev/use-cases/support-inbox.md)
- [Answers Ridgeway's candidates, ridgeway-jobs@blueping.dev. Another pipeline run by labels, with candidates in it.](https://blueping.dev/use-cases/recruiting.md)
