{
  "name": "mxgate",
  "version": "0.1.0",
  "about": "Email for a domain, set up by an agent. Receive mail for domains you own and forward it to confirmed mailboxes.",
  "docs": "https://mxgate.io/llms.txt",
  "auth": "Authorization: Bearer <api_key>",
  "flow": [
    "POST /v1/signup {\"email\"} -> api_key; confirm the link mailed to that address",
    "POST /v1/domains {\"name\"} -> the DNS records to add",
    "POST /v1/domains/{domain}/verify -> checks the records; the domain takes mail once ownership is proven",
    "PUT /v1/domains/{domain}/aliases/{alias} {\"to\":[\"you@example.org\"]} -> \"*\" is the catch-all"
  ],
  "endpoints": {
    "POST /v1/signup": "create an account; no auth",
    "GET /v1/account": "plan, limits, usage",
    "POST /v1/keys/recover": "lost key: {\"email\"} mails a recovery token to the account address; no auth",
    "POST /v1/keys/recover/confirm": "{\"token\"} -> a new api_key; the older keys stop working; no auth",
    "POST /v1/keys/rotate": "a new api_key for this account; the key of this call and every older key stop working",
    "GET /v1/domains": "your domains",
    "POST /v1/domains": "add a domain",
    "GET /v1/domains/{domain}": "one domain with its records and last check",
    "POST /v1/domains/{domain}/verify": "check DNS now",
    "DELETE /v1/domains/{domain}": "remove a domain and its aliases",
    "GET /v1/domains/{domain}/aliases": "aliases of a domain",
    "PUT /v1/domains/{domain}/aliases/{alias}": "create or replace an alias",
    "DELETE /v1/domains/{domain}/aliases/{alias}": "remove an alias",
    "GET /v1/domains/{domain}/smtp": "send-as: readiness, SMTP host and ports, credentials",
    "POST /v1/domains/{domain}/smtp": "send-as: make an SMTP credential; the password is shown once",
    "DELETE /v1/domains/{domain}/smtp/{username}": "send-as: remove an SMTP credential",
    "POST /v1/send": "send one plain-text message: {\"from\":\"Name <you@yourdomain>\",\"to\":[\"a@b.c\"],\"subject\",\"text\"}; optional cc, bcc, reply_to, in_reply_to, references, copy_to_owner, idempotency_key",
    "GET /v1/logs": "per-message log: ?domain=&direction=in|out&status=forwarded|sent|deferred|bounced|expired|rejected&address=&before=&limit=",
    "GET /v1/notifications": "email digest and webhook settings, recent notifications",
    "PUT /v1/notifications": "{\"email\":true,\"events\":[\"bounced\",\"expired\"],\"webhook_url\":\"https://...\"}",
    "POST /v1/notifications/test": "send a signed test call to the webhook",
    "GET /v1/destinations": "mailboxes you forward to",
    "POST /v1/destinations": "add a mailbox; a confirmation link is mailed to it",
    "GET /v1/destinations/confirm?token=": "the page behind the mailed link; it confirms nothing by itself",
    "POST /v1/destinations/confirm": "token=... (form) or {\"token\"}: the mailbox owner confirms; no API key"
  },
  "mx_hosts": [
    "mx1.mxgate.io"
  ]
}