Skip to main content

1. Authenticate

Use a bearer API key from the dashboard.
curl -X GET "https://api.emailagent.dev/api/v1/inboxes" \
  -H "Authorization: Bearer <api_key>"

2. Create inbox

curl -X POST "https://api.emailagent.dev/api/v1/inboxes" \
  -H "Authorization: Bearer <api_key>" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: create-inbox-agent-1" \
  -d '{
    "localPart": "agent-1",
    "displayName": "Agent One"
  }'

3. Send email

curl -X POST "https://api.emailagent.dev/api/v1/emails/send" \
  -H "Authorization: Bearer <api_key>" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: send-welcome-001" \
  -d '{
    "inboxId": "<inbox_uuid>",
    "to": "[email protected]",
    "subject": "Hello",
    "text": "Welcome from your AI agent"
  }'

4. Check metrics

curl -X GET "https://api.emailagent.dev/api/v1/metrics" \
  -H "Authorization: Bearer <api_key>"