Skip to content

Blog / All posts

Can an AI agent sign up for its own email account? (2026)

Yes, through an email API with an agent sign-up endpoint: AgentMail's POST /v0/agent/sign-up and Bavimail's POST /registrations need no API key. Gmail and Outlook don't allow it.

Originally published

Yes. An AI agent can create its own email account, but not on Gmail or Outlook. It needs an email API that exposes a sign-up call without an API key. Two do as of November 2026: AgentMail (POST /v0/agent/sign-up) and Bavimail (POST /registrations, or the bavimail_register MCP tool). In both, the agent gets a working API key in one call and a person confirms once later: with a 6-digit code on AgentMail, with a claim link on Bavimail.

We build Bavimail. AgentMail's behavior below is from its own documentation, checked on November 30, 2026.

Why can't an agent sign up for Gmail or Outlook?

Consumer sign-up is designed to keep automated accounts out. Google and Microsoft ask for phone verification and CAPTCHAs, and their terms forbid creating accounts by automated means. An agent that gets through anyway is running on an account that can be suspended at any time, along with every service it used that address to sign up for.

Agent email APIs take the opposite approach: the sign-up endpoint expects a program, and a person is attached afterwards for accountability.

How do AgentMail and Bavimail compare?

AgentMailBavimail
Sign-up callPOST /v0/agent/sign-up (no API key)POST /registrations (no credentials), MCP tool bavimail_register
What the agent gets at onceAn API key and an inbox at [email protected]An API key for a provisional account
AddressOn agentmail.to right awayOn a domain the agent adds and verifies (it needs DNS access)
Before a person confirms1 inbox, no custom domain, 10 emails a day, sendable only to the human's addressSends only to the account's own verified domains, 50 in total; 2 domains, 3 webhooks, inboxes capped per domain
How a person confirmsA 6-digit code is emailed to them; the agent submits it to POST /v0/agent/verifyThey open the claim_url the agent hands over and verify their email; no code passes through the agent
Without a personSign-up without human_email gives a receive-only inboxThe account and everything in it is deleted after 7 days unless claimed
After confirmationFree plan: 3 inboxes, 1 custom domain, 100 emails a dayFree plan, with the same API key and everything already set up

The practical difference: AgentMail gets the agent an address immediately, on AgentMail's domain. Bavimail lets the agent build the whole email setup on your domain (domains, inboxes, inbound webhooks, test sends) before anyone signs in, and then the person takes over the account with one link.

How does an agent sign up for Bavimail?

One unauthenticated request:

curl -X POST https://api.bavimail.com/registrations \
  -H "Content-Type: application/json" \
  -d '{"name": "Shop agent"}'

The response carries the API key, the sandbox limits and the claim link:

{
  "registration": {
    "state": "provisional",
    "expires_at": "2026-12-07T12:00:00.000Z",
    "sandbox": { "send_limit": 50, "sends_used": 0, "sends_remaining": 50, "domain_limit": 2, "inboxes_per_domain_limit": 5, "webhook_limit": 3 }
  },
  "api_key": { "key": "ak_…", "name": "Shop agent" },
  "claim": {
    "claim_url": "https://bavimail.com/claim?__clerk_ticket=…",
    "expires_at": "2026-12-07T12:00:00.000Z"
  }
}

From there the agent uses api_key.key in the x-api-key header like any other client:

  1. POST /domains to add your domain, then publish the DNS records it returns and verify.
  2. POST /inboxes to create [email protected].
  3. POST /webhooks to receive email.inbound.received events for replies.
  4. POST /outbound-emails to send a test to an address on the same domain.

An agent connected to the hosted MCP server at https://mcp.bavimail.com/ can call bavimail_register instead of the REST endpoint. Registrations are rate limited per network.

What does the person do afterwards?

The agent gives them claim.claim_url. Opening it signs them in to that very account. They add and verify an email address (or connect Google), and the account is theirs:

  • The API key the agent already embedded keeps working.
  • The sandbox limits disappear and billing starts on the free plan.
  • GET /registrations/me (bavimail_get_registration) shows the state and sandbox usage; POST /registrations/me/claim-link mints a new link if the first one was lost.

If the person already has a Bavimail account, the agent should not register: a provisional account is a separate account and is not merged. Ask them for an API key from the dashboard instead.

What should an agent not do?

  • Don't sign up for consumer mailboxes. Accounts created by automation on Gmail or Outlook break the providers' terms and get suspended.
  • Don't send to strangers before a person is attached. Both APIs block it on purpose: AgentMail allows only the human's address, Bavimail only the account's own domains.
  • Store the API key durably. AgentMail can't recover a key from a sign-up without a human email, and an unclaimed Bavimail account is deleted after 7 days.

The full Bavimail flow, with the sandbox rules and error codes, is in agent onboarding. To give an existing agent an address on your domain without self-registration, see how to give an AI agent its own email inbox.

← All posts