AgentMail Inboxes API
The inboxes API from AgentMail — 2 operation(s) for inboxes.
The inboxes API from AgentMail — 2 operation(s) for inboxes.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/agentmail:agentmail-inboxes-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Reference Inboxes API
version: 1.0.0
servers:
- url: https://api.agentmail.to
description: prod
- url: https://x402.api.agentmail.to
description: prod-x402
- url: https://mpp.api.agentmail.to
description: prod-mpp
- url: https://api.agentmail.eu
description: eu-prod
tags:
- name: Inboxes
paths:
/v0/inboxes:
get:
operationId: inboxes_list
summary: List Inboxes
description: '**CLI:**
```bash
agentmail inboxes list
```'
tags:
- Inboxes
parameters:
- name: limit
in: query
required: false
schema:
$ref: '#/components/schemas/Limit'
- name: page_token
in: query
required: false
schema:
$ref: '#/components/schemas/PageToken'
- name: ascending
in: query
required: false
schema:
$ref: '#/components/schemas/Ascending'
responses:
'200':
description: Response with status 200
content:
application/json:
schema:
$ref: '#/components/schemas/inboxes_ListInboxesResponse'
security:
- Bearer: []
post:
operationId: inboxes_create
summary: Create Inbox
description: '**CLI:**
```bash
agentmail inboxes create --display-name "My Agent" --username myagent --domain agentmail.to
```'
tags:
- Inboxes
responses:
'200':
description: Response with status 200
content:
application/json:
schema:
$ref: '#/components/schemas/inboxes_Inbox'
'400':
description: Error response with status 400
content:
application/json:
schema:
$ref: '#/components/schemas/ValidationErrorResponse'
'422':
description: Error response with status 422
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/inboxes_CreateInboxRequest'
security:
- Bearer: []
/v0/inboxes/search:
get:
operationId: inboxes_search
summary: Search Inboxes
description: 'Searches inboxes in the organization by address or display name, ranked
by relevance. Each word in the query matches the start of a word in the
address or display name, so `sup` matches `support@example.com` but
`port` does not. An exact address match always ranks first. `limit`
cannot exceed 100. A page can be empty and still carry a
`next_page_token`; keep paging until the token is absent.'
tags:
- Inboxes
parameters:
- name: q
in: query
description: Address or display name to search for. Matches word prefixes. Must be 2 to 256 characters.
required: true
schema:
type: string
- name: limit
in: query
required: false
schema:
$ref: '#/components/schemas/Limit'
- name: page_token
in: query
required: false
schema:
$ref: '#/components/schemas/PageToken'
responses:
'200':
description: Response with status 200
content:
application/json:
schema:
$ref: '#/components/schemas/inboxes_SearchInboxesResponse'
'400':
description: Error response with status 400
content:
application/json:
schema:
$ref: '#/components/schemas/ValidationErrorResponse'
security:
- Bearer: []
/v0/inboxes/{inbox_id}:
get:
operationId: inboxes_get
summary: Get Inbox
description: '**CLI:**
```bash
agentmail inboxes get --inbox-id
```'
tags:
- Inboxes
parameters:
- name: inbox_id
in: path
required: true
schema:
$ref: '#/components/schemas/inboxes_InboxId'
responses:
'200':
description: Response with status 200
content:
application/json:
schema:
$ref: '#/components/schemas/inboxes_Inbox'
'404':
description: Error response with status 404
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- Bearer: []
patch:
operationId: inboxes_update
summary: Update Inbox
description: '**CLI:**
```bash
agentmail inboxes update --inbox-id --display-name "Updated Name"
```
To pause an inbox, set `status` to `paused`; set it back to `active` to
resume. See Pausing an inbox.'
tags:
- Inboxes
parameters:
- name: inbox_id
in: path
required: true
schema:
$ref: '#/components/schemas/inboxes_InboxId'
responses:
'200':
description: Response with status 200
content:
application/json:
schema:
$ref: '#/components/schemas/inboxes_Inbox'
'400':
description: Error response with status 400
content:
application/json:
schema:
$ref: '#/components/schemas/ValidationErrorResponse'
'404':
description: Error response with status 404
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'409':
description: Error response with status 409
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
requestBody:
description: Expects an object; provide at least one of `display_name`, `status`, or `metadata`.
content:
application/json:
schema:
$ref: '#/components/schemas/inboxes_UpdateInboxRequest'
security:
- Bearer: []
delete:
operationId: inboxes_delete
summary: Delete Inbox
description: '**CLI:**
```bash
agentmail inboxes delete --inbox-id
```'
tags:
- Inboxes
parameters:
- name: inbox_id
in: path
required: true
schema:
$ref: '#/components/schemas/inboxes_InboxId'
responses:
'200':
description: Successful response
'404':
description: Error response with status 404
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- Bearer: []
/v0/inboxes/{inbox_id}/authorize:
post:
operationId: inboxes_authorize
summary: Authorize Inbox
description: 'Authorizes the AgentID sign-in a client is already waiting in, for the
inbox in the path, and returns the ID of the pending public key it will
activate. Read the key with Get API Key. A repeat for the same token,
inbox, and bearer returns the same key ID. A `403` `AppSignupLimitError`
means the app accepts no more sign-ups from your organization.'
tags:
- Inboxes
parameters:
- name: inbox_id
in: path
required: true
schema:
$ref: '#/components/schemas/inboxes_InboxId'
responses:
'202':
description: Response with status 202
content:
application/json:
schema:
$ref: '#/components/schemas/inboxes_AuthorizeInboxResponse'
'400':
description: Error response with status 400
content:
application/json:
schema:
$ref: '#/components/schemas/ValidationErrorResponse'
'403':
description: 'The app''s sign-up limit for your organization is reached, or the app has paused new
sign-ups. `code` is `limit_exceeded` and `fix` says which. Inboxes that already have an
account at the app can still sign in.'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Error response with status 404
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/inboxes_AuthorizeInboxRequest'
security:
- Bearer: []
components:
schemas:
ErrorCode:
type: string
description: Stable, machine-readable error code in snake_case (for example, not_found or missing_permission). Branch on this rather than the message text.
title: ErrorCode
apiKeys_AcceptDisclosure:
type: boolean
description: 'Accept the app''s disclosure on the agent''s behalf, skipping the
first-use disclosure page. Requires `app_share_owner` when owner
scopes are involved.'
title: AcceptDisclosure
pods_PodId:
type: string
description: ID of pod.
title: PodId
inboxes_UpdateInboxRequest:
type: object
properties:
display_name:
$ref: '#/components/schemas/inboxes_DisplayName'
status:
$ref: '#/components/schemas/inboxes_InboxStatus'
description: '`paused` stops the inbox sending and receiving mail; `active` resumes
it. Mail that arrived while the inbox was paused is not delivered on
resume.'
metadata:
oneOf:
- $ref: '#/components/schemas/inboxes_UpdateMetadata'
- type: 'null'
description: 'Metadata to merge into the inbox''s existing metadata. Keys you include
are added or overwritten; keys you omit are left unchanged. To remove a
single key, send it with a null value. To clear all metadata, send
`metadata` as null. Sending an empty object is rejected; use null to
clear. Each update must include at least one of `display_name`,
`status`, or `metadata`.'
title: UpdateInboxRequest
Count:
type: integer
description: Number of items returned.
title: Count
ValidationErrorResponse:
type: object
properties:
name:
$ref: '#/components/schemas/ErrorName'
code:
$ref: '#/components/schemas/ErrorCode'
message:
$ref: '#/components/schemas/ErrorMessage'
errors:
description: Validation errors. Each entry has a path and a message identifying the invalid field.
fix:
$ref: '#/components/schemas/ErrorFix'
docs:
$ref: '#/components/schemas/ErrorDocs'
required:
- name
- errors
title: ValidationErrorResponse
inboxes_AuthorizeInboxRequest:
type: object
properties:
auth_token:
$ref: '#/components/schemas/apiKeys_AuthToken'
accept_disclosure:
$ref: '#/components/schemas/apiKeys_AcceptDisclosure'
required:
- auth_token
description: 'Authorize one pending AgentID sign-in for the inbox in the path. The
inbox is selected by the trusted path parameter, never by an AgentID
`login_hint`.'
title: AuthorizeInboxRequest
ErrorDocs:
type: string
description: Link to the error reference entry for this code.
title: ErrorDocs
inboxes_ClientId:
type: string
description: Client ID of inbox.
title: ClientId
inboxes_Metadata:
type: object
additionalProperties:
$ref: '#/components/schemas/inboxes_MetadataValue'
description: 'Custom key-value pairs attached to the inbox. Up to 256 keys. Keys and
string values are each limited to 256 characters. When updating metadata,
send a key with a null value to remove that key.'
title: Metadata
inboxes_CreateInboxRequest:
type: object
properties:
username:
type: string
description: Username of address. Randomly generated if not specified.
domain:
type: string
description: 'Domain of address. Must be a verified domain, or any subdomain of a
verified domain that has subdomains enabled (e.g., `bot.example.com`).
Defaults to `agentmail.to`.'
display_name:
$ref: '#/components/schemas/inboxes_DisplayName'
client_id:
$ref: '#/components/schemas/inboxes_ClientId'
status:
$ref: '#/components/schemas/inboxes_InboxStatus'
description: Set `paused` to create the inbox paused.
metadata:
$ref: '#/components/schemas/inboxes_Metadata'
description: Custom metadata to attach to the inbox.
title: CreateInboxRequest
apiKeys_ApiKeyId:
type: string
description: ID of api key.
title: ApiKeyId
inboxes_Inbox:
type: object
properties:
pod_id:
$ref: '#/components/schemas/pods_PodId'
inbox_id:
$ref: '#/components/schemas/inboxes_InboxId'
email:
$ref: '#/components/schemas/inboxes_Email'
display_name:
$ref: '#/components/schemas/inboxes_DisplayName'
client_id:
$ref: '#/components/schemas/inboxes_ClientId'
status:
$ref: '#/components/schemas/inboxes_InboxStatus'
description: '`paused` when the inbox is paused. Omitted when the inbox is active.
Treat any value other than `paused` as an inbox that sends and
receives normally.'
metadata:
$ref: '#/components/schemas/inboxes_Metadata'
description: Custom metadata attached to the inbox.
updated_at:
type: string
format: date-time
description: Time at which inbox was last updated.
created_at:
type: string
format: date-time
description: Time at which inbox was created.
required:
- pod_id
- inbox_id
- email
- updated_at
- created_at
title: Inbox
ErrorMessage:
type: string
description: Error message.
title: ErrorMessage
inboxes_Email:
type: string
description: Email address of the inbox.
title: Email
inboxes_DisplayName:
type: string
description: 'Display name: `Display Name <username@domain.com>`.'
title: DisplayName
inboxes_InboxId:
type: string
description: The ID of the inbox.
title: InboxId
inboxes_MetadataValue:
oneOf:
- type: string
- type: number
format: double
- type: boolean
description: A metadata value. May be a string, number, or boolean.
title: MetadataValue
inboxes_AuthorizeInboxResponse:
type: object
properties:
api_key_id:
$ref: '#/components/schemas/apiKeys_ApiKeyId'
description: ID of the public key the client will activate.
instructions:
type: string
enum:
- Authorization complete. Return to browser.
description: The agent's next step. Nothing further is required from the agent.
required:
- api_key_id
- instructions
description: 'The authorized sign-in''s key ID plus the agent''s next step. The key itself
is read with Get API Key.'
title: AuthorizeInboxResponse
ErrorFix:
type: string
description: The concrete next action that resolves the error.
title: ErrorFix
inboxes_ListInboxesResponse:
type: object
properties:
count:
$ref: '#/components/schemas/Count'
limit:
$ref: '#/components/schemas/Limit'
next_page_token:
$ref: '#/components/schemas/PageToken'
inboxes:
type: array
items:
$ref: '#/components/schemas/inboxes_Inbox'
description: Ordered by `created_at` descending.
required:
- count
- inboxes
title: ListInboxesResponse
Limit:
type: integer
description: Limit of number of items returned.
title: Limit
apiKeys_AuthToken:
type: string
pattern: ^[A-Za-z0-9_-]{22}$
minLength: 22
maxLength: 22
description: Token identifying one pending AgentID sign-in, read from the sign-in action on exactly `https://auth.agentid.com`.
title: AuthToken
Ascending:
type: boolean
description: Sort in ascending temporal order.
title: Ascending
inboxes_InboxStatus:
type: string
enum:
- active
- paused
description: 'Whether the inbox sends and receives mail. `paused` stops both: sends
return `403` with code `inbox_paused`, and incoming mail is not
delivered and not bounced, then or on resume. Mail already in the inbox,
its drafts, and its API keys are kept. Set `active` to resume.'
title: InboxStatus
ErrorName:
type: string
description: Name of error.
title: ErrorName
inboxes_SearchInboxesResponse:
type: object
properties:
count:
$ref: '#/components/schemas/Count'
limit:
$ref: '#/components/schemas/Limit'
next_page_token:
$ref: '#/components/schemas/PageToken'
inboxes:
type: array
items:
$ref: '#/components/schemas/inboxes_Inbox'
description: Ordered by relevance, best match first.
required:
- count
- inboxes
title: SearchInboxesResponse
PageToken:
type: string
description: Page token for pagination.
title: PageToken
ErrorResponse:
type: object
properties:
name:
$ref: '#/components/schemas/ErrorName'
code:
$ref: '#/components/schemas/ErrorCode'
message:
$ref: '#/components/schemas/ErrorMessage'
fix:
$ref: '#/components/schemas/ErrorFix'
docs:
$ref: '#/components/schemas/ErrorDocs'
required:
- name
- message
title: ErrorResponse
inboxes_UpdateMetadata:
type: object
additionalProperties:
oneOf:
- $ref: '#/components/schemas/inboxes_MetadataValue'
- type: 'null'
description: 'Custom key-value pairs to merge into the inbox''s existing metadata. A
value may be a string, number, boolean, or null. Setting a key to null
removes it. Up to 256 keys; keys and string values are each limited to
256 characters.'
title: UpdateMetadata
securitySchemes:
Bearer:
type: http
scheme: bearer
x-provenance:
method: harvested
publisher: AgentMail
source: https://docs.agentmail.to/openapi.json
note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
stamped by stamp-openapi-provenance.py (roadmap#793)