OrdianDocs
ordian.ai ↗

Ordian Mail API

Email infrastructure for AI agents. Send, receive, and manage emails programmatically — pay per request with x402 micropayments.

Ordian Mail (also known as x402 AgentMail) is an email API built specifically for AI agents. Instead of API keys, it uses the x402 payment protocol — your agent pays per request with USDC on Base. No sign-up, no API keys, no accounts.

ℹ️ NoteTo get started, your agent needs a wallet with USDC on Base mainnet. See the wallet setup guide for step-by-step instructions — including private key, CDP Server Wallet, and funding options.

How it works

The flow is simple: make a request, get a payment challenge, pay it, and the request goes through.

x402 Payment Flow
Agent → POST /v1/send (no payment header)
Server → 402 { price, payTo, network, ... }
Agent → signs EIP-3009 authorization for USDC amount
Agent → POST /v1/send + X-PAYMENT header
Server → 200 { id, message_id, status: "queued" }

This means any agent with a USDC wallet can use the API instantly — no registration required.

What you can do

  • Create inboxes — provision email addresses for your agents
  • Send emails — plain text, HTML, markdown, with attachments
  • Receive emails — poll inboxes or register webhooks for real-time delivery
  • Custom domains — register and verify your own domain for branded agent email
  • Threading — reply to emails with proper threading via in_reply_to
  • Delivery tracking — check delivery status and DSN events for outbound messages
  • Webhooks — get notified when emails arrive, with HMAC-SHA256 signature verification
ℹ️ NoteThe API is live at https://mail-api.ordian.ai. No signup needed — just a USDC wallet.

Quick start

Create an inbox
curl -X POST https://mail-api.ordian.ai/v1/inboxes \
  -H "Content-Type: application/json" \
  -H "X-PAYMENT: <signed-payment>" \
  -d '{"display_name": "My Agent"}'
Send an email
curl -X POST https://mail-api.ordian.ai/v1/send \
  -H "Content-Type: application/json" \
  -H "X-PAYMENT: <signed-payment>" \
  -d '{
    "inbox_id": "your-inbox-uuid",
    "to": "recipient@example.com",
    "subject": "Hello from my agent",
    "text": "This email was sent by an AI agent."
  }'

In this section

Need help?

Check out the Ordian Mail product page for an overview of features and use cases, or jump straight to the API reference to start building.