Back to use cases
Product4 min read· Nov 18, 2026

Receive verification codes on an AI agent's phone number

How an AI agent gets its own phone number, signs up for services and reads the one-time code from the inbound SMS webhook or through the MCP watch_messages tool, with no carrier registration needed for inbound.

AgentPhone TeamFounders
Receive verification codes on an AI agent's phone number

An agent is setting up a new vendor account for the company it works for. It fills the form, hits submit, and the site says "we sent a code to the number ending in 0147". Yesterday that would have been where the task stopped: a human gets pinged, finds the phone, reads six digits back into a chat. Today the number ending in 0147 belongs to the agent. The code arrives on its webhook, it types it in, and the account is created.

Phone verification is the most common place an autonomous workflow stalls. Giving the agent a real number removes the stall.

Why inbound needs nothing from the carriers

10DLC registration is about outbound texting from US local numbers. Inbound SMS works on the day you buy the number. For verification codes the agent never sends anything, so there is no registration, no review and no waiting. Buy the number, attach it to the agent, and the next code that gets sent to it arrives on your webhook. One gate to know about: on accounts that have never made a real payment, one-time codes are replaced with a placeholder. The $5 signup credit does not count, so add funds once before you rely on this.

Numbers are $3 every 30 days in the US and Canada, $6 in the UK on enabled accounts. Buy one with POST /v1/numbers with a country and the agent id.

Reading the code from the webhook

The code arrives as an ordinary agent.message event. Your handler pulls the digits out of the body and hands them to whatever is driving the browser.

json
{
"event": "agent.message",
"channel": "sms",
"data": {
"from": "+18005550101",
"message": "Your Northwind verification code is 482913. It expires in 10 minutes.",
"conversationId": "conv_otp_31"
},
"recentHistory": []
}

Two practical notes. Check the webhook signature: it is an HMAC over {X-Webhook-Timestamp}.{raw body} in X-Webhook-Signature, and a verification flow that accepts unsigned posts is a verification flow someone else can complete for you. And key the code by sender and time, because an agent signing up for three services at once will get three codes in the same minute.

Reading the code from MCP

If the agent runs in Claude Code, Cursor, Codex or anything else that speaks MCP, there is no webhook to write. Connect the hosted server at https://mcp.agentphone.ai/mcp and the agent gets 28 tools, one of which is watch_messages. The agent submits the signup form, calls watch_messages with its number id, and the tool returns when the text lands. Then it reads the message with get_messages and carries on. It is the same loop a person runs with a phone next to the laptop, minus the person.

The local option is npx -y agentphone-mcp with AGENTPHONE_API_KEY set. Either way, npx skills add AgentPhone-AI/skills installs a skill so /agentphone knows how to drive the tools.

Use it for accounts you own

This is the paragraph to read twice. The number is for verifying accounts that belong to you or your company: your SaaS vendors, your own staging environments, the dozen tools a new employee gets signed up for. It is not for creating accounts in other people's names, bypassing someone else's verification, or opening accounts in bulk on services that forbid it. Carriers treat that as fraud, and the number and the account that bought it get shut down. Services also have their own terms about automated signups, and we will not help you around them.

Some services refuse codes to numbers they classify as VoIP. That is their decision, not something we can override, and the honest answer is that a few verifications will still need a human and a handset.

Beyond the code

Once the agent has a number for OTPs it has a number for everything else. The vendor it just signed up with can text it about outages. A delivery it ordered can text when it arrives. The agent can place a call to a supplier at $0.13 a minute in webhook mode, or text a colleague once the number is 10DLC registered. The number that began as a code catcher tends to become the agent's contact card.

What it costs

ItemPrice
Number, US/CA$3 per 30 days
Number, UK$6 per 30 days, enabled accounts
Each code received$0.02 per segment
Registration for inboundNone
Outbound text later, if needed$0.02 per segment, after 10DLC ($25 once for a sole proprietor or standard brand)

An agent receiving fifty verification codes a month pays $1 for the codes and $3 for the number. There is $5 of free credit on signup with no card. Prices are from the pricing page.

FAQ

Do I need 10DLC registration to receive verification codes? No. Inbound SMS works without registration from the moment you buy the number. Registration is only needed if the agent sends texts from a US local number.

How does the agent read the code? Either from the agent.message event on your webhook, which carries the message body, or through the MCP watch_messages tool followed by get_messages if the agent runs in an MCP client.

Can I use this to verify accounts for other people? No. The number is for accounts you or your company own. Using it to bypass other people's verification or to mass-create accounts breaks carrier rules and gets the number shut off.

Will every service accept the number? Most do. Some services block numbers they classify as VoIP, and those will still need a handset.

What does it cost to receive codes? $0.02 per inbound segment plus $3 every 30 days for the number. Fifty codes a month is about $4 all in.

Ready to give your AI Agent a phone number?