API reference

Versioned resources. Explicit responses.

A proposed implementation surface for email intelligence, inbound and outbound mail, classification, and mailbox migration.

https://api.maail.co/v1JSON by default. Bearer authentication. Stable request identifiers.
Conventions

Predictable at every endpoint.

Authenticate with a Bearer token. Send JSON unless an endpoint explicitly accepts message/rfc822. Responses include a request identifier, and mutation endpoints accept an idempotency key.

Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Idempotency-Key: YOUR_UNIQUE_OPERATION_KEY
GET

/v1/email/validate

Run deliverability checks without the complete address and host analysis.

GET /v1/email/validate?email=demo-user-1042%40research.example
{
  "email": "demo-user-1042@research.example",
  "status": "deliverable",
  "cleanedEmail": "demo-user-1042@research.example",
  "metrics": ["valid_syntax", "has_mx", "mailbox_exists"]
}
GET

/v1/email/analyze

Return the complete analysis shape. All values below are synthetic; .example domains are reserved for documentation.

GET /v1/email/analyze?email=demo-user-1042%40research.example
{
  "email": "demo-user-1042@research.example",
  "status": "deliverable",
  "cleanedEmail": "demo-user-1042@research.example",
  "metrics": [
    "valid_syntax",
    "known_mailer",
    "has_mx",
    "mailbox_exists"
  ],
  "address": {
    "isDisposable": false,
    "isGraylisted": false
  },
  "name": {
    "value": null,
    "firstname": null,
    "lastname": null
  },
  "host": {
    "value": "research.example",
    "provider": null,
    "catchAll": false,
    "isKnown": true,
    "reputation": "high"
  },
  "server": {
    "exists": true,
    "records": [
      {
        "exchange": "mx1.research.example",
        "priority": 10
      }
    ]
  }
}
POST

/v1/mailbox/inbound

Create an inbound route and deliver normalized messages, including parsed DMARC reports, as signed webhook events.

{
  "label": "invoice-intake",
  "webhook": "https://hooks.product.example/mail",
  "retentionHours": 24
}
{
  "id": "inbox_demo_72",
  "address": "route-demo-2048@inbound.example",
  "event": "email.received",
  "status": "active"
}
POST
/v1/email/send

Send composed content or render a template.

POST
/v1/email/template

Create a reusable text and HTML template.

GET
/v1/email/message/:id

Read message acceptance and delivery state.

POST

/v1/email/classify

Classify structured content or a raw RFC 822 message as spam or ham.

{
  "from": "updates@service.example",
  "subject": "Synthetic account notice",
  "text": "This is artificial sample content."
}
{
  "classification": "ham",
  "score": 0.96,
  "reasonCodes": ["transactional_pattern"],
  "model": "maail-classifier"
}
POST

/v1/mailbox/migrate

Start a resumable transfer between verified mailbox connection resources.

{
  "sourceConnection": "conn_demo_old",
  "destinationConnection": "conn_demo_new",
  "options": {
    "preserveFlags": true,
    "preserveInternalDates": true,
    "catchUp": true
  }
}
{
  "id": "migration_demo_41",
  "status": "queued",
  "progress": {
    "folders": 0,
    "messages": 0,
    "bytes": 0
  }
}
POST
/v1/mailbox/connection

Create and verify an encrypted mailbox connection.

GET
/v1/mailbox/migrate/:id

Read progress, warnings, and completion state.

POST
/v1/mailbox/migrate/:id/catch-up

Copy the final delta before changing mail delivery.

Implementation source

Shape the API around a real workflow.

The resource names and payloads here are a coherent starting point and can be refined against the implementation.