{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/telesign/main/json-schema/telesign-post-email-int-response-schema.json",
  "title": "postEmailIntResponse",
  "x-generated": "2026-10-07",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/telesign-email-intelligence-api-openapi.yml#/components/schemas/postEmailIntResponse",
  "type": "object",
  "properties": {
    "reference_id": {
      "type": "string",
      "description": "A 32-digit hex value used to identify the web service request. The value is unique to each web service request, is randomly-generated by Telesign, and is returned in the response message immediately following the web service request."
    },
    "external_id": {
      "type": [
        "string",
        "null"
      ],
      "description": "The customer-generated ID for this transaction that was provided in the request. If the `external_id` parameter was not included in the request, the value here is `null`."
    },
    "status": {
      "type": "object",
      "description": "An object containing details about the request status. ",
      "properties": {
        "code": {
          "type": "integer",
          "description": "Transaction status code. Successful transactions can be assigned one of the following values: <br/>\n\t•\t300 - successful transaction<br/>\n\t•\t301 - partially successful transaction"
        },
        "description": {
          "type": "string",
          "description": "Text describing the transaction status."
        },
        "updated_on": {
          "type": "string",
          "description": "An [RFC 3339](http://www.ietf.org/rfc/rfc3339.txt) timestamp indicating when the transaction status was updated."
        }
      }
    },
    "email_address_details": {
      "type": "object",
      "description": "Contains cleansing and intelligence details about the submitted email address.",
      "properties": {
        "original": {
          "$ref": "#/$defs/Original"
        },
        "cleansed": {
          "type": "object",
          "description": "Provides the normalized version of the email address along with the extracted username and domain components.",
          "properties": {
            "email_address": {
              "type": "string",
              "description": "The cleansed email address after correcting common formatting issues."
            },
            "is_valid": {
              "type": "boolean",
              "description": "Indicates whether the cleansed email address is syntactically valid."
            },
            "username": {
              "type": "string",
              "description": "The local-part (username) extracted from the cleansed email address"
            },
            "domain": {
              "type": "string",
              "description": "The domain portion extracted from the cleansed email address."
            }
          }
        },
        "cleansing_details": {
          "type": "object",
          "description": "Describes modifications applied during cleansing and includes indicators such as gibberish probability and tagging.",
          "properties": {
            "is_modified": {
              "type": "boolean",
              "description": "Indicates whether the submitted email address was modified during cleansing."
            },
            "gibberish_probability": {
              "type": "number",
              "description": "A probability score indicating how likely the email username appears algorithmically generated or nonsensical."
            },
            "tag": {
              "type": "string",
              "description": "A tag extracted from the email address, such as a plustag, if applicable."
            }
          }
        },
        "domain_details": {
          "type": "object",
          "description": "Provides structured information about the domain associated with the email address.",
          "properties": {
            "general_info": {
              "type": "object",
              "properties": {
                "registered_domain": {
                  "type": "string",
                  "description": "The registered/base domain associated with the email address."
                },
                "tld": {
                  "type": "string",
                  "description": "The toplevel domain extracted from the email address."
                },
                "tld_type": {
                  "type": "string",
                  "description": "The classification of the toplevel domain, such as general or countrycode."
                },
                "is_disposable": {
                  "type": "boolean",
                  "description": "Indicates whether the email domain is known to be disposable."
                }
              }
            }
          }
        }
      }
    },
    "intelligence_details": {
      "type": "object",
      "description": "Contains properties related to the risk recommendation and supporting insights.",
      "properties": {
        "risk": {
          "$ref": "#/$defs/Risk"
        },
        "insights": {
          "$ref": "#/$defs/RiskInsights"
        }
      }
    }
  },
  "$defs": {
    "Original": {
      "type": "object",
      "properties": {
        "email_address ": {
          "type": "string",
          "description": "The email address value exactly as provided in the request."
        },
        "is_valid": {
          "type": "boolean",
          "description": "Indicates whether the original email address is syntactically valid."
        }
      },
      "description": "Contains the submitted email address exactly as provided and its initial validity evaluation."
    },
    "Risk": {
      "title": "Risk",
      "type": "object",
      "description": "Contains properties related to the risk recommendation for the specified email address.",
      "properties": {
        "level": {
          "type": "string",
          "description": "The severity of the risk. "
        },
        "recommendation": {
          "type": "string",
          "enum": [
            "allow",
            "flag",
            "block"
          ],
          "description": "The action that Telesign recommends that you take based on the risk recommendation."
        },
        "score": {
          "type": "integer",
          "description": "A measure of transaction risk, ranging from zero to 1000, with a higher value indicating a higher risk."
        }
      }
    },
    "RiskInsights": {
      "title": "RiskInsights",
      "type": "object",
      "description": "Contains reason code properties with additional info related to the risk recommendation.",
      "properties": {
        "category": {
          "type": "array",
          "description": "Reason codes related to the risk category.",
          "items": {
            "type": "integer"
          }
        },
        "phone_number": {
          "type": "object",
          "description": "Provides activity‑based and static reason codes related to the phone number linked to the email address.",
          "properties": {
            "activity": {
              "type": "array",
              "description": "Reason codes related to activity associated with the phone number linked to this email address.",
              "items": {
                "type": "integer"
              }
            },
            "static": {
              "type": "array",
              "description": "Reason codes related to static attributes of the phone number linked to this email address.",
              "items": {
                "type": "integer"
              }
            }
          }
        },
        "ip_address": {
          "type": "object",
          "description": "Contains activity‑based and static reason codes associated with the IP address linked to the email address.",
          "properties": {
            "activity": {
              "type": "array",
              "description": "Reason codes related to activity associated with the IP address linked to this email address.",
              "items": {
                "type": "integer"
              }
            },
            "static": {
              "type": "array",
              "description": "Reason codes related to static attributes of the IP address linked to this email address.",
              "items": {
                "type": "integer"
              }
            }
          }
        },
        "email_address": {
          "type": "object",
          "description": "Provides activity, static, and domain‑related reason codes associated directly with the email address itself.",
          "properties": {
            "activity": {
              "type": "array",
              "description": "Reason codes related to activity associated with the email address.",
              "items": {
                "type": "integer"
              }
            },
            "static": {
              "type": "array",
              "description": "Reason codes related to static attributes of the email address.",
              "items": {
                "type": "integer"
              }
            },
            "domain": {
              "type": "array",
              "description": "Reason codes related to domain based attributes of the email address.",
              "items": {
                "type": "integer"
              }
            }
          }
        }
      }
    }
  }
}