{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sigparser-com/json-schema/sigparser-com-email-parsing-api-email-input-model-schema.json",
  "title": "EmailParsingAPI.EmailInputModel",
  "description": "Input model for an email to parse content from.",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/api_sigparser_com_openapi.json#/components/schemas/EmailParsingAPI.EmailInputModel",
  "required": [
    "from_address"
  ],
  "type": "object",
  "properties": {
    "subject": {
      "type": [
        "string",
        "null"
      ],
      "description": "Email subject. Not required but should be provided in order to have the \"subject\" field populated in the response for the \"emails\" collection."
    },
    "from_address": {
      "type": "string",
      "description": "The sender of the email. Required for us to match the contact data we find in the root email's signature with an email address."
    },
    "from_name": {
      "type": [
        "string",
        "null"
      ],
      "description": "The sender of the email. Important to provide as it helps to identify where the signature starts although sometimes we can find the signature without it."
    },
    "htmlbody": {
      "type": [
        "string",
        "null"
      ],
      "description": "Either provide this or the PlainBody or both. This will be used for the email content over the plain body as the HTML is how we can get LinkedIn URLs and Twitter URLs for example."
    },
    "plainbody": {
      "type": [
        "string",
        "null"
      ],
      "description": "If there isn't an HTML body we'll fallback to this value. If all you can provide is a text body then we can still find phone numbers, titles and addresses but features like LinkedIn URLs and Twitter URLs embedded in HTML won't be discoverable."
    },
    "date": {
      "type": [
        "string",
        "null"
      ],
      "description": "A Date string. For example: 2017-01-01T00:00:00 OR Mon, 28 May 2018 23:33:40 +0000 (UTC)\r\nIf either of the two above formats don't match what you're providing, we fallback to using the standard .NET parsing to parse this date so you can test that your date works with DotNetFiddle. https://dotnetfiddle.net/sJyTJW"
    },
    "to": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/EmailParsingAPI.EmailRecipient"
      }
    },
    "cc": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/EmailParsingAPI.EmailRecipient"
      }
    },
    "options": {
      "$ref": "#/$defs/EmailParsingAPI.OutputOptions"
    }
  },
  "additionalProperties": false,
  "$defs": {
    "EmailParsingAPI.EmailRecipient": {
      "type": "object",
      "properties": {
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The displayname for the recipient. Should come from the email headers with each email address."
        },
        "emailAddress": {
          "type": [
            "string",
            "null"
          ],
          "description": "Email address of the recipient"
        }
      },
      "additionalProperties": false
    },
    "EmailParsingAPI.OutputOptions": {
      "type": "object",
      "properties": {
        "outputCleanedEmailHtmlDepth": {
          "type": "integer",
          "description": "Performance setting (default 1): Control to what depth the fields cleanedemailbody, emails.cleanedBodyHTML are generated with HTML.\r\n            \r\nGenerating these fields can be expensive so this is meant to help improve performance for some customers that don't need these fields.\r\n            \r\n0 would mean no HTML output. 1 would mean only the root email gets a cleaned version. 2 means the root email and the next previous email in the chain.\r\n            \r\nThe plain text versions will still be set.\r\n            \r\nIf you don't ever need the data in these fields then set to 0 to get a slightly faster average response.",
          "format": "int32"
        }
      },
      "additionalProperties": false
    }
  }
}