TEST MODE

Send your first email

Use a cm_test_ key locally. Mock mode records a simulated acceptance event and never sends real email.

curl -X POST https://capimail.com/api/v1/emails \
  -H "Authorization: Bearer cm_test_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "hello@example.com",
    "to": ["customer@example.net"],
    "subject": "Welcome!",
    "html": "<h1>Welcome</h1>",
    "idempotency_key": "welcome-customer-123"
  }'

Response contract

{
  "message_id": "uuid",
  "status": "queued",
  "request_id": "uuid"
}

Errors use the same envelope with error.code and a safe, non-sensitive error.message. A repeated idempotency key returns the original message.