{
  "openapi": "3.1.0",
  "info": {
    "title": "mail2mail.link API",
    "version": "1.0.0",
    "summary": "Move all e-mail from one mailbox to another, run by an AI agent or a script.",
    "description": "mail2mail.link copies every folder and message from an old mailbox to a new one (IMAP, JMAP, or POP3 as the old mailbox). Nothing in the old mailbox is deleted or changed, messages already in the new mailbox are not copied twice, and at the end every message is checked in the new mailbox. Afterwards new mail is copied for a while (options.follow_days, default 7), because mail still reaches the old mailbox until the switch of the address has spread; this only adds messages to the new mailbox.\n\nHow an agent runs a whole move: 1. Show the user the terms (https://mail2mail.link/terms) and the privacy notice (https://mail2mail.link/privacy) and get their OK. 2. POST /api/moves with both addresses and passwords, \"terms\": true and \"start\": true. 3. Give the user progress_url (their private page to watch or stop the move) and the returned notice. 4. GET status_url every 30–60 seconds until status is done, attention, failed or stopped, and tell the user the summary.\n\nLater, POST /api/moves/{token}/resync copies the mail that arrived since (for example after the address was switched), with the stored passwords.\n\nPasswords go only in JSON request bodies, never in a URL. They are stored encrypted so that only the move's token (its private link) can unlock them, and deleted with the move: at once with /forget, or 30 days after its last activity. While a copy, the follow-up or a resync runs, the server can read the mail and use the passwords, so prefer app passwords where the provider offers them (they can be revoked at any time). Every POST must be sent with Content-Type: application/json, also when it has no body (otherwise 415); browsers on other sites are refused (403).\n\nThe service is free; please don't abuse it. Repeated failed logins slow down further attempts; if a request is refused (status 429), the error text says what to do. Errors come as {\"error\": \"…\"} with a text you can show the user.\n\nAn MCP server with the same features is at POST https://mail2mail.link/mcp (Streamable HTTP, stateless).",
    "contact": { "email": "benni@mail2mail.link" }
  },
  "servers": [{ "url": "https://mail2mail.link" }],
  "externalDocs": { "url": "https://mail2mail.link/terms", "description": "Terms of use (must be accepted before a move)" },
  "paths": {
    "/api/discover": {
      "post": {
        "operationId": "findMailServer",
        "summary": "Find the mail server of an address",
        "description": "Looks up the mail server for an e-mail address and tells what the user must do first so the login works (help.text; for example Gmail and iCloud need an app password, GMX and WEB.DE need IMAP switched on). Optional: creating a move looks the servers up by itself. The lookup finds where an address points today: for a new mailbox that keeps the address and only changes provider, it finds the old provider, so ask the user for the new provider's IMAP server instead. Use it to prepare the user before asking for passwords. microsoft: true means the mailbox needs Sign in with Microsoft in a browser instead of a password.",
        "requestBody": {
          "required": true,
          "content": { "application/json": { "schema": {
            "type": "object", "required": ["email"],
            "properties": { "email": { "type": "string", "format": "email", "example": "anna@gmail.com" } }
          } } }
        },
        "responses": {
          "200": { "description": "What was found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Discovered" } } } },
          "400": { "$ref": "#/components/responses/Error" },
          "403": { "$ref": "#/components/responses/Error" },
          "415": { "$ref": "#/components/responses/Error" },
          "429": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/api/moves": {
      "post": {
        "operationId": "createMove",
        "summary": "Create a move (and start it)",
        "description": "Creates a move from the old to the new mailbox and checks both logins right away. With \"start\": true copying begins by itself as soon as the check succeeds; without it, call /api/moves/{token}/start once status is ready.\n\nBefore calling, show the user the terms (https://mail2mail.link/terms) and the privacy notice (https://mail2mail.link/privacy) and get their OK; set \"terms\": true only after they agree. Show the user the returned notice (statistics and how to object) and progress_url. Keep the token: it is the only key to the move and can't be recovered.\n\nUse app passwords where the provider needs them (Gmail, iCloud, Yahoo). Microsoft 365 / Outlook.com mailboxes can't use a password: leave the password empty; the answer then has needs_microsoft_sign_in: true and the user must open progress_url and click Sign in with Microsoft. When both addresses have the same domain (for example the same address moving to a new provider), set to.server to the new provider's IMAP server (ask the user; it is in the new provider's setup instructions): a server looked up from the address points to the old provider, so such a move is refused without it. A mailbox is never copied onto itself. Errors about single mailboxes are in rows[].",
        "requestBody": {
          "required": true,
          "content": { "application/json": {
            "schema": { "$ref": "#/components/schemas/CreateMove" },
            "example": { "terms": true, "start": true, "pairs": [ { "from": { "email": "anna@old.example", "password": "old-app-password" }, "to": { "email": "anna@new.example", "password": "new-password" } } ] }
          } }
        },
        "responses": {
          "201": { "description": "The move exists and is being checked.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreatedMove" } } } },
          "400": { "$ref": "#/components/responses/Error" },
          "403": { "$ref": "#/components/responses/Error" },
          "415": { "$ref": "#/components/responses/Error" },
          "429": { "$ref": "#/components/responses/Error" },
          "503": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/api/moves/{token}": {
      "get": {
        "operationId": "getMove",
        "summary": "Where the move stands",
        "description": "Returns the move's status and one plain sentence for the user (summary). Poll every 30–60 seconds until status is done, attention, failed or stopped, then tell the user the summary. waiting means the move needs something from the user on progress_url (a Microsoft sign-in, or the passwords again after it was stopped). After done or attention, following = true means new mail is still copied until follow_until; no need to keep polling for it. Moves are deleted 30 days after their last activity (after copying new mail ends); then this returns 404. A 404 with damaged = true means the move's saved data could not be read: tell the user its error text.",
        "parameters": [ { "$ref": "#/components/parameters/Token" } ],
        "responses": {
          "200": { "description": "The move.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Move" } } } },
          "404": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/api/moves/{token}/start": {
      "post": {
        "operationId": "startMove",
        "summary": "Start copying after the check",
        "description": "Starts copying once status is ready. Not needed when the move was created with \"start\": true. It reads no body (send Content-Type: application/json anyway).",
        "parameters": [ { "$ref": "#/components/parameters/Token" } ],
        "requestBody": { "required": false, "description": "Not read: send no body or an empty JSON object, with Content-Type: application/json.", "content": { "application/json": { "schema": { "type": "object" } } } },
        "responses": {
          "200": { "description": "Copying begins.", "content": { "application/json": { "schema": { "type": "object", "properties": { "ok": { "type": "boolean" } } } } } },
          "403": { "$ref": "#/components/responses/Error" },
          "404": { "$ref": "#/components/responses/Error" },
          "409": { "$ref": "#/components/responses/Error" },
          "415": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/api/moves/{token}/cancel": {
      "post": {
        "operationId": "cancelMove",
        "summary": "Stop the move",
        "description": "Stops the move at once, only when the user asks for it. Everything copied so far stays in the new mailbox and nothing is deleted. The passwords leave memory; their encrypted copy stays until /forget or 30 days after the last activity, so /resync can pick up later. After the move has finished, it stops copying new mail (status stays done or attention). It reads no body (send Content-Type: application/json anyway). Returns the move.",
        "parameters": [ { "$ref": "#/components/parameters/Token" } ],
        "requestBody": { "required": false, "description": "Not read: send no body or an empty JSON object, with Content-Type: application/json.", "content": { "application/json": { "schema": { "type": "object" } } } },
        "responses": {
          "200": { "description": "The stopped move.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Move" } } } },
          "403": { "$ref": "#/components/responses/Error" },
          "404": { "$ref": "#/components/responses/Error" },
          "415": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/api/moves/{token}/resync": {
      "post": {
        "operationId": "resyncMove",
        "summary": "Copy new mail now",
        "description": "For a move that is done, attention or stopped (can_resync in the status): copies the mail that arrived in the old mailbox since, with the stored passwords. For a stopped move it copies the rest (status goes back to queued and running, with progress), and the move then ends as usual; follow_days, if given, replaces the move's own. It only adds messages to the new mailbox: nothing there is changed or deleted, messages copied before are not copied twice, and for a finished move folders the user deleted there are not filled again. Optional follow_days keeps copying new mail afterwards. If a stored password is missing or not accepted any more (for example the app password was deleted), the answer is 409 with needs_passwords: send them in pairs (same shape as the move's mailboxes, in order); Microsoft mailboxes need the user to sign in again on progress_url. Returns the move: for new mail resyncing is true, poll it until resyncing is false (resync_added tells how many messages were added); for a stopped move status is queued or running, poll it until status is done, attention, failed or stopped.",
        "parameters": [ { "$ref": "#/components/parameters/Token" } ],
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": {
          "follow_days": { "type": "integer", "minimum": 0, "maximum": 30, "default": 0, "description": "Afterwards keep copying new mail for this many days (0 = off)." },
          "pairs": { "type": "array", "description": "Only when asked for (needs_passwords): passwords per mailbox, in the move's order; empty strings keep the stored ones.", "items": { "type": "object", "properties": {
            "from": { "type": "string", "writeOnly": true, "description": "Password of the old mailbox." },
            "to": { "type": "string", "writeOnly": true, "description": "Password of the new mailbox." }
          } } }
        } } } } },
        "responses": {
          "202": { "description": "Copying new mail has begun.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Move" } } } },
          "400": { "$ref": "#/components/responses/Error" },
          "403": { "$ref": "#/components/responses/Error" },
          "404": { "$ref": "#/components/responses/Error" },
          "409": { "$ref": "#/components/responses/Error" },
          "415": { "$ref": "#/components/responses/Error" },
          "429": { "$ref": "#/components/responses/Error" },
          "503": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/api/moves/{token}/retry": {
      "post": {
        "operationId": "retryMove",
        "summary": "Try mailboxes again that failed or did not get everything copied",
        "description": "For a finished move with mailboxes that failed or did not get everything copied and checked (can_retry and pairs[].retry in the status; typically a refused password, or messages or folders a server refused for a while): checks and copies those mailboxes again (messages not copied before are tried again), with the passwords given or the stored ones; the other mailboxes are left alone, and their new mail keeps being copied meanwhile. If a password is missing or was refused, the answer is 409 with needs_passwords and pairs[].from/to.ready false names the sides to send: passwords per mailbox in pairs, in the move's order (only the retried mailboxes are read). Returns the move (status checking, then running); poll it until it is done or attention again.",
        "parameters": [ { "$ref": "#/components/parameters/Token" } ],
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": {
          "pairs": { "type": "array", "description": "Passwords per mailbox, in the move's order; empty strings keep the stored ones.", "items": { "type": "object", "properties": {
            "from": { "type": "string", "writeOnly": true, "description": "Password of the old mailbox." },
            "to": { "type": "string", "writeOnly": true, "description": "Password of the new mailbox." }
          } } }
        } } } } },
        "responses": {
          "202": { "description": "The retry has begun.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Move" } } } },
          "400": { "$ref": "#/components/responses/Error" },
          "403": { "$ref": "#/components/responses/Error" },
          "404": { "$ref": "#/components/responses/Error" },
          "409": { "$ref": "#/components/responses/Error" },
          "415": { "$ref": "#/components/responses/Error" },
          "429": { "$ref": "#/components/responses/Error" },
          "503": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/api/moves/{token}/events": {
      "get": {
        "operationId": "followMove",
        "summary": "Follow the move live (server-sent events)",
        "description": "The progress page uses this: a text/event-stream whose data lines each carry the whole move (the same JSON as GET /api/moves/{token}), sent at once and after every change, with a comment line every 25 seconds to keep the connection open. The stream ends when the move is deleted. Only a few streams may be open per IP address (429); agents should rather poll GET /api/moves/{token}.",
        "parameters": [ { "$ref": "#/components/parameters/Token" } ],
        "responses": {
          "200": { "description": "The event stream.", "content": { "text/event-stream": { "schema": { "type": "string" } } } },
          "404": { "$ref": "#/components/responses/Error" },
          "429": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/api/moves/{token}/credentials": {
      "post": {
        "operationId": "giveCredentials",
        "summary": "Give the passwords a waiting move needs",
        "description": "The progress page uses this when a move is waiting (status waiting or failed, needs_credentials true), for example after a server restart without stored passwords or after a refused password: passwords per mailbox, in the move's order; empty strings keep the stored ones. The move is then checked again (and copies by itself if it was created with start). A finished or stopped move goes on with /resync or /retry instead (409). Returns the move.",
        "parameters": [ { "$ref": "#/components/parameters/Token" } ],
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": {
          "pairs": { "type": "array", "description": "Passwords per mailbox, in the move's order; empty strings keep the stored ones.", "items": { "type": "object", "properties": {
            "from": { "type": "string", "writeOnly": true, "description": "Password of the old mailbox." },
            "to": { "type": "string", "writeOnly": true, "description": "Password of the new mailbox." }
          } } }
        } } } } },
        "responses": {
          "200": { "description": "The move, being checked again.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Move" } } } },
          "400": { "$ref": "#/components/responses/Error" },
          "403": { "$ref": "#/components/responses/Error" },
          "404": { "$ref": "#/components/responses/Error" },
          "409": { "$ref": "#/components/responses/Error" },
          "415": { "$ref": "#/components/responses/Error" },
          "429": { "$ref": "#/components/responses/Error" },
          "503": { "$ref": "#/components/responses/Error" }
        }
      }
    },
    "/api/health": {
      "get": {
        "operationId": "health",
        "summary": "Is the service up",
        "description": "Answers {\"ok\": true} while the service runs. For monitoring; it says nothing about a move or a mail server.",
        "responses": {
          "200": { "description": "The service runs.", "content": { "application/json": { "schema": { "type": "object", "properties": { "ok": { "type": "boolean" } } } } } }
        }
      }
    },
    "/api/moves/{token}/forget": {
      "post": {
        "operationId": "forgetMove",
        "summary": "Delete everything about the move now",
        "description": "Stops the move if it is running and deletes the data mail2mail keeps for it (addresses, servers, folder names, progress, the stored passwords) at once instead of 30 days after its last activity. Only the statistics line remains, and the server log for 14 days. Messages already copied stay in the new mailbox. Only when the user asks for it; the token stops working. It reads no body (send Content-Type: application/json anyway).",
        "parameters": [ { "$ref": "#/components/parameters/Token" } ],
        "requestBody": { "required": false, "description": "Not read: send no body or an empty JSON object, with Content-Type: application/json.", "content": { "application/json": { "schema": { "type": "object" } } } },
        "responses": {
          "200": { "description": "Deleted.", "content": { "application/json": { "schema": { "type": "object", "properties": { "ok": { "type": "boolean" } } } } } },
          "403": { "$ref": "#/components/responses/Error" },
          "404": { "$ref": "#/components/responses/Error" },
          "415": { "$ref": "#/components/responses/Error" }
        }
      }
    }
  },
  "components": {
    "parameters": {
      "Token": { "name": "token", "in": "path", "required": true, "description": "The token returned when the move was created (22 characters).", "schema": { "type": "string", "pattern": "^[A-Za-z0-9_-]{22}$" } }
    },
    "responses": {
      "Error": {
        "description": "Refused, with a text for the user. 400: something in the input, or a body that is not valid JSON; 403: a browser request from another site; 404: no such move; 409: not possible in this state; 415: the request was not sent with Content-Type: application/json (the Accept-Post header names it); 429: too many requests from the caller's IP address (abuse protection); 503: the service can't do it right now, try again later.",
        "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } }
      }
    },
    "schemas": {
      "Error": {
        "type": "object", "required": ["error"],
        "properties": {
          "error": { "type": "string" },
          "needs_passwords": { "type": "boolean", "description": "/resync: the passwords (or a Microsoft sign-in) are needed again; the move's pairs[].from/to.needs_password say which." },
          "damaged": { "type": "boolean", "description": "404: the move exists, but its saved data could not be read, so it can't be shown or continued (error says what to do)." },
          "rows": { "type": "array", "description": "Problems with single mailboxes.", "items": { "type": "object", "properties": {
            "row": { "type": "integer", "description": "1-based mailbox number." },
            "side": { "type": "string", "enum": ["old", "new"] },
            "problem": { "type": "string" },
            "provider": { "type": "string" }
          } } }
        }
      },
      "Account": {
        "type": "object", "required": ["email"],
        "properties": {
          "email": { "type": "string", "format": "email" },
          "password": { "type": "string", "writeOnly": true, "description": "Password or app password. Empty for Microsoft 365 / Outlook.com (they use Sign in with Microsoft). Stored encrypted so that only the move's token can unlock it; deleted with the move." },
          "server": { "type": "string", "description": "IMAP server, e.g. imap.example.com. When empty, it is looked up from the address (that finds the server the domain points to today), so it is strongly recommended for the new mailbox, and required there when both addresses have the same domain." },
          "port": { "type": "integer", "description": "Optional; standard mail ports only (993, 143, 995, 110, 443)." },
          "protocol": { "type": "string", "enum": ["imap", "jmap", "pop3"], "description": "Optional, default imap. pop3 only for the old mailbox." },
          "security": { "type": "string", "enum": ["tls", "starttls"], "description": "Optional, default tls. Unencrypted connections are refused." },
          "username": { "type": "string", "description": "Optional login name, only if it is not the e-mail address." }
        }
      },
      "CreateMove": {
        "type": "object", "required": ["terms"],
        "properties": {
          "terms": { "type": "boolean", "const": true, "description": "The user has seen and accepted https://mail2mail.link/terms and https://mail2mail.link/privacy." },
          "start": { "type": "boolean", "default": false, "description": "Start copying by itself as soon as the check succeeds." },
          "pairs": { "type": "array", "minItems": 1, "maxItems": 50, "items": { "type": "object", "required": ["from", "to"], "properties": {
            "from": { "$ref": "#/components/schemas/Account" },
            "to": { "$ref": "#/components/schemas/Account" }
          } } },
          "batch_csv": { "type": "string", "description": "Instead of pairs: a CSV list (header old_email;old_password;new_email;new_password, optional old_server/new_server columns)." },
          "options": { "type": "object", "properties": {
            "since": { "type": "string", "format": "date", "description": "Only copy messages received after this day." },
            "exclude": { "type": "array", "items": { "type": "string" }, "description": "Folder names (or patterns with *) not to copy." },
            "follow_days": { "type": "integer", "minimum": 0, "maximum": 30, "default": 7, "description": "After the copy, keep copying new mail from the old mailbox for this many days (0 = off). Keep the default unless the user says otherwise: mail can still arrive at the old mailbox for hours to days after the address is switched. It only adds messages to the new mailbox, never changes or deletes anything there, and the server can read the passwords while it runs. If the server reboots in that time, the follow-up continues at the next request with the token (e.g. a status GET). The passwords stay stored for resync until /forget, also with 0." }
          } }
        }
      },
      "CreatedMove": {
        "type": "object",
        "properties": {
          "token": { "type": "string", "description": "The only key to the move; can't be recovered." },
          "id": { "type": "string", "description": "Short move ID for support and feedback." },
          "status": { "$ref": "#/components/schemas/Status" },
          "auto_start": { "type": "boolean", "description": "Copying starts by itself after the check." },
          "needs_microsoft_sign_in": { "type": "boolean", "description": "The user must open progress_url and click Sign in with Microsoft." },
          "status_url": { "type": "string", "format": "uri", "description": "GET it to follow the move." },
          "progress_url": { "type": "string", "format": "uri", "description": "The user's private page to watch, stop or continue the move. Give it to the user." },
          "moves_url": { "type": "string", "format": "uri", "description": "The user's \"Your moves\" page with this move. For several moves on one page, join their tokens with commas after the #: https://mail2mail.link/moves#TOKEN1,TOKEN2 (German: /de/umzuege#…). The page remembers them in that browser." },
          "next": { "type": "string", "description": "What to do now, in one sentence." },
          "notice": { "type": "object", "description": "Show this to the user.", "properties": {
            "text": { "type": "string" },
            "objection_email": { "type": "string" },
            "privacy_url": { "type": "string", "format": "uri" },
            "terms_url": { "type": "string", "format": "uri" }
          } }
        }
      },
      "Status": {
        "type": "string",
        "enum": ["waiting", "checking", "ready", "queued", "running", "done", "attention", "failed", "stopped"],
        "description": "waiting: needs the user on progress_url (Microsoft sign-in or passwords again); checking: logging in and counting; ready: checked, waits for start; queued: waits for its turn (only a limited number of moves copy at the same time); running: copying and checking the result; done: everything copied and found in the new mailbox; attention: finished, some messages could not be copied; failed: nothing copied (e.g. wrong password); stopped: stopped by the user."
      },
      "Move": {
        "type": "object",
        "properties": {
          "id": { "type": "string" },
          "status": { "$ref": "#/components/schemas/Status" },
          "summary": { "type": "string", "description": "One sentence for the user, e.g. \"Copying: 4,210 of 12,480 messages (34%).\"" },
          "progress_url": { "type": "string", "format": "uri" },
          "note": { "type": "string" },
          "needs_credentials": { "type": "boolean" },
          "created": { "type": "string", "format": "date-time" },
          "started": { "type": "string", "format": "date-time" },
          "ended": { "type": "string", "format": "date-time" },
          "delete_after": { "type": "string", "format": "date-time" },
          "following": { "type": "boolean", "description": "The move has finished and new mail is still being copied (until follow_until). Cancel stops it." },
          "follow_until": { "type": "string", "format": "date-time", "description": "New mail is copied until then." },
          "last_follow": { "type": "string", "format": "date-time", "description": "The last time new mail was looked for." },
          "follow_added": { "type": "integer", "description": "Messages copied after the move by the follow-up." },
          "follow_failed": { "type": "integer", "description": "New messages the follow-up could not copy (the new mailbox refused them, e.g. because it is full). Later rounds don't try them again; they stay counted until a /retry of the mailbox tries them again (can_retry, pairs[].retry). Per mailbox: pairs[].follow_failed. Tell the user." },
          "follow_ended": { "type": "string", "format": "date-time", "description": "When copying new mail ended." },
          "follow_note": { "type": "string", "description": "Why copying new mail ended early (stopped, a refused sign-in, a server restart)." },
          "can_resync": { "type": "boolean", "description": "POST /resync can copy the mail that arrived since now." },
          "can_retry": { "type": "boolean", "description": "Some mailboxes of this finished move failed, or did not get everything copied and checked (pairs[].retry); POST /retry checks and copies them again, also while new mail of the others is copied." },
          "resync_needs_passwords": { "type": "boolean", "description": "/resync needs some passwords again (pairs[].from/to.needs_password)." },
          "resyncing": { "type": "boolean", "description": "Copying new mail now (/resync)." },
          "last_resync": { "type": "string", "format": "date-time", "description": "When /resync last ran." },
          "resync_added": { "type": "integer", "description": "Messages the last /resync added." },
          "resync_failed": { "type": "integer", "description": "New messages /resync could not copy (the new mailbox refused them), added up over every /resync until a /retry of the mailbox tries them again. Per mailbox: pairs[].resync_failed." },
          "resync_incomplete": { "type": "integer", "description": "Mailboxes the last /resync could not reach: resync_added may be incomplete. Try again later." },
          "pairs": { "type": "array", "description": "One entry per mailbox: status, total/done counters, plan (after the check), problem (what went wrong and how to fix it), result (at the end); during the follow-up follow_added, follow_failed, and follow_failing_since (its server could not be reached in any round since then, so its new mail is not being copied right now).", "items": { "type": "object" } }
        }
      },
      "Discovered": {
        "type": "object",
        "properties": {
          "email": { "type": "string" },
          "found": { "type": "boolean" },
          "provider": { "type": "string" },
          "protocol": { "type": "string" },
          "server": { "type": "string" },
          "port": { "type": "integer" },
          "security": { "type": "string" },
          "microsoft": { "type": "boolean", "description": "Needs Sign in with Microsoft instead of a password." },
          "microsoft_available": { "type": "boolean", "description": "This service offers Sign in with Microsoft. false: a mailbox with microsoft: true can't be moved here yet." },
          "confirm": { "type": "boolean", "description": "The server is only a guess: ask the user, then pass it as server." },
          "notes": { "type": "array", "items": { "type": "string" } },
          "help": { "type": "object", "properties": { "text": { "type": "string" }, "url": { "type": "string" }, "link_text": { "type": "string" } } }
        }
      }
    }
  }
}
