{
  "swagger": "2.0",
  "info": {
    "version": "1.0",
    "title": "Email Validate API",
    "description": "Experian Email Validate API service quickly and accurately identifies whether or not an email address is valid and deliverable. It also offers suggestions for a correct address enabling users to select a more accurate and verified e-mail."
  },
  "host": "api.experianmarketingservices.com",
  "basePath": "/",
  "schemes": [
    "https"
  ],
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "security": [
    {
      "AuthTokenHeader": []
    },
    {
      "AuthTokenQueryParam": []
    }
  ],
  "paths": {
    "/query/EmailValidate/1.0/": {
      "post": {
        "tags": ["Endpoints"],
        "description": "Asynchronous - posts an email address to the service to be validated. Make a GET /result request to retrieve the results.",
        "summary": "Async - Query",
        "operationId": "Async - Query",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "Body",
            "in": "body",
            "required": true,
            "description": "The body of the request.",
            "schema": {
              "$ref": "#/definitions/QueryRequestModel"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "required": true,
            "type": "string",
            "description": "Content type to be returned.",
            "default": "application/json"
          }
        ],
        "responses": {
          "204": {
            "description": "No content",
            "headers": {
              "Content-Location": {
                "type": "string",
                "description": "Location of the validation result"
              }
            }
          },
          "400": {
            "description": "Request failed due to malformed syntax. Check the response header for more information"
          },
          "401": {
            "description": "Provided token is incorrect"
          },
          "403": {
            "description": "Request is not authorized to use the service"
          },
          "500": {
            "description": "We have encountered an unexpected server error"
          },
          "503": {
            "description": "The server is currently unavailable"
          }
        }
      }
    },
    "/result/EmailValidate/1.0/{id}": {
      "get": {
        "tags": ["Endpoints"],
        "description": "Asynchronous - retrieves the results of an Email Validate POST /query request. The URL for this request is returned in the Content-Location response header when making the initial query.",
        "summary": "Async - Result",
        "operationId": "Async - Result",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string",
            "description": "Id for the results of a synchronous email validate request. The full URL for this request is returned in the Content-Type header of a synchronous POST request."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/QueryResultResponseModel"
            }
          },
          "400": {
            "description": "Request failed due to malformed syntax. Check the response header for more information"
          },
          "401": {
            "description": "Provided token is incorrect"
          },
          "403": {
            "description": "Request is not authorized to use the service"
          },
          "500": {
            "description": "We have encountered an unexpected server error"
          },
          "503": {
            "description": "The server is currently unavailable"
          }
        }
      }
    },
    "/sync/queryresult/EmailValidate/1.0/": {
      "post": {
        "tags": ["Endpoints"],
        "description": "Synchronous - posts an email address to the service to be validated and, once complete, returns the results of the validation.",
        "summary": "Sync - QueryResult",
        "operationId": "Sync - QueryResult",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "Body",
            "in": "body",
            "required": true,
            "description": "The body of the request",
            "schema": {
              "$ref": "#/definitions/QueryRequestModel"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "required": true,
            "type": "string",
            "description": "Content type to be returned.",
            "default": "application/json"
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "schema": {
              "$ref": "#/definitions/QueryResultResponseModel"
            }
          },
          "400": {
            "description": "Request failed due to malformed syntax. Check the response header for more information"
          },
          "401": {
            "description": "Provided token is incorrect"
          },
          "403": {
            "description": "Request is not authorized to use the service"
          },
          "500": {
            "description": "We have encountered an unexpected server error"
          },
          "503": {
            "description": "The server is currently unavailable"
          }
        }
      }
    }
  },
  "securityDefinitions": {
    "AuthTokenHeader": {
      "type": "apiKey",
      "in": "header",
      "name": "auth-token",
      "description": "Token used to authenticate your requests - sent in header."
    },
    "AuthTokenQueryParam": {
      "type": "apiKey",
      "in": "query",
      "name": "auth-token",
      "description": "Token used to authenticate your requests - sent as query parameter."
    }
  },
  "definitions": {
    "QueryRequestModel": {
      "title": "QueryRequestModel",
      "type": "object",
      "properties": {
        "Email": {
          "description": "The input email address.",
          "type": "string",
          "example": "anemailexample@gmail.com"
        },
        "Timeout": {
          "description": "The email validation search timeout in seconds. If a timeout occurs, the email certainty status of Unknown will be returned. This setting will have an impact on performance and accuracy. A low value (e.g. 3 seconds) might lead to an inaccurate email result of Unknown status; while a higher value will impact the performance of the returned result.",
          "type": "integer",
          "default": 3,
          "maximum": 15,
          "minimum": 3
        },
        "Verbose": {
          "description": "Determines whether to return VerboseOutput information.",
          "type": "boolean",
          "default": false
        }
      },
      "required": [
        "Email"
      ]
    },
    "QueryResultResponseModel": {
      "title": "ResultResponseModel",
      "type": "object",
      "properties": {
        "Email": {
          "description": "Submitted email address.",
          "type": "string",
          "example": "support@gmailcom"
        },
        "Certainty": {
          "description": "Indicates the email status",
          "type": "string",
          "example": "undeliverable"
        },
        "Message": {
          "description": "Indicates the summary of request's status",
          "type": "string",
          "enum": [
            "OK",
            "Mailbox full",
            "No response"
          ],
          "example": "OK"
        },
        "Corrections": {
          "description": "List of email corrections returned. If available Email Validate API can also return email corrections for syntax mistakes in an email. A maximum of 8 email corrections can be returned in the responses, if available.",
          "type": "array",
          "items": {
            "type": "string"
          },
          "example": [
            "support@gmail.com"
          ]
        },
        "VerboseOutput": {
          "description": "Additional information regarding Certainty responses when verbose flag is True",
          "type": "string",
          "example": "syntaxFailure"
        }
      }
    }
  }
}