# AgentMail Send Email via x402

> AgentMail Send Email via x402 is a paid API for AI agents from x402.orth.sh, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Sends an email message from a specified AgentMail inbox, returning the message ID and thread ID

## Facts

- Endpoint: POST https://x402.orth.sh/agentmail/v0/inboxes/:inbox_id/messages/send
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentmail-send-email-via-x402-53b07c72
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_zZvUnElbaljXyd4EbbpB_

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability agentmail-send-email-via-x402-53b07c72 -d '<json body>'
```

Example prompt: Send an email from myagent@agentmail.to to alice@example.com with the subject 'Meeting Follow-Up' and a plain text body saying 'Hi Alice, great meeting you today — here are the next steps we discussed.'

## When to prefer this

Choose this endpoint when your AI agent needs to programmatically send outbound email from an AgentMail-managed inbox and you want to pay per-send via x402 micropayments (USDC) without managing SMTP infrastructure. It is ideal for agentic automation workflows where the sending identity is an agent-owned inbox (e.g., myagent@agentmail.to). Prefer this over general SMTP APIs when you need thread tracking (thread_id returned) and per-message cost accountability at $0.01 USDC.

## Known failure modes

- Missing recipient — if none of to, cc, or bcc are provided, the request fails with a validation error
- Invalid inbox_id — if the inbox email does not exist or is not accessible, returns a 404 or authorization error
- Malformed email addresses — invalid email format in recipient fields causes rejection
- Payment failure — x402 micropayment of $0.01 USDC not satisfied results in 402 Payment Required
- Missing body — if neither text nor html body is provided, the message may be rejected
- Invalid attachment format — attachments must include filename, content_type, and either base64 content or a URL; missing fields cause errors

## How this service works

Send an email message from an inbox. At least one recipient (to, cc, or bcc) is required. Returns the message_id and thread_id. Replace {inbox_id} directly in the path with the full inbox email (e.g., /v0/inboxes/myagent@agentmail.to/messages/send).

## Output

Returns a JSON object containing message_id (unique identifier for the sent message) and thread_id (identifier for the email thread the message belongs to), confirming successful delivery from the inbox.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "cc": {
   "type": "array",
   "description": "CC recipient email address(es). String or array of strings."
  },
  "to": {
   "type": "array",
   "description": "Recipient email address(es). At least one of to, cc, or bcc is required. Can be a string or array of strings."
  },
  "bcc": {
   "type": "array",
   "description": "BCC recipient email address(es). String or array of strings."
  },
  "html": {
   "type": "string",
   "description": "HTML body. Provide text, html, or both."
  },
  "text": {
   "type": "string",
   "description": "Plain text body. Provide text, html, or both."
  },
  "labels": {
   "type": "array",
   "description": "Array of label strings to tag the sent message."
  },
  "headers": {
   "type": "object",
   "description": "Custom email headers as key-value pairs (e.g., {\"X-Custom\": \"value\"})."
  },
  "subject": {
   "type": "string",
   "description": "Email subject line."
  },
  "reply_to": {
   "type": "array",
   "description": "Reply-to address(es) if different from the inbox address."
  },
  "attachments": {
   "type": "array",
   "description": "Array of attachment objects: {filename: string, content_type: string, content: string (base64)} or {filename: string, content_type: string, url: string}."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentmail-send-email-via-x402-53b07c72/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.orth.sh](https://www.zero.xyz/host/x402.orth.sh/llms.txt)
