AgentMail pods > inboxes API
The pods > inboxes API from AgentMail — 2 operation(s) for pods > inboxes.
The pods > inboxes API from AgentMail — 2 operation(s) for pods > inboxes.
openapi: 3.1.0
info:
title: API Reference agent pods > 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: pods > inboxes
paths:
/v0/pods/{pod_id}/inboxes:
get:
operationId: list
summary: List Inboxes
description: '**CLI:**
```bash
agentmail pods:inboxes list --pod-id <pod_id>
```'
tags:
- pods > inboxes
parameters:
- name: pod_id
in: path
required: true
schema:
$ref: '#/components/schemas/type_pods:PodId'
- name: limit
in: query
required: false
schema:
$ref: '#/components/schemas/type_:Limit'
- name: page_token
in: query
required: false
schema:
$ref: '#/components/schemas/type_:PageToken'
- name: ascending
in: query
required: false
schema:
$ref: '#/components/schemas/type_:Ascending'
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
responses:
'200':
description: Response with status 200
content:
application/json:
schema:
$ref: '#/components/schemas/type_inboxes:ListInboxesResponse'
'404':
description: Error response with status 404
content:
application/json:
schema:
$ref: '#/components/schemas/type_:ErrorResponse'
post:
operationId: create
summary: Create Inbox
description: '**CLI:**
```bash
agentmail pods:inboxes create --pod-id <pod_id> --username myagent --domain example.com
```'
tags:
- pods > inboxes
parameters:
- name: pod_id
in: path
required: true
schema:
$ref: '#/components/schemas/type_pods:PodId'
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
responses:
'200':
description: Response with status 200
content:
application/json:
schema:
$ref: '#/components/schemas/type_inboxes:Inbox'
'400':
description: Error response with status 400
content:
application/json:
schema:
$ref: '#/components/schemas/type_:ValidationErrorResponse'
'422':
description: Error response with status 422
content:
application/json:
schema:
$ref: '#/components/schemas/type_:ErrorResponse'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/type_inboxes:CreateInboxRequest'
/v0/pods/{pod_id}/inboxes/{inbox_id}:
get:
operationId: get
summary: Get Inbox
description: '**CLI:**
```bash
agentmail pods:inboxes get --pod-id <pod_id> --inbox-id <inbox_id>
```'
tags:
- pods > inboxes
parameters:
- name: pod_id
in: path
required: true
schema:
$ref: '#/components/schemas/type_pods:PodId'
- name: inbox_id
in: path
required: true
schema:
$ref: '#/components/schemas/type_inboxes:InboxId'
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
responses:
'200':
description: Response with status 200
content:
application/json:
schema:
$ref: '#/components/schemas/type_inboxes:Inbox'
'404':
description: Error response with status 404
content:
application/json:
schema:
$ref: '#/components/schemas/type_:ErrorResponse'
patch:
operationId: update
summary: Update Inbox
description: '**CLI:**
```bash
agentmail pods:inboxes update --pod-id <pod_id> --inbox-id <inbox_id>
```'
tags:
- pods > inboxes
parameters:
- name: pod_id
in: path
required: true
schema:
$ref: '#/components/schemas/type_pods:PodId'
- name: inbox_id
in: path
required: true
schema:
$ref: '#/components/schemas/type_inboxes:InboxId'
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
responses:
'200':
description: Response with status 200
content:
application/json:
schema:
$ref: '#/components/schemas/type_inboxes:Inbox'
'404':
description: Error response with status 404
content:
application/json:
schema:
$ref: '#/components/schemas/type_:ErrorResponse'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/type_inboxes:UpdateInboxRequest'
delete:
operationId: delete
summary: Delete Inbox
description: '**CLI:**
```bash
agentmail pods:inboxes delete --pod-id <pod_id> --inbox-id <inbox_id>
```'
tags:
- pods > inboxes
parameters:
- name: pod_id
in: path
required: true
schema:
$ref: '#/components/schemas/type_pods:PodId'
- name: inbox_id
in: path
required: true
schema:
$ref: '#/components/schemas/type_inboxes:InboxId'
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
responses:
'200':
description: Successful response
'404':
description: Error response with status 404
content:
application/json:
schema:
$ref: '#/components/schemas/type_:ErrorResponse'
components:
schemas:
type_inboxes:MetadataValue:
oneOf:
- type: string
- type: number
format: double
- type: boolean
description: A metadata value. May be a string, number, or boolean.
title: MetadataValue
type_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/type_inboxes:DisplayName'
client_id:
$ref: '#/components/schemas/type_inboxes:ClientId'
metadata:
$ref: '#/components/schemas/type_inboxes:Metadata'
description: Custom metadata to attach to the inbox.
title: CreateInboxRequest
type_inboxes:ListInboxesResponse:
type: object
properties:
count:
$ref: '#/components/schemas/type_:Count'
limit:
$ref: '#/components/schemas/type_:Limit'
next_page_token:
$ref: '#/components/schemas/type_:PageToken'
inboxes:
type: array
items:
$ref: '#/components/schemas/type_inboxes:Inbox'
description: Ordered by `created_at` descending.
required:
- count
- inboxes
title: ListInboxesResponse
type_inboxes:Email:
type: string
description: Email address of the inbox.
title: Email
type_inboxes:ClientId:
type: string
description: Client ID of inbox.
title: ClientId
type_pods:PodId:
type: string
description: ID of pod.
title: PodId
type_inboxes:Metadata:
type: object
additionalProperties:
$ref: '#/components/schemas/type_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
type_:Count:
type: integer
description: Number of items returned.
title: Count
type_inboxes:Inbox:
type: object
properties:
pod_id:
$ref: '#/components/schemas/type_pods:PodId'
inbox_id:
$ref: '#/components/schemas/type_inboxes:InboxId'
email:
$ref: '#/components/schemas/type_inboxes:Email'
display_name:
$ref: '#/components/schemas/type_inboxes:DisplayName'
client_id:
$ref: '#/components/schemas/type_inboxes:ClientId'
metadata:
$ref: '#/components/schemas/type_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
type_: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
type_inboxes:UpdateMetadata:
type: object
additionalProperties:
oneOf:
- $ref: '#/components/schemas/type_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
type_inboxes:InboxId:
type: string
description: The ID of the inbox.
title: InboxId
type_:ValidationErrorResponse:
type: object
properties:
name:
$ref: '#/components/schemas/type_:ErrorName'
code:
$ref: '#/components/schemas/type_:ErrorCode'
message:
$ref: '#/components/schemas/type_:ErrorMessage'
errors:
description: Validation errors. Each entry has a path and a message identifying the invalid field.
fix:
$ref: '#/components/schemas/type_:ErrorFix'
docs:
$ref: '#/components/schemas/type_:ErrorDocs'
required:
- name
- errors
title: ValidationErrorResponse
type_inboxes:UpdateInboxRequest:
type: object
properties:
display_name:
$ref: '#/components/schemas/type_inboxes:DisplayName'
metadata:
oneOf:
- $ref: '#/components/schemas/type_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` or
`metadata`.'
title: UpdateInboxRequest
type_:ErrorFix:
type: string
description: The concrete next action that resolves the error.
title: ErrorFix
type_:ErrorMessage:
type: string
description: Error message.
title: ErrorMessage
type_:Limit:
type: integer
description: Limit of number of items returned.
title: Limit
type_:PageToken:
type: string
description: Page token for pagination.
title: PageToken
type_:ErrorName:
type: string
description: Name of error.
title: ErrorName
type_:ErrorDocs:
type: string
description: Link to the error reference entry for this code.
title: ErrorDocs
type_inboxes:DisplayName:
type: string
description: 'Display name: `Display Name <username@domain.com>`.'
title: DisplayName
type_:ErrorResponse:
type: object
properties:
name:
$ref: '#/components/schemas/type_:ErrorName'
code:
$ref: '#/components/schemas/type_:ErrorCode'
message:
$ref: '#/components/schemas/type_:ErrorMessage'
fix:
$ref: '#/components/schemas/type_:ErrorFix'
docs:
$ref: '#/components/schemas/type_:ErrorDocs'
required:
- name
- message
title: ErrorResponse
type_:Ascending:
type: boolean
description: Sort in ascending temporal order.
title: Ascending
securitySchemes:
Bearer:
type: http
scheme: bearer