{
  "openapi": "3.0.3",
  "info": {
    "title": "EmailDomainCheck Disposable Email API",
    "description": "Free disposable email domain check: whether a domain appears on tracked disposable blocklists, whether it is a free mail provider, first-seen date and MX status. Domain-level only by design: send the domain, not the address (a full address is accepted defensively and only its domain part is used; nothing is stored). Keyless use is limited per IP per day; a free IPNOVA API key raises the limit.",
    "version": "1.0.0",
    "contact": {
      "email": "hello@ipnova.com",
      "url": "https://emaildomaincheck.com/email-api"
    }
  },
  "servers": [
    {
      "url": "https://emaildomaincheck.com"
    }
  ],
  "paths": {
    "/api/email-domain/{domain}": {
      "get": {
        "summary": "Check a domain for disposable email use",
        "operationId": "checkEmailDomain",
        "security": [
          {},
          {
            "apiKey": []
          }
        ],
        "parameters": [
          {
            "name": "domain",
            "in": "path",
            "required": true,
            "description": "Mail domain, e.g. mailinator.com",
            "schema": {
              "type": "string",
              "example": "mailinator.com"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Check result (also returned for unknown domains, with disposable set to no)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DomainResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Api-Key",
        "description": "Free IPNOVA API key from https://api.ipnova.com (also accepted as ?key= query parameter). Keyless requests share a per-IP daily limit."
      }
    },
    "schemas": {
      "DomainResult": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "domain": {
            "type": "string",
            "example": "mailinator.com"
          },
          "disposable": {
            "type": "string",
            "enum": [
              "confirmed",
              "reported",
              "no"
            ],
            "description": "confirmed when on 2+ tracked blocklists, reported when on one, no otherwise"
          },
          "matched_domain": {
            "type": "string",
            "nullable": true,
            "description": "The blocklisted domain that matched (a parent domain when a subdomain was sent); null when none"
          },
          "blocklists": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Names of the tracked blocklists the domain appears on"
          },
          "blocklists_tracked": {
            "type": "integer",
            "example": 4
          },
          "free_provider": {
            "type": "boolean",
            "description": "True for legitimate free mail providers such as gmail.com"
          },
          "first_seen": {
            "type": "string",
            "nullable": true,
            "description": "Date the domain first appeared on a tracked list; null when never listed"
          },
          "mx_active": {
            "type": "boolean",
            "nullable": true,
            "description": "Whether the domain had live MX records at last sampling; null when not yet sampled"
          },
          "checked_at": {
            "type": "string",
            "format": "date-time"
          },
          "docs": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "example": false
          },
          "error": {
            "type": "boolean",
            "example": true
          },
          "reason": {
            "type": "string",
            "enum": [
              "invalid_input",
              "rate_limit",
              "daily_limit",
              "unknown_endpoint"
            ]
          },
          "message": {
            "type": "string"
          },
          "docs": {
            "type": "string",
            "format": "uri"
          }
        }
      }
    },
    "responses": {
      "Error": {
        "description": "Error envelope with a machine-readable reason field",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    }
  }
}
