{
  "openapi": "3.1.0",
  "info": {
    "title": "EmailValidly API",
    "version": "1.0.0",
    "description": "One credit per unique request. Preserve unknown results."
  },
  "servers": [
    {
      "url": "https://www.emailvalidly.com"
    }
  ],
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "paths": {
    "/v1/verify": {
      "post": {
        "operationId": "verifyEmail",
        "summary": "Verify one address without sending a message",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-zA-Z0-9_-]{8,100}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "email"
                ],
                "properties": {
                  "email": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 254
                  },
                  "deep": {
                    "type": "boolean",
                    "default": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Completed verification or replay",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "email",
                    "status"
                  ],
                  "properties": {
                    "email": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "valid",
                        "likely_valid",
                        "risky",
                        "invalid",
                        "unknown"
                      ]
                    },
                    "score": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 100,
                      "description": "Heuristic summary, not a delivery probability"
                    },
                    "checks": {
                      "type": "object",
                      "properties": {
                        "syntax": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "domain": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "mx": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "disposable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "role": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "mailbox": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "catch_all": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Invalid key or plan"
          },
          "402": {
            "description": "Insufficient credits"
          },
          "409": {
            "description": "In progress or idempotency conflict"
          },
          "429": {
            "description": "Rate limited; obey Retry-After"
          },
          "503": {
            "description": "Unavailable"
          }
        }
      }
    }
  }
}