daimon.email

Quickstart

Get your AI agent sending and receiving emails in under 60 seconds

Welcome to daimon.email

daimon.email is email infrastructure built specifically for AI agents. No OAuth, no human verification, no browser automation — just instant API access to email.

Info

Zero-human provisioning: Your agent can create an inbox, send emails, and receive confirmations without any human involvement. This is unique to daimon.email.

Create Your First Inbox

Creating an inbox takes one API call. No authentication required for the free tier.

curl -X POST https://api.daimon.email/v1/inboxes \
  -H "Content-Type: application/json" \
  -d '{
    "username": "my-agent",
    "client_id": "unique-123"
  }'
import { DaimonClient } from 'daimon-email';

const client = new DaimonClient();

const inbox = await client.inboxes.create({
  username: 'my-agent',
  clientId: 'unique-123'
});

console.log(`Created: ${inbox.address}`);
console.log(`API Key: ${inbox.apiKey}`);
from daimon_email import DaimonClient

client = DaimonClient()

inbox = client.inboxes.create(
    username="my-agent",
    client_id="unique-123"
)

print(f"Created: {inbox.address}")
print(f"API Key: {inbox.api_key}")

Response

{
  "result": {
    "id": "inb_abc123",
    "address": "my-agent@daimon.email",
    "api_key": "dm_free_7d8a9b0c1d2e3f4g5h6i7j8k9l0m1n2o",
    "tier": "free",
    "status": "active",
    "view_url": "https://daimon.email/status/inb_abc123?key=dm_free_7d8a9b0c1d2e3f4g5h6i7j8k9l0m1n2o",
    "created_at": "2024-03-11T14:23:45Z"
  },
  "next_steps": [
    "Use the api_key to authenticate future requests",
    "Check /v1/inboxes/inb_abc123/messages to poll for incoming mail",
    "Register a webhook at /v1/webhooks to receive real-time events"
  ]
}

Check Your Capabilities

Every agent should understand what it can and cannot do. The capabilities endpoint is self-aware — it tells your agent exactly what's possible at their current tier.

curl -X GET https://api.daimon.email/v1/capabilities \
  -H "Authorization: Bearer dm_free_7d8a9b0c1d2e3f4g5h6i7j8k9l0m1n2o"
const client = new DaimonClient({ apiKey: inbox.apiKey });

const capabilities = await client.account.getCapabilities();

console.log('Can do:', capabilities.can);
console.log('Cannot do:', capabilities.cannot);
client = DaimonClient(api_key=inbox.api_key)

capabilities = client.account.get_capabilities()

print(f"Can do: {capabilities.can}")
print(f"Cannot do: {capabilities.cannot}")

Response

{
  "result": {
    "tier": "free",
    "can": [
      {
        "action": "receive_messages",
        "description": "Receive unlimited inbound emails"
      },
      {
        "action": "create_webhooks",
        "description": "Register webhooks for real-time events"
      },
      {
        "action": "use_reply_extraction",
        "description": "Automatic reply body extraction with TalonJS"
      }
    ],
    "cannot": [
      {
        "action": "send_messages",
        "reason": "SEND_REQUIRES_PAID",
        "unlock": "https://daimon.email/upgrade?token=...",
        "api_call": "POST /v1/upgrade-link"
      },
      {
        "action": "custom_domains",
        "reason": "DOMAIN_REQUIRES_PAID",
        "unlock": "https://daimon.email/upgrade?token=...",
        "api_call": "POST /v1/upgrade-link"
      }
    ]
  },
  "next_steps": [
    "Use the unlock URLs to upgrade when you need more features",
    "Call POST /v1/upgrade-link to generate a magic upgrade link for your operator"
  ]
}

Receive Your First Email

Once your inbox is created, you can immediately start receiving emails. Send a test email to your new address and poll for messages.

curl -X GET https://api.daimon.email/v1/inboxes/inb_abc123/messages \
  -H "Authorization: Bearer dm_free_7d8a9b0c1d2e3f4g5h6i7j8k9l0m1n2o"
const messages = await client.inboxes.messages.list('inb_abc123');

messages.forEach(msg => {
  console.log(`From: ${msg.from}`);
  console.log(`Subject: ${msg.subject}`);
  console.log(`Reply text: ${msg.replyBody}`); // Extracted reply without quotes
  console.log(`Links: ${msg.links}`);
  console.log(`CTA Links: ${msg.ctaLinks}`); // Confirmation/verify links
});
messages = client.inboxes.messages.list('inb_abc123')

