{
  "openapi": "3.0.3",
  "info": {
    "title": "mailcheck",
    "description": "# Validate your mailing list in one click\nGet assured your mailing list contains only real emails addresses, get rid of bots and inactive users",
    "termsOfService": "https://www.mailcheck.co/terms",
    "contact": {
      "name": "Mailcheck support",
      "url": "https://www.mailcheck.co/#contact-us"
    },
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.mailcheck.co"
    }
  ],
  "tags": [
    {
      "name": "email",
      "description": "Operations on emails"
    }
  ],
  "components": {
    "schemas": {
      "operation": {
        "type": "object",
        "required": ["name"],
        "properties": {
          "name": {
            "type": "string"
          },
          "metadata": {
            "type": "object",
            "properties": {
              "totalCount": {
                "type": "integer",
                "format": "int32"
              },
              "processedCount": {
                "type": "integer",
                "format": "int32"
              },
              "freeLimitReached": {
                "type": "boolean"
              },
              "createTime": {
                "type": "string",
                "format": "date-time"
              }
            }
          },
          "done": {
            "type": "boolean"
          },
          "result": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "error": {
                    "type": "object",
                    "properties": {
                      "code": {
                        "type": "integer",
                        "format": "int32"
                      },
                      "message": {
                        "type": "string"
                      }
                    }
                  }
                }
              },
              {
                "type": "object",
                "properties": {
                  "response": {
                    "type": "object",
                    "properties": {
                      "url": {
                        "type": "string",
                        "format": "url"
                      }
                    }
                  }
                }
              }
            ]
          }
        }
      },
      "result": {
        "type": "object",
        "required": ["email"],
        "properties": {
          "email": {
            "type": "string",
            "format": "email"
          },
          "trustRate": {
            "type": "integer",
            "format": "int32",
            "minimum": 0,
            "maximum": 100
          },
          "mxExists": {
            "type": "boolean"
          },
          "smtpExists": {
            "type": "boolean"
          },
          "isNotSmtpCatchAll": {
            "type": "boolean"
          },
          "isNotDisposable": {
            "type": "boolean"
          },
          "gravatar": {
            "type": "object",
            "properties": {
              "entries": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "profileUrl": {
                      "type": "string",
                      "format": "url"
                    },
                    "preferredUsername": {
                      "type": "string"
                    },
                    "accounts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "domain": {
                            "type": "string"
                          },
                          "shortname": {
                            "type": "string"
                          },
                          "username": {
                            "type": "string"
                          },
                          "userid": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string"
                          },
                          "verified": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "githubUsername": {
            "type": "string"
          },
          "facebook": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "securitySchemes": {
      "API key": {
        "type": "http",
        "description": "Key you can retrieve on the API section of your dashboard",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "paths": {
    "/v1/singleEmail:check": {
      "post": {
        "description": "Process a single email synchronously",
        "operationId": "processSingle",
        "tags": ["email"],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result of a single email processing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/result"
                }
              }
            }
          }
        }
      }
    },
    "/v1/emails:check": {
      "post": {
        "description": "Create a batch check operation",
        "operationId": "createOperation",
        "tags": ["email"],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "emails": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "email"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The operation accepted for processing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/operation"
                }
              }
            }
          }
        }
      }
    },
    "/v1/emails/operations": {
      "get": {
        "description": "List all batch check operations",
        "operationId": "listOperations",
        "tags": ["email"],
        "parameters": [
          {
            "name": "page_size",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "page_token",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "All of the operations for the current user",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "operations": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/operation"
                      }
                    },
                    "nextPageToken": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/emails/{operation_name}": {
      "get": {
        "description": "Get batch check operation status",
        "operationId": "getOperation",
        "tags": ["email"],
        "responses": {
          "200": {
            "description": "Operation status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/operation"
                }
              }
            }
          }
        }
      },
      "parameters": [
        {
          "name": "operation_name",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ]
    }
  },
  "security": [
    {
      "API key": []
    }
  ]
}
