Your Driftline code is 482913. It expires in 10 minutes.
Your agent signs up on its own.
It gets an address for each run, and one call returns the code the moment the email lands, with the sender checked.
// Wait for the code, from Driftline onlyGET /v1/inboxes/inb_3Kd8/code?wait=50&from=driftline.example200 { "code": "482913", "message_id": "em_9PzR4fYc" }POST /v1/inboxes/inb_3Kd8/messages{ "to": "sam@ortiz.example", "subject": "Driftline is set up", "text": "Signed in with the code." }202 { "status": "sent" }
browser-agent-7
Browser agent, run 7
Driftline is set up. I signed in with the code and saved the login for you.
Browser agent 7 · browser-agent-7
{ "type": "email.received", "data": { "inbox": { "address": "browser-agent-7@blueping.dev " }, "message": { "id": "em_9PzR4fYc", "from": { "address": "no-reply@driftline.example", "name": "Driftline" }, "subject": "Your sign-in code", "codes": [ { "value": "482913" } ], "auth": { "dmarc": "pass" } } }}
Driftline's code reaches browser-agent-7@blueping.dev, one call hands it over with the sender's DMARC result, and the agent tells Sam the account is ready.
How can an AI agent receive email verification codes?
Give each run its own inbox with POST /v1/inboxes, type that address into the form, then call GET /v1/inboxes/{id}/code?wait=50, which waits on Blueping's side and returns the code and the sign-in link as soon as the email lands. Every code comes with the sender's DMARC result, and a code that arrives in held mail is reported to the agent instead of handed over.
Why a shared mailbox breaks agent sign-ups
Sam runs browser agents that keep a pricing table up to date. Half of the 40 vendors he follows show their prices only to signed-in accounts, so every Monday a run signs up where it has to, and each sign-up sends a six-digit code that expires within minutes. This week's run is browser-agent-7.
On Sam's own mailbox the job kept failing. Reading one code took OAuth consent over everything he receives. Six vendors sent their codes within the same minute, and the agent typed one into the wrong form. A polling loop either hammered the mailbox or missed the expiry. And an email that claimed to come from Driftline read as Driftline, even from a lookalike domain that asked the agent to confirm somewhere else.
Now each run has an inbox of its own. It receives only what that run's sign-ups trigger, a code comes back through one call that waits until it lands, and the sender's domain is checked before the agent reads a word.
From the sign-up form to a confirmed account
Five steps, most of them one call. The agent's browser fills in the form, and Blueping provides the address, the wait and the checks.
Create the run's inbox
The agent asks for its inbox with the run's name as
client_id, such asbrowser-agent-7, and asusernametoo when the address should carry it. A retry of the run lands on the same inbox, so a crashed run never leaves a second address behind.Call: POST
/v1/inboxeswithclient_idAnswer:
201withid(inb_...) andaddress, or200with the inbox that already has thisclient_idChecked: The plan's inboxes and the inboxes created today, deleted ones included
Submit the form with that address
The agent types
addressinto the vendor's sign-up form through its browser tool, or posts it to the vendor's API. The inbox receives from the moment it exists: there is no DNS record to add and no warm-up.Call: None: this step is the agent's own
Answer: The vendor sends its confirmation email to the new address
Checked: Mail up to 25 MB is accepted; anything addressed to a deleted inbox is refused
Wait for the code
One call blocks until a message with a code or a sign-in link arrives, for up to 60 seconds.
from=driftline.examplekeeps an unrelated email from ending the wait, and a code that landed just before the call still counts, since the call looks back 10 minutes.Call: GET
/v1/inboxes/{id}/code?wait=50&from=driftline.exampleAnswer:
200withcode,link,message_id,fromandauth.verdict;404 no_code_yetwith what did arriveChecked: SPF, DKIM and DMARC as the receiving server recorded them; a held message ends the wait as
404 code_heldUse the code if the sender is proven
The agent enters
codein the form, or openslinkwhen the vendor sends a magic link. It does so whenauth.verdictispass, which means DMARC tied the From domain to the server that sent it.Call: GET
/v1/messages/{id}when the agent needs the whole emailAnswer: The full
textandhtml, every link with itskind, and the threadingheadersChecked: The agent's own rule:
pass, or stop and tell a personKeep the inbox, or retire it
Vendors send password resets and receipts to the address they know, so Sam keeps a run's inbox while its accounts live and finds it again by
client_id. When they close for good, deleting the inbox retires its address.Call: DELETE
/v1/inboxes/{id}Answer:
200withdeleted: trueanddeleted_atChecked: A deleted address is never given to anyone again, so nobody can receive that account's resets
Step 3's answer, whole, as the code call returns it:
{
"code": "718204",
"link": null,
"message_id": "em_9PzR4fYc1KwM6tDq3VxB",
"thread_id": "th_3HkT9cVb2LwQ8sXe5RmN",
"from": { "address": "no-reply@driftline.example", "name": "Driftline" },
"auth": { "verdict": "pass" },
"subject": "Confirm your email",
"received_at": "2026-11-23T09:14:02.000Z",
"codes": [{ "value": "718204" }]
}The sign-up loop in Python and Node.js
The program runs one sign-up end to end. fill_signup_form stands for your agent's browser step: replace its body with the call that types the address into the form. The rest is the Blueping API over plain HTTPS, with nothing to install but requests in Python.
# signup_code.py: one sign-up, one inbox, and the code the service sends to it.
# pip install requests
import os
import requests
API = "https://blueping.dev/v1"
session = requests.Session()
session.headers["Authorization"] = f"Bearer {os.environ['BLUEPING_API_KEY']}"
def fill_signup_form(address):
# Your agent's browser step: type the address into the sign-up form and submit it.
print(f"signing up to Driftline as {address}")
inbox = session.post(f"{API}/inboxes", json={"client_id": "browser-agent-7"}).json()
fill_signup_form(inbox["address"])
found = None
for attempt in range(3): # three waits cover a slow sender
answer = session.get(
f"{API}/inboxes/{inbox['id']}/code",
params={"wait": 50, "from": "driftline.example"},
timeout=70,
).json()
if "error" not in answer:
found = answer
break
if answer["error"]["code"] != "no_code_yet": # code_held: a person reads it first
raise SystemExit(f"{answer['error']['code']}: {answer['error']['next_action']}")
if found is None:
raise SystemExit("no code from driftline.example after three waits")
if found["auth"]["verdict"] != "pass":
raise SystemExit(f"{found['from']['address']} is not proven by DMARC: the code stays unused")
print("code", found["code"] or found["link"], "from", found["from"]["address"])// signup-code.mjs: one sign-up, one inbox, and the code the service sends to it. Node.js 18 or later.
const API = "https://blueping.dev/v1";
const headers = { Authorization: `Bearer ${process.env.BLUEPING_API_KEY}`, "Content-Type": "application/json" };
async function fillSignupForm(address) {
// Your agent's browser step: type the address into the sign-up form and submit it.
console.log(`signing up to Driftline as ${address}`);
}
const inbox = await (await fetch(`${API}/inboxes`, { method: "POST", headers, body: JSON.stringify({ client_id: "browser-agent-7" }) })).json();
await fillSignupForm(inbox.address);
let found = null;
for (let attempt = 0; attempt < 3 && !found; attempt++) {
// three waits cover a slow sender
const answer = await (await fetch(`${API}/inboxes/${inbox.id}/code?wait=50&from=driftline.example`, { headers })).json();
if (!answer.error) found = answer;
else if (answer.error.code !== "no_code_yet") throw new Error(`${answer.error.code}: ${answer.error.next_action}`); // code_held: a person reads it first
}
if (!found) throw new Error("no code from driftline.example after three waits");
if (found.auth.verdict !== "pass") throw new Error(`${found.from.address} is not proven by DMARC: the code stays unused`);
console.log("code", found.code ?? found.link, "from", found.from.address);Run it with BLUEPING_API_KEY in the environment. The loop asks three times because one wait lasts 60 seconds at most, so a vendor that takes two minutes to send is still caught. On any error other than no_code_yet the program stops and prints next_action: for code_held, that means a person reads the email before anyone types its code.
Every field the program reads is described in the API reference, and every error it can meet is on the errors page.
Run the sign-up from an MCP client
An agent connected to the hosted MCP server needs no code for this. The prompt below makes the client call the tools in the order of the steps above, with its own browser tool for the form.
Create a Blueping inbox with client_id browser-agent-7. Sign up at driftline.example with its address using your browser, then wait for the verification code from driftline.example and enter it. If the sender is not proven or the email is held, stop and tell me why.| Tool | What it does here |
|---|---|
create_inbox | Makes the inbox for the task, or finds it again by client_id. |
wait_for_code | Blocks for up to 60 seconds, then answers with code, link and the sender's DMARC result. |
read_message | Reads the whole email when the vendor sent instructions with the code. |
delete_inbox | Retires the address at the end. The tool is marked for your confirmation, and clients that read the mark ask you first. |
The answer of wait_for_code carries untrusted: true and tells the model to use the code for the task you asked for and nothing else. A held email never yields its code to the tool.
Hand codes to waiting sign-ups with a webhook
A sign-up worker that runs in a queue can skip the long poll. Subscribe an endpoint to email.received and email.held with POST /v1/webhooks, using a key that holds held:read, which held mail's events need, and each confirmation email reaches your server as a signed POST, with codes and links already in data.message. Webhooks shows how to check the Blueping-Signature header; once it holds, pass the event to the handler below.
// codes-hook.mjs: the part of your webhook server that hands each code to the sign-up waiting for it.
// Check the Blueping-Signature header before calling handle(): /docs/webhooks#verify has the code.
const waiting = new Map(); // inbox id -> resolve() of the sign-up that waits on it
export const codeFor = (inboxId) => new Promise((resolve) => waiting.set(inboxId, resolve));
export async function handle(event) {
const { inbox, message } = event.data;
if (event.type === "email.held") {
console.log(`held for ${inbox.address}: ${message.safety.held_reason}, the code stays unused`);
return;
}
if (event.type !== "email.received" || message.auth.verdict !== "pass") return;
const code = message.codes[0]?.value ?? message.links.find((link) => link.kind !== "other")?.url;
if (!code) return;
console.log(`code for ${inbox.address}: ${code}`);
waiting.get(inbox.id)?.(code);
waiting.delete(inbox.id);
}codeFor(inbox.id) returns a promise the sign-up awaits right after it submits the form. A held email resolves nothing: the handler logs its reason, and the sign-up times out on your side with a clear cause.
What stops a lookalike sender
A verification code is a key to an account, so the checks sit between the email and the agent.
A failed check holds the email
Mail that fails DMARC is turned away at the door when the sender's domain asks for that, and stored as held with held_reason: unauthenticated otherwise. The code call answers 404 code_held with its message_id at once, so the agent learns about it without waiting out the timeout.
An unproven sender is flagged
A vendor that publishes no DMARC policy arrives with auth.verdict: none. The message is delivered and its code returned, marked unproven. The program above refuses none as well as fail; loosen that only for vendors you have checked.
Words aimed at the agent are held
An email that tells a model to ignore its instructions, or hides an order such as sending the code to another address in text a person can't see, is held as suspicious, and its code never comes out of the code call. Security describes each check.
The wait takes one domain
from=driftline.example matches that domain and its subdomains alone, so mail from driftline-billing.example never ends the wait, whatever its own checks say. A run's inbox also keeps its mail apart from everything else Sam receives.
A retired address stays retired
Once the inbox is deleted, its address is never reissued, so nobody can request a reset for that vendor account and read it.
What a weekly sign-up run needs
Sam keeps the inboxes of the last eight runs, two months of accounts, and each run sends him one line when it is done. Receiving never counts as a send and a code costs nothing to read, so inboxes are the number to plan for.
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.
Receiving is never counted, and each recipient of a send counts once. Every limit is on Limits, and every price on Pricing.
The API referenceWebhooksThe MCP serverBlueping vs AgentMailAll use cases
Last checked against the API on .
Questions about sign-up codes
What builders ask before they set it up. The docs answer the rest.
Does it work with magic links?
Yes. link holds the first link sorted as verify or login, and codes lists up to five codes, the likeliest first. The agent opens the link with its browser tool to finish the sign-in.
What does Blueping count as a code?
4 to 8 digits, or capitals mixed with digits, standing near words such as code, verification, one-time, OTP, PIN or confirm, in the subject or in the text a person sees. A year, a price or part of a longer number is skipped. When DMARC proves the sender, its OTP-Token header counts too.
How long can one call wait?
Up to 60 seconds. Past that, 404 no_code_yet says what arrived meanwhile, held mail included, with retry_after: 1. A next call without since looks back 10 minutes again, so a code that landed in between still counts.
Can several sign-ups share one inbox?
Yes, as a run's inbox does: set from to each vendor's domain, so each wait ends on its own vendor's mail. An inbox per vendor keeps each account's mail apart instead, which helps when a password reset arrives months later.
What happens to a code in a held email?
The code call never returns it. It answers 404 code_held with the message_id and the reason, and GET /v1/messages/{id} lets a person, or the agent on that person's say-so, read the email and decide.
Can an agent do this before anyone signs up to Blueping?
Yes. POST /v1/signup creates the agent, its key and its first inbox with no person, and that inbox receives codes at once. Until a person claims the agent it holds 1 inbox, enough for one sign-up at a time. Agent onboarding has the flow.
How long is the vendor's email kept?
On Free, 90 days, with its attachments; on a paid plan, until you delete it. Deleting the inbox removes its mail right away, along with the address.
More agents at work
- Tests sign-up emails in CI,qa-runner
@blueping.dev. The same wait, pointed at your own app's sign-up emails in a test suite. - Checks the emails a branch sends,dev-feature-login
@blueping.dev. Sign-ups like this one, run from Claude Code, Codex or Cursor over MCP. - Answers the planner's tasks,research-worker
@blueping.dev. One address per agent, when several agents open accounts in parallel.
Give every sign-up an address
One call for the inbox, one call for the code.