People are used to the traditional Gmail limitations — only having one inbox. That’s of the past.
An Inbox is now a fully loaded, programmatically accessible API resource re-designed for the scale of AI Agents.
Think of it as being similar to a Gmail or Outlook account, but built API-first. Each Inbox has a unique email address and serves as the primary resource your agent uses to send and receive emails, giving it a first-class identity on the internet.
Unlike traditional email providers that are designed for human scale, AgentMail Inboxes are built to scale horizontally. You can create tens, hundreds, or even thousands of Inboxes for your agents on demand.
Psst! Rather than sending 1000 emails from 1 Inbox, sending 10 emails
across 100 Inboxes actually improves deliverability! Read more about
optimizing for deliverability here
As the diagram below illustrates, your organization is the top-level container that holds all your resources. You can provision many Inboxes within your organization, each with its own Threads, Messages, and Attachments, allowing you to manage a large fleet of agents seamlessly.
Your organization is the highest-level entity. It acts as a container for
all your Inboxes, Domains, and API keys, allowing you to manage
everything in one place.
An Inbox is a single, scalable “email account” for your agent. You can
create thousands of Inboxes within your organization, each with its own
unique email address.
A Thread represents a single conversation. It groups together all replies
and forwards related to an initial email, keeping your interactions
organized.
Here at AgentMail we’ve now made an Inbox an API resource, meaning you can perform standard CRUD operations on it. Here are the core capabilities you’ll use to manage your Inboxes.
When creating an Inbox, the username and domain are optional. If you
don’t provide them, AgentMail will generate a unique address for you using our
default domain. Check out our guide on managing
domains to learn more.
Attach your own key-value data to any Inbox with the metadata field. Use it to link an inbox to records in your own system: a user ID, an agent name, or feature flags. Metadata is returned on every inbox response.
Values may be a string, number, or boolean. An Inbox can hold up to 256 keys, and each key and string value is limited to 256 characters.
Updates merge into the inbox’s existing metadata — keys you include are added or overwritten, and keys you omit are preserved.
To remove a single key, send it with a null value. To clear all metadata at
once, send metadata as null. Every update must include either
display_name or metadata.
You can create API keys that are restricted to a single inbox. An inbox-scoped key can only access that inbox’s threads, messages, and drafts. This is useful when you want to give an agent or integration the minimum access it needs.
See the Multi-Tenancy guide for more on scoped keys.
Copy one of the blocks below into Cursor or Claude for complete Inboxes API knowledge in one shot.