{
  "openapi": "3.1.0",
  "info": {
    "title": "mails.fit API",
    "version": "1.0.0",
    "description": "Verify single email addresses, batches of up to 100 and whole lists. One credit per checked address; unknown results are refunded. Authenticate with `Authorization: Bearer mf_live_…`. Each key allows bursts of 20 requests and 10 per second; over that you get 429 with Retry-After. Responses to key-authenticated /v1 requests carry X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset (seconds until the bucket is full) and X-Credits-Remaining. Guides: https://mails.fit/docs"
  },
  "servers": [
    {
      "url": "https://api.mails.fit"
    },
    {
      "url": "https://mails.fit"
    }
  ],
  "security": [
    {
      "bearer": []
    }
  ],
  "paths": {
    "/v1/verify": {
      "post": {
        "summary": "Verify one address",
        "description": "Answers from the 30-day result cache when possible (still one credit). Otherwise waits up to `wait` seconds (0–25, default 25) for the probe; if it has not finished, answers 202 with an id to poll. Send `Idempotency-Key` to make retries charge once. At most 5 requests per account and per client IP wait at once; beyond that a request answers 202 at once. Needs a confirmed email address (403 `email_not_verified`).",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "email"
                ],
                "properties": {
                  "email": {
                    "type": "string",
                    "maxLength": 254
                  },
                  "wait": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 25
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Finished",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Verification"
                }
              }
            }
          },
          "202": {
            "description": "Still checking; poll GET /v1/verify/{id}",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Verification"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "402": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/verify/batch": {
      "post": {
        "summary": "Verify up to 100 addresses",
        "description": "Runs each address through the same path as POST /v1/verify (one credit each, cache, refunds) and waits up to `wait` seconds for them together. Always 200 with one item per address, in order: a Verification (poll pending ids at GET /v1/verify/{id}) or `{email, error: {code, message}}` when that address was not charged. Refused as a whole with 402 when the balance cannot cover it. With `Idempotency-Key: K` (at most 190 characters) item i uses the key `K:i`, so retries charge only new items.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 190
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "emails"
                ],
                "properties": {
                  "emails": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 100,
                    "items": {
                      "type": "string",
                      "maxLength": 254
                    }
                  },
                  "wait": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 25
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "One result per address",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "results",
                    "pending"
                  ],
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/Verification"
                          },
                          {
                            "type": "object",
                            "required": [
                              "email",
                              "error"
                            ],
                            "properties": {
                              "email": {
                                "type": "string"
                              },
                              "error": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string"
                                  },
                                  "message": {
                                    "type": "string"
                                  }
                                }
                              }
                            }
                          }
                        ]
                      }
                    },
                    "pending": {
                      "type": "integer",
                      "description": "Items still checking"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "402": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/verify/{id}": {
      "get": {
        "summary": "Result of an earlier verification",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Finished",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Verification"
                }
              }
            }
          },
          "202": {
            "description": "Still checking",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Verification"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/credits": {
      "get": {
        "summary": "Credit balance",
        "responses": {
          "200": {
            "description": "Balance",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "balance": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "balance"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/lists": {
      "get": {
        "summary": "Your 100 most recent lists",
        "responses": {
          "200": {
            "description": "Lists",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "lists": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ListSummary"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Upload a list",
        "description": "Multipart with a `file` part (CSV or XLSX, up to 50 MB and 1,000,000 rows) and optional `name`, `email_column` (header name or 0-based index) and `webhook_url`; or JSON: an array of addresses or `{\"emails\": [...], \"name\": ..., \"webhook_url\": ...}`. JSON bodies are capped at 5 MB; send bigger lists as a file. A list may hold up to twice your credit balance in distinct addresses (at least 1,000), and at most 3 of your lists may be open (not done or failed) at once (429 `too_many_open_lists`). Distinct addresses are checked and charged once. Processing pauses when credits run out and resumes when you add credits.",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "contentMediaType": "application/octet-stream"
                  },
                  "name": {
                    "type": "string"
                  },
                  "email_column": {
                    "type": "string"
                  },
                  "webhook_url": {
                    "type": "string",
                    "format": "uri"
                  }
                }
              }
            },
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "emails"
                    ],
                    "properties": {
                      "emails": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "name": {
                        "type": "string"
                      },
                      "webhook_url": {
                        "type": "string",
                        "format": "uri"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted; processing in the background",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/List"
                }
              }
            }
          },
          "402": {
            "$ref": "#/components/responses/Error"
          },
          "413": {
            "$ref": "#/components/responses/Error"
          },
          "415": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/lists/{id}": {
      "get": {
        "summary": "Progress of a list",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/List"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/lists/{id}/download": {
      "get": {
        "summary": "Results as CSV",
        "description": "Your original rows and columns, followed by mf_status, mf_reason, mf_score, mf_suggestion, mf_disposable, mf_free, mf_role, and mf_catch_all. Cells a spreadsheet would run as formulas start with '. Streamed.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "description": "`all` (default) or a comma list of deliverable, risky, undeliverable, unknown",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "CSV",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/hooks": {
      "post": {
        "summary": "Subscribe a REST hook",
        "description": "For Zapier, Make and similar tools. `list.completed` and `list.monitor_changed` need the lists scope, `verify.completed` and `monitor.changed` the verify scope (it fires for /v1/verify requests). Deliveries are signed like the webhooks below; a target answering 410 Gone is unsubscribed. Targets must be public https URLs. At most 25 per account; deleted when the key that created them is revoked, which also stops their pending retries.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "target_url",
                  "event"
                ],
                "properties": {
                  "target_url": {
                    "type": "string",
                    "format": "uri",
                    "maxLength": 2000
                  },
                  "event": {
                    "type": "string",
                    "enum": [
                      "list.completed",
                      "verify.completed",
                      "list.monitor_changed",
                      "monitor.changed"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Subscribed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "event",
                    "target_url"
                  ],
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "event": {
                      "type": "string"
                    },
                    "target_url": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/hooks/{id}": {
      "delete": {
        "summary": "Unsubscribe a REST hook",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/widget/check": {
      "post": {
        "summary": "Signup form widget check",
        "description": "Called by /widget.js from a customer's page. Authenticated by a publishable key (`mf_pub_…`) in the query string; the Origin header must be one of the key's allowed origins, and CORS headers are sent only for those. The body is JSON (any content type; the widget sends text/plain to skip the preflight). Charges the key owner one credit (unknown results refunded). Limits: the key's daily cap (default 500, set in the dashboard; past it the answer is `unavailable`), 30 a minute per key, 10 a minute per key and client IP, 20 a minute per client IP. Errors about the owner's account or the server are one generic 503 `unavailable`. OPTIONS answers the preflight for allowed origins.",
        "security": [],
        "parameters": [
          {
            "name": "key",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^mf_pub_[0-9a-f]{32}$"
            }
          },
          {
            "name": "Origin",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "text/plain": {
              "schema": {
                "type": "object",
                "required": [
                  "email"
                ],
                "properties": {
                  "email": {
                    "type": "string",
                    "maxLength": 254
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Coarse result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status"
                  ],
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "ok",
                        "risky",
                        "invalid",
                        "unavailable"
                      ],
                      "description": "invalid also covers disposable addresses when the key blocks them; a check still pending answers risky; unavailable once the key's daily cap is reached"
                    },
                    "suggestion": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/monitors": {
      "get": {
        "summary": "List blacklist monitors",
        "description": "Needs the verify scope. Checks run every 6 hours and cost no credits; the number of monitors is capped per plan (`limit`).",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BlacklistMonitor"
                      }
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "interval_hours": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "post": {
        "summary": "Monitor an IP or domain on public blocklists",
        "description": "Needs a confirmed email address. The first check runs within a minute. On the Free plan a domain is checked only after its owner publishes the TXT record in `verify_record` and calls POST /v1/monitors/{id}/verify; IPs and paid-plan domains need no proof. A listing or delisting mails the account owner and fires `monitor.changed`. Lists that refuse or do not answer keep their previous state. Spamhaus is queried over DQS when the operator configured a key.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "target"
                ],
                "properties": {
                  "target": {
                    "type": "string",
                    "description": "Public IPv4/IPv6 address or domain"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BlacklistMonitor"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/monitors/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "integer"
          }
        }
      ],
      "get": {
        "summary": "A monitor and its last 50 checks",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "monitor": {
                      "$ref": "#/components/schemas/BlacklistMonitor"
                    },
                    "checks": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "checked_at": {
                            "type": "string"
                          },
                          "listed": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "added": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "removed": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "unanswered": {
                            "type": "integer"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "delete": {
        "summary": "Stop monitoring",
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/monitors/{id}/verify": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "integer"
          }
        }
      ],
      "post": {
        "summary": "Prove ownership of a monitored domain",
        "description": "Looks up the domain's TXT records for the monitor's `verify_record`; on success the monitor is verified and checked at once.",
        "responses": {
          "200": {
            "description": "Verified",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BlacklistMonitor"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/lists/{id}/monitor": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "integer"
          }
        }
      ],
      "get": {
        "summary": "List monitoring state and run history",
        "description": "Needs the lists scope.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "monitor": {
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "runs": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ListMonitorRun"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "put": {
        "summary": "Re-verify a finished list every 7 or 30 days",
        "description": "Results younger than the interval are reused; the rest are probed again. One credit per address whose status changed; unchanged and unknown re-checks are free. Changes beyond the balance are not applied (newly undeliverable first) and counted as `unpaid`. A run needs a positive balance, else it is recorded as skipped. Changes mail the owner and fire `list.monitor_changed`. Monitored lists are kept past the 30-day retention. Lists up to 100,000 addresses; monitored lists per account capped per plan.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "interval_days"
                ],
                "properties": {
                  "interval_days": {
                    "type": "integer",
                    "enum": [
                      7,
                      30
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "monitor": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "delete": {
        "summary": "Stop monitoring the list",
        "responses": {
          "204": {
            "description": "Stopped"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/enrich": {
      "post": {
        "summary": "Enrich a domain from public data",
        "description": "Needs the verify scope. 1 credit per call, refunded (`charged: false`) when the home page could not be read or gave nothing. Company name, description, logo, favicon and social links come from the domain's own home page (robots.txt obeyed): treat them as untrusted text (control characters are stripped and lengths capped, but HTML-escape before rendering). Also mail provider, SPF/DMARC/DKIM summary, free/disposable flags; with `email`, Gravatar presence (Gravatar receives the address's SHA-256 hash). Useful domain data is cached 7 days, a failed read 1 hour. Opted-out domains are refused. No personal data is bought.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "domain": {
                    "type": "string"
                  },
                  "email": {
                    "type": "string",
                    "format": "email"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "domain": {
                      "type": "string"
                    },
                    "website": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "website_error": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "company": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "logo": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "favicon": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "socials": {
                          "type": "array",
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "minItems": 2,
                            "maxItems": 2
                          }
                        }
                      },
                      "description": "Untrusted text from the crawled site"
                    },
                    "mail": {
                      "type": "object",
                      "properties": {
                        "mx_hosts": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "provider": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "spf": {
                          "type": "string",
                          "enum": [
                            "ok",
                            "warning",
                            "error",
                            "missing"
                          ]
                        },
                        "dmarc": {
                          "type": "string"
                        },
                        "dkim_selectors": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "free_provider": {
                      "type": "boolean"
                    },
                    "disposable": {
                      "type": "boolean"
                    },
                    "fetched_at": {
                      "type": "string"
                    },
                    "cached": {
                      "type": "boolean"
                    },
                    "gravatar": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "email": {
                          "type": "string"
                        },
                        "exists": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "url": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "charged": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "402": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "504": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/placement-tests": {
      "get": {
        "summary": "Your inbox placement tests",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PlacementTest"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "post": {
        "summary": "Start an inbox placement test",
        "description": "Needs the verify scope. Free, 10 per 24 hours and 3 open at once. Send your message with `token` to every seed address, then call POST /v1/placement-tests/{id}/sent: the seeds are searched for 30 minutes from then. Tests never confirmed close after 24 hours without a score. 503 `not_configured` while no seed mailboxes are set up, 503 `busy` at capacity.",
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlacementTest"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/placement-tests/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "integer"
          }
        }
      ],
      "get": {
        "summary": "A placement test report",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlacementTest"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/placement-tests/{id}/sent": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "integer"
          }
        }
      ],
      "post": {
        "summary": "Confirm the test message was sent",
        "description": "Starts the 30-minute search window. Idempotent. At most 20 tests are searched at once across all accounts (503 `busy`, retry later).",
        "responses": {
          "200": {
            "description": "Window started",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlacementTest"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/tools/spam-trap-checker": {
      "get": {
        "summary": "Spam-trap risk of an address or domain",
        "description": "No API key needed; rate-limited per client IP. Signals: recently registered domain (RDAP, < 90 days), typo of a big provider, parked domain, no mail server, reserved or published trap domain, complaint mailboxes. A risk indicator, never a verdict.",
        "security": [],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tool": {
                      "const": "spam-trap-checker"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "risk": {
                          "type": "string",
                          "enum": [
                            "none",
                            "low",
                            "medium",
                            "high"
                          ]
                        },
                        "signals": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string"
                              },
                              "risk": {
                                "type": "string"
                              },
                              "detail": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "registered": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "registered_days": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "ns": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "mx": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid input"
          },
          "429": {
            "description": "Rate limited"
          }
        }
      }
    },
    "/v1/tools/{slug}": {
      "get": {
        "summary": "Run a public DNS or deliverability tool",
        "description": "No API key needed; limited per client IP (30 units a minute, 300 a day; dns-lookup and spf-checker cost 2, blacklist-checker and spam-trap-checker 3). Errors are `{\"error\": \"message\"}`; 429 adds `retry_after`.",
        "security": [],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "mx-lookup",
                "dns-lookup",
                "spf-checker",
                "dkim-checker",
                "dmarc-checker",
                "blacklist-checker",
                "spam-trap-checker"
              ]
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 300
            },
            "description": "Domain, address or IP"
          },
          {
            "name": "selector",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 63
            },
            "description": "DKIM selector (dkim-checker)"
          }
        ],
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tool",
                    "result"
                  ],
                  "properties": {
                    "tool": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Unknown tool"
          },
          "422": {
            "description": "Invalid input"
          },
          "429": {
            "description": "Rate limited"
          }
        }
      }
    },
    "/v1/tools/email-finder": {
      "post": {
        "summary": "Find a person's address at a domain",
        "description": "API key with the verify scope (or a signed-in session). 20 runs per tool per rolling 24 hours. Poll the returned status_url. Errors are `{\"error\": \"message\"}`.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "first_name",
                  "last_name",
                  "domain"
                ],
                "properties": {
                  "first_name": {
                    "type": "string"
                  },
                  "last_name": {
                    "type": "string"
                  },
                  "domain": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Started",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "status_url"
                  ],
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "status_url": {
                      "type": "string",
                      "example": "/v1/tools/runs/12"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "No key or session"
          },
          "403": {
            "description": "Missing verify scope or unconfirmed email"
          },
          "422": {
            "description": "Invalid input"
          },
          "429": {
            "description": "Daily runs used up or rate limited"
          },
          "503": {
            "description": "Busy; not counted"
          }
        }
      }
    },
    "/v1/tools/domain-search": {
      "post": {
        "summary": "Find public addresses on a domain",
        "description": "Crawls the domain's public pages and verifies up to 10 addresses found. Same access and limits as the email finder.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "domain"
                ],
                "properties": {
                  "domain": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Started",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "status_url"
                  ],
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "status_url": {
                      "type": "string",
                      "example": "/v1/tools/runs/12"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "No key or session"
          },
          "403": {
            "description": "Missing verify scope or unconfirmed email"
          },
          "422": {
            "description": "Invalid input"
          },
          "429": {
            "description": "Daily runs used up or rate limited"
          },
          "503": {
            "description": "Busy; not counted"
          }
        }
      }
    },
    "/v1/tools/runs/{id}": {
      "get": {
        "summary": "A finder or domain-search run",
        "description": "The run and its results; poll while results are pending.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Run",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "No key or session"
          },
          "404": {
            "description": "No such run"
          }
        }
      }
    },
    "/v1/health": {
      "get": {
        "summary": "Liveness",
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "const": "ok"
                    },
                    "service": {
                      "type": "string"
                    },
                    "version": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/openapi.json": {
      "get": {
        "summary": "This OpenAPI document",
        "security": [],
        "responses": {
          "200": {
            "description": "OpenAPI 3.1 JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  },
  "webhooks": {
    "list.completed": {
      "post": {
        "summary": "A list finished",
        "description": "Headers: X-Mailsfit-Event, X-Mailsfit-Timestamp (unix seconds), X-Mailsfit-Signature: sha256=<hex HMAC-SHA256 of \"{timestamp}.{body}\" with your signing secret>. Retried 3 times with backoff on non-2xx.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "event": {
                    "const": "list.completed"
                  },
                  "list_id": {
                    "type": "integer"
                  },
                  "name": {
                    "type": "string"
                  },
                  "status": {
                    "type": "string"
                  },
                  "rows": {
                    "type": "integer"
                  },
                  "unique_emails": {
                    "type": "integer"
                  },
                  "counts": {
                    "$ref": "#/components/schemas/Progress"
                  },
                  "finished_at": {
                    "type": "string",
                    "format": "date-time"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx acknowledges"
          }
        }
      }
    },
    "verify.completed": {
      "post": {
        "summary": "A /v1/verify request finished (REST hook subscribers only)",
        "description": "Signed like list.completed. The body is the verification result plus `event`.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "event": {
                        "const": "verify.completed"
                      }
                    }
                  },
                  {
                    "$ref": "#/components/schemas/Verification"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx acknowledges"
          }
        }
      }
    },
    "monitor.changed": {
      "post": {
        "summary": "A blacklist monitor found a listing or delisting",
        "description": "Sent to the account webhook URL and to REST hook subscribers; signed like list.completed.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "event": {
                    "const": "monitor.changed"
                  },
                  "monitor_id": {
                    "type": "integer"
                  },
                  "kind": {
                    "type": "string"
                  },
                  "target": {
                    "type": "string"
                  },
                  "listed": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/Listing"
                    }
                  },
                  "added": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/Listing"
                    }
                  },
                  "removed": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/Listing"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx acknowledges"
          }
        }
      }
    },
    "list.monitor_changed": {
      "post": {
        "summary": "A list monitoring run found changed results",
        "description": "Sent to the account webhook URL and to REST hook subscribers; signed like list.completed.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "event": {
                    "const": "list.monitor_changed"
                  },
                  "list_id": {
                    "type": "integer"
                  },
                  "run_id": {
                    "type": "integer"
                  },
                  "name": {
                    "type": "string"
                  },
                  "checked": {
                    "type": "integer"
                  },
                  "changed": {
                    "type": "integer"
                  },
                  "newly_undeliverable": {
                    "type": "integer"
                  },
                  "unpaid": {
                    "type": "integer"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx acknowledges"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "API key starting with mf_live_"
      }
    },
    "responses": {
      "Error": {
        "description": "Error",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "schemas": {
      "Verification": {
        "type": "object",
        "required": [
          "id",
          "state"
        ],
        "properties": {
          "id": {
            "type": "integer"
          },
          "state": {
            "enum": [
              "done",
              "pending"
            ]
          },
          "email": {
            "type": "string"
          },
          "status": {
            "enum": [
              "deliverable",
              "risky",
              "undeliverable",
              "unknown"
            ]
          },
          "reason": {
            "enum": [
              "accepted",
              "invalid_syntax",
              "no_mx",
              "user_unknown",
              "catch_all",
              "role",
              "disposable",
              "mailbox_full",
              "provider_unverifiable",
              "greylisted",
              "blocked",
              "timeout",
              "dns_error",
              "mx_not_public",
              "inconclusive",
              "suppressed"
            ]
          },
          "score": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          },
          "suggestion": {
            "type": [
              "string",
              "null"
            ],
            "description": "Typo fix, e.g. jane@gmail.com for jane@gmial.com"
          },
          "did_you_mean": {
            "type": [
              "string",
              "null"
            ],
            "description": "Same value as suggestion"
          },
          "disposable": {
            "type": "boolean"
          },
          "free": {
            "type": "boolean"
          },
          "role": {
            "type": "boolean"
          },
          "catch_all": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "mx_found": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "The domain publishes MX hosts; null when DNS was not read (invalid syntax, DNS error, opted out)"
          },
          "mx_group": {
            "enum": [
              "google",
              "microsoft",
              "yahoo",
              "mimecast",
              "other"
            ]
          },
          "smtp_provider": {
            "enum": [
              "google",
              "microsoft",
              "yahoo",
              "mimecast",
              "other"
            ],
            "description": "Same value as mx_group"
          },
          "mx_host": {
            "type": [
              "string",
              "null"
            ]
          },
          "smtp_code": {
            "type": [
              "integer",
              "null"
            ]
          },
          "spam_trap_risk": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "typo_domain",
                "listed_domain",
                "trap_local_part"
              ]
            },
            "description": "Spam-trap risk indicators that need no lookup. A risk signal, never a verdict. Omitted when empty."
          }
        },
        "example": {
          "id": 1842,
          "state": "done",
          "email": "jane@example.com",
          "status": "deliverable",
          "reason": "accepted",
          "score": 95,
          "suggestion": null,
          "did_you_mean": null,
          "disposable": false,
          "free": false,
          "role": false,
          "catch_all": false,
          "mx_found": true,
          "mx_group": "other",
          "smtp_provider": "other",
          "mx_host": "mx.example.com",
          "smtp_code": 250
        }
      },
      "Progress": {
        "type": "object",
        "properties": {
          "pending": {
            "type": "integer"
          },
          "queued": {
            "type": "integer"
          },
          "deliverable": {
            "type": "integer"
          },
          "risky": {
            "type": "integer"
          },
          "undeliverable": {
            "type": "integer"
          },
          "unknown": {
            "type": "integer"
          }
        }
      },
      "ListSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "enum": [
              "ingesting",
              "processing",
              "paused",
              "done",
              "failed"
            ]
          },
          "rows": {
            "type": "integer"
          },
          "unique_emails": {
            "type": "integer"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "finished_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "List": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "enum": [
              "ingesting",
              "processing",
              "paused",
              "done",
              "failed"
            ]
          },
          "pause_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "rows": {
            "type": "integer"
          },
          "unique_emails": {
            "type": "integer"
          },
          "progress": {
            "$ref": "#/components/schemas/Progress"
          },
          "eta_seconds": {
            "type": [
              "integer",
              "null"
            ],
            "description": "null while estimating"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "finished_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "Listing": {
        "type": "object",
        "properties": {
          "zone": {
            "type": "string"
          },
          "subject": {
            "type": "string",
            "description": "The IP or domain the list answered for"
          },
          "delist": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          }
        }
      },
      "BlacklistMonitor": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "kind": {
            "type": "string",
            "enum": [
              "ip",
              "domain"
            ]
          },
          "target": {
            "type": "string"
          },
          "listed": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Listing"
            }
          },
          "last_checked_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "next_check_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "verified": {
            "type": "boolean",
            "description": "Only verified monitors are checked. IPs and paid-plan domains are verified at once; Free-plan domains after the TXT proof."
          },
          "verify_record": {
            "type": [
              "string",
              "null"
            ],
            "description": "TXT record (mailsfit-verify=<token>) to publish on the domain while unverified"
          }
        }
      },
      "ListMonitorRun": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "checked": {
            "type": "integer"
          },
          "reused": {
            "type": "integer"
          },
          "probed": {
            "type": "integer"
          },
          "changed": {
            "type": "integer"
          },
          "newly_undeliverable": {
            "type": "integer"
          },
          "unpaid": {
            "type": "integer"
          },
          "status": {
            "type": "string",
            "enum": [
              "running",
              "done",
              "skipped"
            ]
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          },
          "started_at": {
            "type": "string"
          },
          "finished_at": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "PlacementTest": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "token": {
            "type": "string",
            "description": "Put it in the subject or body of the message you send to every seed"
          },
          "status": {
            "type": "string",
            "enum": [
              "waiting",
              "done"
            ]
          },
          "score": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Inbox 100, Gmail tab 75, spam or missing 0; unreadable seeds do not count"
          },
          "created_at": {
            "type": "string"
          },
          "expires_at": {
            "type": "string",
            "description": "End of the search window, or (before the send is confirmed) when the unconfirmed test closes, 24 h after creation"
          },
          "seeds": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "provider": {
                  "type": "string"
                },
                "address": {
                  "type": "string",
                  "format": "email"
                },
                "folder": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "inbox",
                    "promotions",
                    "updates",
                    "spam",
                    "missing",
                    "error",
                    null
                  ]
                },
                "spf": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "dkim": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "dmarc": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "found_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            }
          },
          "sent_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "When the send was confirmed; seeds are searched for 30 minutes from here"
          }
        }
      }
    }
  }
}