for msg in messages:
    print(f"From: {msg.from_address}")
    print(f"Subject: {msg.subject}")
    print(f"Reply text: {msg.reply_body}")  # Extracted reply without quotes
    print(f"Links: {msg.links}")
    print(f"CTA Links: {msg.cta_links}")  # Confirmation/verify links

Set Up Real-time Webhooks

Instead of polling, receive instant notifications when emails arrive.

curl -X POST https://api.daimon.email/v1/webhooks \
  -H "Authorization: Bearer dm_free_7d8a9b0c1d2e3f4g5h6i7j8k9l0m1n2o" \
  -H "Content-Type: application/json" \
  -d '{
    "endpoint_url": "https://your-agent.com/webhook",
    "events": ["message.received"],
    "inbox_id": "inb_abc123"
  }'
const webhook = await client.webhooks.create({
  endpointUrl: 'https://your-agent.com/webhook',
  events: ['message.received'],
  inboxId: 'inb_abc123'
});

// In your webhook handler
import { verifyWebhookSignature } from 'daimon-email';

app.post('/webhook', (req, res) => {
  const signature = req.headers['x-daimon-signature'];
  const isValid = verifyWebhookSignature(req.body, signature, webhook.secret);

  if (!isValid) {
    return res.status(401).send('Invalid signature');
  }

  const { event, message } = req.body;

  if (event === 'message.received') {
    console.log(`New message: ${message.subject}`);
    // Process the message
  }

  res.status(200).send('OK');
});
webhook = client.webhooks.create(
    endpoint_url='https://your-agent.com/webhook',
    events=['message.received'],
    inbox_id='inb_abc123'
)

# In your webhook handler
from daimon_email import verify_webhook_signature

@app.post('/webhook')
def handle_webhook(request):
    signature = request.headers.get('X-Daimon-Signature')
    is_valid = verify_webhook_signature(
        request.body,
        signature,
        webhook.secret
    )

    if not is_valid:
        return Response(status=401, text='Invalid signature')

    data = request.json()

    if data['event'] == 'message.received':
        message = data['message']
        print(f"New message: {message['subject']}")
        # Process the message

    return Response(status=200, text='OK')

Send Your First Email (Paid Tier)

Sending requires a paid tier. Your agent can handle the upgrade flow autonomously.

try {
  await client.inboxes.send('inb_abc123', {
    to: 'user@example.com',
    subject: 'Hello from my agent',
    body: 'This is my first email sent via daimon.email!'
  });
} catch (error) {
  if (error.code === 'SEND_REQUIRES_PAID') {
    // Agent can request upgrade from operator
    console.log('Agent script:', error.upgradeContext.agentScript);
    // Outputs: "Tell your operator: I need sending access. Here's a direct upgrade link: https://..."

    // Or generate a new magic link
    const link = await client.account.createUpgradeLink();
    console.log('Upgrade URL:', link.url);
  }
}
try:
    client.inboxes.send('inb_abc123', {
        'to': 'user@example.com',
        'subject': 'Hello from my agent',
        'body': 'This is my first email sent via daimon.email!'
    })
except DaimonError as e:
    if e.code == 'SEND_REQUIRES_PAID':
        # Agent can request upgrade from operator
        print('Agent script:', e.upgrade_context['agent_script'])
        # Outputs: "Tell your operator: I need sending access. Here's a direct upgrade link: https://..."

        # Or generate a new magic link
        link = client.account.create_upgrade_link()
        print('Upgrade URL:', link.url)

What's Next?

Key Differentiators

Unlike other email providers (SendGrid, Resend, AgentMail), daimon.email is built specifically for autonomous AI agents:

  • Zero OAuth: No browser automation or human authentication required
  • Instant provisioning: Create inboxes in <200ms via API
  • Agent-aware responses: Every response includes next_steps[] to guide agent behavior
  • Magic upgrade flows: Agents can self-upgrade when they hit limits
  • Reply extraction: Automatic extraction of reply text without quoted history
  • CTA detection: Automatic detection of confirmation/verification links
  • Self-awareness: The /v1/capabilities endpoint tells agents exactly what they can and cannot do

Support