{
  "openapi": "3.1.0",
  "info": {
    "title": "MailTester Ninja Email Verification and Finder API",
    "version": "1.3.0",
    "summary": "Check in real time whether an email address is valid and deliverable, and find a person's work email from their name and company domain.",
    "description": "One GET request per address. MailTester Ninja checks the address against the recipient's live mail server (syntax, domain, MX records, then an SMTP conversation that stops before any message is sent) and returns a verdict. Nothing is stored.\n\nBranch your code on `code`:\n\n| code | Meaning | Typical `message` |\n|------|---------|-------------------|\n| `ok` | Valid and deliverable | Accepted |\n| `ko` | Invalid, will bounce | Rejected, No MX, Disposable, Limited |\n| `mb` | Uncertain: the domain accepts everything or could not be probed | Catch-All, MX Error, Timeout, SPAM Block, Greylisted, Abuse |\n| `--` | No verdict, the address was not checked | Invalid Key, Disabled Key, free limit message (HTTP 429) |\n\nA catch-all domain is never reported as valid. Never drop an address on a `--` answer: fix the key, or wait and retry.\n\n**Keys and limits.** Pass `key=free` to try the API with no signup (10 checks a day per IP), a free token `mtf_...` from https://mailtester.ninja/free-email-verification-api/ (50 checks a day, valid 7 days), or a subscription key `sub_...` from https://mailtester.ninja/verify-emails-unlimited/. The free tier allows one request every 30 seconds. A paid key allows its daily limit divided by 8640 requests per 10 seconds, for all connections together (Pro 11, Ultimate 23 per 10 seconds; buy a quantity to multiply it).\n\n**Finder API.** `GET /find` takes `first`, `last` and `domain` and tests the most common address formats one by one (first.last, flast, first, firstlast, first_last, f.last) until the mail server accepts one. It stops early when the answer applies to the whole domain: on a catch-all domain the most common format is returned as `guess`. Personal email providers such as gmail.com are not searched. Paid keys only. Each format tested counts as one verification against the daily limit and the rate of the key, even when nothing is found; the `/find` call itself is not counted. The search paces its formats within the rate of the key; if the key is already at its maximum, it answers HTTP 429 with a `Retry-After` header. One key can run up to 60 searches an hour on the same domain.\n\n**Content type.** On `/ninja`, send `Accept: application/json` to receive `application/json`; without it the same JSON body is served as `text/plain`. `/find` always answers `application/json`.\n\nCode examples for cURL, Python, Node.js, PHP, Go, Ruby, Java, C#, Google Sheets, n8n, Make, Zapier, Clay and AI agents: https://mailtester.ninja/integrations/code-examples/ (also on GitHub: https://github.com/mailtester-ninja/mailtester-api-examples)",
    "termsOfService": "https://mailtester.ninja/terms-of-use/",
    "contact": {
      "name": "MailTester Ninja",
      "url": "https://mailtester.ninja/contact/",
      "email": "contact@mailtester.ninja"
    },
    "license": {
      "name": "Proprietary",
      "url": "https://mailtester.ninja/terms-of-use/"
    },
    "x-logo": {
      "url": "https://mailtester.ninja/favicon.svg",
      "altText": "MailTester Ninja"
    }
  },
  "externalDocs": {
    "description": "API documentation",
    "url": "https://mailtester.ninja/api/"
  },
  "servers": [
    {
      "url": "https://happy.mailtester.ninja",
      "description": "Production"
    }
  ],
  "security": [
    {
      "apiKey": []
    }
  ],
  "tags": [
    {
      "name": "Verification",
      "description": "Real-time email address verification."
    },
    {
      "name": "Finder",
      "description": "Find a person's work email address from their name and company domain."
    }
  ],
  "paths": {
    "/ninja": {
      "get": {
        "tags": [
          "Verification"
        ],
        "operationId": "verifyEmail",
        "summary": "Verify an email address",
        "description": "Checks one email address in real time and returns a verdict. Use `code` to decide (`ok` send, `ko` drop, `mb` decide by risk, `--` no verdict) and show `message` to people. A check usually takes one to a few seconds; allow up to 45 seconds for slow mail servers.",
        "parameters": [
          {
            "name": "email",
            "in": "query",
            "required": true,
            "description": "The email address to verify, URL-encoded.",
            "schema": {
              "type": "string",
              "format": "email",
              "maxLength": 254
            },
            "example": "info@apple.com"
          }
        ],
        "responses": {
          "200": {
            "description": "Verification result. Also returned with `code` set to `--` when the key is invalid or disabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VerificationResult"
                },
                "examples": {
                  "valid": {
                    "summary": "Valid and deliverable",
                    "value": {
                      "code": "ok",
                      "message": "Accepted",
                      "domain": "apple.com",
                      "mx": "mx-in.g.apple.com",
                      "connections": 1,
                      "limit": 100000,
                      "rate": 1,
                      "email": "info@apple.com",
                      "user": "Info"
                    }
                  },
                  "invalid": {
                    "summary": "Mailbox does not exist",
                    "value": {
                      "code": "ko",
                      "message": "Rejected",
                      "domain": "gmail.com",
                      "mx": "gmail-smtp-in.l.google.com",
                      "connections": 1,
                      "limit": 100000,
                      "rate": 1,
                      "email": "no.such.user.2026@gmail.com",
                      "user": "No Such User 2026"
                    }
                  },
                  "catchAll": {
                    "summary": "Domain accepts every address",
                    "value": {
                      "code": "mb",
                      "message": "Catch-All",
                      "domain": "stripe.com",
                      "mx": "aspmx.l.google.com",
                      "connections": 1,
                      "limit": 100000,
                      "rate": 1,
                      "email": "hello@stripe.com",
                      "user": "Hello"
                    }
                  },
                  "invalidKey": {
                    "summary": "Key not recognised",
                    "value": {
                      "code": "--",
                      "message": "Invalid Key",
                      "domain": null,
                      "mx": "",
                      "connections": 0,
                      "limit": 0,
                      "rate": 0,
                      "email": "info@apple.com",
                      "user": "Info"
                    }
                  }
                }
              },
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/VerificationResult"
                }
              }
            }
          },
          "400": {
            "description": "Malformed key. The body is the subscription page URL.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "example": "https://mailtester.ninja/subscribe"
              }
            }
          },
          "401": {
            "description": "Malformed email address, rejected before verification.",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Missing or empty `email` or `key` parameter.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "examples": {
                  "missingKey": {
                    "value": "Missing key param"
                  },
                  "emptyKey": {
                    "value": "Empty key param"
                  },
                  "missingEmail": {
                    "value": "Missing email param"
                  }
                }
              }
            }
          },
          "429": {
            "description": "Limit reached, the address was not checked. Not a verdict: wait and retry. On the free tier the body is a JSON result with `code` set to `--` and a `message` saying how long to wait; on a paid key the body is plain text describing the rate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VerificationResult"
                },
                "example": {
                  "code": "--",
                  "message": "Free API: one request every 30 s, retry in 29 s. Unlimited speed: https://mailtester.ninja/verify-emails-unlimited/",
                  "domain": null,
                  "mx": "",
                  "connections": 0,
                  "limit": 10,
                  "rate": 0,
                  "email": "info@apple.com",
                  "user": "Info"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "example": "Too Many Requests - Your rate is now 25 - Using 3 connections - Your daily limit is 200000 - Your max rate per 10 secs for all connections is 23.148148148148 - Please Adapt your query rates https://mailtester.ninja/api"
              }
            }
          }
        }
      }
    },
    "/find": {
      "get": {
        "tags": [
          "Finder"
        ],
        "operationId": "findEmail",
        "summary": "Find a work email address",
        "description": "Tests the most common address formats for a person at a company domain, one by one and in order of frequency (first.last, flast, first, firstlast, first_last, f.last), and returns the first one the mail server accepts. Names are normalised the way mail servers expect them: lowercase, accents removed (ä, ö, ü become ae, oe, ue), hyphens kept, spaces and apostrophes removed. The search stops as soon as an address is accepted, or on a verdict that applies to the whole domain (Catch-All, No MX, Disposable, SPAM Block, Greylisted, Timeout, MX Error) or to the person (Limited: the mailbox exists but cannot receive). Each format tested counts as one verification, reported in `permutations` and listed in `tested`. `format` gives the pattern found and `confidence` how sure the address is to belong to the person. Paid keys only. A search usually takes one to a few seconds; allow up to 45 seconds.",
        "parameters": [
          {
            "name": "first",
            "in": "query",
            "required": true,
            "description": "First name, for example `Jean-Pierre`.",
            "schema": {
              "type": "string",
              "maxLength": 100
            },
            "example": "Tim"
          },
          {
            "name": "last",
            "in": "query",
            "required": true,
            "description": "Last name, for example `De La Tour`.",
            "schema": {
              "type": "string",
              "maxLength": 100
            },
            "example": "Cook"
          },
          {
            "name": "domain",
            "in": "query",
            "required": true,
            "description": "Company domain, for example `apple.com`. A website address or an email address at that domain is accepted too.",
            "schema": {
              "type": "string",
              "maxLength": 253
            },
            "example": "apple.com"
          },
          {
            "name": "timeout",
            "in": "query",
            "required": false,
            "description": "Maximum duration of the search in seconds, from 10 to 40 (default 40), for platforms that stop a step early, such as Zapier (30 seconds per step). When the time runs out after at least one format was tested, the answer is `mb` / `Timeout` with the formats already tested, instead of HTTP 429.",
            "schema": {
              "type": "integer",
              "minimum": 10,
              "maximum": 40,
              "default": 40
            },
            "example": 25
          }
        ],
        "responses": {
          "200": {
            "description": "Search result. `found` is true when an address was accepted. Also returned with `code` set to `--` when the key is invalid or disabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FindResult"
                },
                "examples": {
                  "found": {
                    "summary": "Address found",
                    "value": {
                      "code": "ok",
                      "message": "Accepted",
                      "found": true,
                      "email": "tcook@apple.com",
                      "format": "flast",
                      "confidence": "medium",
                      "guess": null,
                      "first": "Tim",
                      "last": "Cook",
                      "domain": "apple.com",
                      "mx": "mx-in.g.apple.com",
                      "permutations": 2,
                      "tested": [
                        {
                          "email": "tim.cook@apple.com",
                          "code": "ko",
                          "message": "Rejected"
                        },
                        {
                          "email": "tcook@apple.com",
                          "code": "ok",
                          "message": "Accepted"
                        }
                      ],
                      "connections": 1,
                      "limit": 100000,
                      "rate": 2,
                      "duration": 1.84,
                      "reason": null
                    }
                  },
                  "notFound": {
                    "summary": "None of the formats exists",
                    "value": {
                      "code": "ko",
                      "message": "Rejected",
                      "found": false,
                      "email": null,
                      "format": null,
                      "confidence": null,
                      "guess": null,
                      "first": "Jane",
                      "last": "Doe",
                      "domain": "apple.com",
                      "mx": "mx-in.g.apple.com",
                      "permutations": 6,
                      "tested": [
                        {
                          "email": "jane.doe@apple.com",
                          "code": "ko",
                          "message": "Rejected"
                        },
                        {
                          "email": "jdoe@apple.com",
                          "code": "ko",
                          "message": "Rejected"
                        },
                        {
                          "email": "jane@apple.com",
                          "code": "ko",
                          "message": "Rejected"
                        },
                        {
                          "email": "janedoe@apple.com",
                          "code": "ko",
                          "message": "Rejected"
                        },
                        {
                          "email": "jane_doe@apple.com",
                          "code": "ko",
                          "message": "Rejected"
                        },
                        {
                          "email": "j.doe@apple.com",
                          "code": "ko",
                          "message": "Rejected"
                        }
                      ],
                      "connections": 1,
                      "limit": 100000,
                      "rate": 6,
                      "duration": 5.2,
                      "reason": "None of the 6 most common address formats exists on this domain."
                    }
                  },
                  "catchAll": {
                    "summary": "Catch-all domain, most common format given as guess",
                    "value": {
                      "code": "mb",
                      "message": "Catch-All",
                      "found": false,
                      "email": null,
                      "format": "first.last",
                      "confidence": null,
                      "guess": "jane.doe@stripe.com",
                      "first": "Jane",
                      "last": "Doe",
                      "domain": "stripe.com",
                      "mx": "aspmx.l.google.com",
                      "permutations": 1,
                      "tested": [
                        {
                          "email": "jane.doe@stripe.com",
                          "code": "mb",
                          "message": "Catch-All"
                        }
                      ],
                      "connections": 1,
                      "limit": 100000,
                      "rate": 1,
                      "duration": 0.9,
                      "reason": "The domain accepts every address (catch-all), so no address can be confirmed. \"guess\" holds the most common format."
                    }
                  },
                  "webmail": {
                    "summary": "Personal email provider, not searched",
                    "value": {
                      "code": "mb",
                      "message": "Webmail",
                      "found": false,
                      "email": null,
                      "format": null,
                      "confidence": null,
                      "guess": null,
                      "first": "Jane",
                      "last": "Doe",
                      "domain": "gmail.com",
                      "mx": "",
                      "permutations": 0,
                      "tested": [],
                      "connections": 0,
                      "limit": 100000,
                      "rate": 0,
                      "duration": 0.05,
                      "reason": "gmail.com is a personal email provider: an accepted address there could belong to anyone with this name. The Finder API searches company domains."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid key or missing names or domain. Nothing was tested.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FindResult"
                },
                "example": {
                  "code": "--",
                  "message": "Invalid parameters",
                  "found": false,
                  "email": null,
                  "format": null,
                  "confidence": null,
                  "guess": null,
                  "first": "",
                  "last": "Doe",
                  "domain": "acme",
                  "mx": "",
                  "permutations": 0,
                  "tested": [],
                  "connections": 0,
                  "limit": 100000,
                  "rate": 0,
                  "duration": 0.05,
                  "reason": "Send first, last and domain, for example first=Jane&last=Doe&domain=example.com (names in Latin letters)."
                }
              }
            }
          },
          "403": {
            "description": "The key is a free key (`free` or `mtf_...`): the Finder API needs a paid key. A missing or empty `key` parameter is refused with a plain text message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FindResult"
                },
                "example": {
                  "code": "--",
                  "message": "Paid key required",
                  "found": false,
                  "email": null,
                  "format": null,
                  "confidence": null,
                  "guess": null,
                  "first": "Tim",
                  "last": "Cook",
                  "domain": "",
                  "mx": "",
                  "permutations": 0,
                  "tested": [],
                  "connections": 0,
                  "limit": 10,
                  "rate": 0,
                  "duration": 0.03,
                  "reason": "The Finder API needs a paid key: https://mailtester.ninja/verify-emails-unlimited/"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "example": "Missing key param"
              }
            }
          },
          "429": {
            "description": "The key is at its maximum rate, or the domain limit of the key is reached (60 searches an hour on one domain). Not a result: wait for the number of seconds in `Retry-After` and retry. `permutations` tells how many formats were tested, and counted, before the stop.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FindResult"
                },
                "example": {
                  "code": "--",
                  "message": "Too Many Requests",
                  "found": false,
                  "email": null,
                  "format": null,
                  "confidence": null,
                  "guess": null,
                  "first": "Jane",
                  "last": "Doe",
                  "domain": "apple.com",
                  "mx": "mx-in.g.apple.com",
                  "permutations": 0,
                  "tested": [],
                  "connections": 1,
                  "limit": 100000,
                  "rate": 12,
                  "duration": 0.04,
                  "reason": "The key is at its maximum rate: 12 verifications in the last 10 seconds for 11.57 allowed. Each tested permutation counts as one verification. Retry in 10 seconds."
                }
              }
            }
          },
          "502": {
            "description": "Internal error during the search. Retry later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FindResult"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "apiKey",
        "in": "query",
        "name": "key",
        "description": "`free` (no signup, 10 checks a day per IP, one request every 30 s), a free token `mtf_...` (50 checks a day, one request every 30 s, valid 7 days: https://mailtester.ninja/free-email-verification-api/) or a subscription key `sub_...` without the braces (https://mailtester.ninja/verify-emails-unlimited/). The Finder API (`/find`) needs a subscription key."
      }
    },
    "schemas": {
      "VerificationResult": {
        "type": "object",
        "required": [
          "code",
          "message",
          "email"
        ],
        "properties": {
          "code": {
            "type": "string",
            "enum": [
              "ok",
              "ko",
              "mb",
              "--"
            ],
            "description": "Machine-readable verdict: `ok` valid, `ko` invalid, `mb` uncertain, `--` no verdict (key problem or limit reached)."
          },
          "message": {
            "type": "string",
            "description": "Human-readable label for the verdict. Known values: Accepted; Rejected, No MX, Disposable, Limited; Catch-All, MX Error, Timeout, SPAM Block, Greylisted, Abuse; Invalid Key, Disabled Key, or a free limit message. Other labels may be added.",
            "examples": [
              "Accepted",
              "Rejected",
              "Catch-All"
            ]
          },
          "email": {
            "type": "string",
            "description": "The address that was checked."
          },
          "user": {
            "type": "string",
            "description": "A human-readable guess of the name, derived from the address."
          },
          "domain": {
            "type": [
              "string",
              "null"
            ],
            "description": "The domain part of the address."
          },
          "mx": {
            "type": "string",
            "description": "The mail server used for the check, when there is one."
          },
          "connections": {
            "type": "integer",
            "description": "Simultaneous connections currently used by the key."
          },
          "limit": {
            "type": "integer",
            "description": "Daily limit of the key (verifications per day)."
          },
          "rate": {
            "type": "integer",
            "description": "Requests made with the key over the last 10 seconds."
          }
        }
      },
      "FindResult": {
        "type": "object",
        "required": [
          "code",
          "message",
          "found",
          "permutations",
          "tested"
        ],
        "properties": {
          "code": {
            "type": "string",
            "enum": [
              "ok",
              "ko",
              "mb",
              "--"
            ],
            "description": "`ok` found, `ko` not found (or Limited), `mb` uncertain (catch-all domain, webmail, server could not be checked), `--` no answer (key problem, invalid parameters or rate limit)."
          },
          "message": {
            "type": "string",
            "description": "Accepted, Rejected, Catch-All, Limited, No MX, MX Error, Disposable, SPAM Block, Greylisted, Timeout, Abuse, Webmail, Too Many Requests, Invalid Key, Paid key required, Invalid parameters. Other labels may be added."
          },
          "found": {
            "type": "boolean",
            "description": "True when the mail server accepted one of the formats."
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "description": "The address found, otherwise null."
          },
          "format": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "first.last",
              "flast",
              "first",
              "firstlast",
              "first_last",
              "f.last",
              null
            ],
            "description": "Pattern of the address returned (`email`, or `guess` when not found). Reuse it to verify colleagues at the same company with one verification each."
          },
          "confidence": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "high",
              "medium",
              "low",
              null
            ],
            "description": "For an address found: `high` when it holds the first and last name, `medium` with an initial (a namesake may share it), `low` with the first name only. Null when nothing was found."
          },
          "guess": {
            "type": [
              "string",
              "null"
            ],
            "description": "Not verified. On a catch-all domain, the most common format; when the mailbox exists but cannot receive (Limited), that address. Otherwise null."
          },
          "first": {
            "type": "string",
            "description": "First name as sent."
          },
          "last": {
            "type": "string",
            "description": "Last name as sent."
          },
          "domain": {
            "type": "string",
            "description": "The normalised domain that was searched."
          },
          "mx": {
            "type": "string",
            "description": "The mail server used, when there is one."
          },
          "permutations": {
            "type": "integer",
            "description": "Address formats tested, each one counted as a verification, even when nothing is found."
          },
          "tested": {
            "type": "array",
            "description": "Every address tested, in order, with its verdict. This is what `permutations` counts.",
            "items": {
              "type": "object",
              "required": [
                "email",
                "code",
                "message"
              ],
              "properties": {
                "email": {
                  "type": "string"
                },
                "code": {
                  "type": "string",
                  "enum": [
                    "ok",
                    "ko",
                    "mb"
                  ]
                },
                "message": {
                  "type": "string"
                }
              }
            }
          },
          "connections": {
            "type": "integer",
            "description": "Simultaneous connections currently used by the key."
          },
          "limit": {
            "type": "integer",
            "description": "Daily limit of the key (verifications per day)."
          },
          "rate": {
            "type": "integer",
            "description": "Verifications made with the key over the last 10 seconds, permutations included."
          },
          "duration": {
            "type": "number",
            "description": "Seconds taken by the search."
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why nothing was found, in plain English. Null when found."
          }
        }
      }
    }
  }
}
