---
title: "Parse an email for contacts from the signatures or remove signatures from an email. Can handle parsing contacts from a reply chain. Can also indicate if this email is likely a spam (non-human) type contact."
method: POST
path: "/api/Email"
tags: ["Email"]
---

# Parse an email for contacts from the signatures or remove signatures from an email. Can handle parsing contacts from a reply chain. Can also indicate if this email is likely a spam (non-human) type contact.

`POST /api/Email`

## Request body

- EmailParsingAPIEmailInputModel — Input model for an email to parse content from.
  - `subject` string, nullable — 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` string, required — 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` string, nullable — 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` string, nullable — 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` string, nullable — 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` string, nullable — A Date string. For example: 2017-01-01T00:00:00 OR Mon, 28 May 2018 23:33:40 +0000 (UTC) If 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` EmailParsingAPIEmailRecipient[], nullable
    - `name` string, nullable — The displayname for the recipient. Should come from the email headers with each email address.
    - `emailAddress` string, nullable — Email address of the recipient
  - `cc` EmailParsingAPIEmailRecipient[], nullable
    - `name` string, nullable — The displayname for the recipient. Should come from the email headers with each email address.
    - `emailAddress` string, nullable — Email address of the recipient
  - `options` EmailParsingAPIOutputOptions
    - `outputCleanedEmailHtmlDepth` integer — Performance setting (default 1): Control to what depth the fields cleanedemailbody, emails.cleanedBodyHTML are generated with HTML. Generating these fields can be expensive so this is meant to help improve performance for some customers that don't need these fields. 0 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. The plain text versions will still be set. If you don't ever need the data in these fields then set to 0 to get a slightly faster average response.

## Response `200`

Returns JSON for the contact data.

- EmailParsingAPIModelsEmailFullAPIOutputModelLegacyCase — This exists in order to keep the legacy casing behavior working and get the Swagger documentation casing to be right.
  - `error` string, nullable
  - `isSpammyLookingEmailMessage` boolean — Does this message looks like it was likely some sort of automated email. For example, does it have an "unsubscribe" link in it?
  - `isSpammyLookingSender` boolean — Does the "From" email address look like it is a non-human type sender.
  - `isSpam` boolean — Are either IsSpammyLookingSender or IsSpammyLookingEmailMessage true.
  - `contacts` EmailParsingAPIModelsEmailContactModel[], nullable — All the contacts we found in the email and any data we found with them. Most of the time these will be from reply chains where we find a signature for someone deep in a reply chain.
    - `firstName` string, nullable
    - `lastName` string, nullable
    - `emailAddress` string, nullable — The email address for the contact.
    - `emailAddressDomain` string, nullable — The domain part of the email address for a contact.
    - `emailAddressDomainWithoutTLD` string, nullable — The email address domain without the TLD. Sometimes this is okay to use as the name of an organization or account in a CRM. If the emailAddress is "john@example.co.uk" then this will be "example". If the emailAddress is "john@mail.example.com" then this will be "mail.example".
    - `phoneNumber` string, nullable
    - `mobilePhone` string, nullable
    - `voipPhone` string, nullable — Any Voice over IP or Whatsapp type number is placed here.
    - `officePhone` string, nullable
    - `fax` string, nullable
    - `address` string, nullable
    - `addressParts` EmailParsingAPIModelsEmailAddressParts
      - `street` string, nullable — Best guess at the street part of the address
      - `city` string, nullable — Best guess at the city part of the address
      - `state` string, nullable — Best guess at the state/region part of the address
      - `postalCode` string, nullable — Best guess at the potal code part of the address.
      - `country` string, nullable — Best guess at the country part of the address.
    - `title` string, nullable
    - `twitterUrl` string, nullable
    - `twitterHandle` string, nullable
    - `linkedInUrl` string, nullable
    - `linkedInHandle` string, nullable
    - `companyName` string, nullable — Company name found in either the signature or looked up from a database of companies based on the domain name. Most of the time we get this from the signature.
    - `website` string, nullable — The website from the email signature's text. This does not include the URLs in the HTML links because those are often link tracked and so they don't point to the correct domain. The values in this field often formatted with captialization but there is no formatting guarantee. For example, you could get "https://www.example.com" or "Example.com" or "WWW.EXAMPLE.COM" are all possible.
    - `nameSource` string, nullable — How did SigParser determine the name for this contact? RootHeader - Came from the header of the email. This is as good as it gets generally. InlineHeader - From: John Smith (jsmith@example.com) Signature - We extracted it from the signature in the body of the email. This is a bit iffy. EmailAddressDerived - Only when the name was derived by splitting the email address from "john.smith@example.com" for example to get John Smith EmailAddress - The name is literally just the left section of the email address before the @ symbol.
    - `nameQuality` integer — A numeric representation of the NameSource property. The lower the value, the better the name in our opinion. If you're trying to build a contact database with SigParser's results, if in one email you get a name with a quality of 10 but then later you get a quality of 0, you should use that name. But if it was the opposite, you shouldn't overwrite a 0 quality name with a 10 quality name.
    - `isSpammy` boolean — Is the email address spammy looking like no-reply@example.com or info@example.com or orders@example.com
  - `from_LastName` string, nullable — Last name of the sender.
  - `from_FirstName` string, nullable — First name of the sender.
  - `from_Fax` string, nullable
  - `from_Phone` string, nullable
  - `from_Address` string, nullable — Whatever address SigParser found for the contact.
  - `from_AddressParts` EmailParsingAPIModelsEmailAddressParts
    - `street` string, nullable — Best guess at the street part of the address
    - `city` string, nullable — Best guess at the city part of the address
    - `state` string, nullable — Best guess at the state/region part of the address
    - `postalCode` string, nullable — Best guess at the potal code part of the address.
    - `country` string, nullable — Best guess at the country part of the address.
  - `from_Title` string, nullable
  - `from_MobilePhone` string, nullable
  - `from_OfficePhone` string, nullable
  - `from_LinkedInUrl` string, nullable
  - `from_TwitterUrl` string, nullable
  - `from_TwitterHandle` string, nullable
  - `from_EmailAddress` string, nullable
  - `from_EmailAddressDomain` string, nullable — The domain part of the email address. For example, for the email address "john@example.com" then this would be set to "example.com".
  - `from_EmailAddressDomainWithoutTLD` string, nullable — The email address domain without the TLD. Sometimes this is okay to use as the name of an organization or account in a CRM. If the emailAddress is "john@example.co.uk" then this will be "example". If the emailAddress is "john@mail.example.com" then this will be "mail.example".
  - `from_LinkedInHandle` string, nullable
  - `from_CompanyName` string, nullable — Company name found in either the signature or looked up from a database of companies based on the domain name. Most of the time we get this from the signature.
  - `from_Website` string, nullable — The website from the email signature's text. This does not include the URLs in the HTML links because those are often link tracked and so they don't point to the correct domain. The values in this field often formatted with captialization but there is no formatting guarantee. For example, you could get "https://www.example.com" or "Example.com" or "WWW.EXAMPLE.COM" are all possible.
  - `emails` EmailParsingAPIModelsEmailSubEmail[], nullable
    - `from_EmailAddress` string, nullable — Email address of the sender of this email section.
    - `from_Name` string, nullable — Name of the sender.
    - `textBody` string, nullable — The email lines of this email without headers. Will always be populated. If the original email was HTML then this will have that HTML converted to plain text.
    - `htmlLines` string[], nullable — The lines of the email as HTML. You won't find all the HTML of the email here but just the HTML for the line. This helps find images and text. If you want our best approximation of the orignal email HTML, use the htmlBody field.
    - `date` string, date-time, nullable — The first email's date is whatever was passed into the API. All the other emails are parsed from the email headers but aren't always parsed correctly due to the many variations in formatting clients use.
    - `didParseCorrectly` boolean — Does SigParser think this email was parsed correctly? Sometimes the email headers get messed up and so if SigParser detects something weird with what it found this will be set to false.
    - `to` EmailParsingAPIModelsEmailRecipient[], nullable
      - `name` string, nullable — Display name of the person. If not on the root email, then this was parsed from the inline email headers.
      - `emailAddress` string, nullable — Email address of the person. If not on the root email, then this was parsed from the inline email headers.
    - `cc` EmailParsingAPIModelsEmailRecipient[], nullable
      - `name` string, nullable — Display name of the person. If not on the root email, then this was parsed from the inline email headers.
      - `emailAddress` string, nullable — Email address of the person. If not on the root email, then this was parsed from the inline email headers.
    - `htmlBody` string, nullable — SigParser's attempt at producing an HTML email body for just this email or reply chain email. Only produced if the original email was HTML. Will not include the reply headers like "From" and "To" or "Email sent from...". Email signature is not stripped out. Cannot handle emails with namespaces in the HTML which is rare but can happen. In cases where the email can't be parsed, the original full HTML will be included in the first section.
    - `spammyLookingEmail` boolean
    - `subject` string, nullable — The subject of the email or nested email. This isn't always available for every nested email. For example, Gmail will format replies like "On 1/1/2019 John Smith wrote:" so there isn't a subject. But when Gmail forwards an email or Outlook replies it will have a Subject injected so you can see at each level of the reply chain what it was. Will be null if no subject is available.
    - `cleanedBodyHtml` string, nullable — HTML section of the email with the signature lines removed. The Head tag may still be present so you can format the email properly.
    - `cleanedBodyPlain` string, nullable — Plain text section of the email with the signature lines removed. Links are removed. If you need links, you should convert the HTML version to text and figure out how to preserve the links or HTML as needed.
    - `emailTypes` string[], nullable — We can add new types of emails at any time. So be prepared to handle that. NormalEmail - A normal email. MeetingNotification - A meeting invite type email. Generally auto generatee by Google. We don't parse these. BouncedNotification - Response from an email server indicating the email was bounced. ZenDeskSupportChain - Discovered a ZenDesk support email chain. SigParser can't parse these because their headers aren't well formed.
  - `duration` number, double — Duration of email processing in milliseconds.
  - `cleanedemailbody` string, nullable — The body text of the root email without the email signature or any of the email chains that might have been in the original email body. Useful for cleaning up an email for display in application UIs.
  - `cleanedemailbody_ishtml` boolean — Is the cleanedemailbody HTML or Text only.
  - `cleanedemailbody_plain` string, nullable — The email body as plain text. Will always be populated. If the original HTML was email then this is that email converted to plain text with all HTML removed.
  - `emailTypes` string[], nullable — We can add new types of emails at any time. So be prepared to handle that. NormalEmail - A normal email. MeetingNotification - A meeting invite type email. Generally auto generatee by Google. We don't parse these. BouncedNotification - Response from an email server indicating the email was bounced. ZenDeskSupportChain - Discovered a ZenDesk support email chain. SigParser can't parse these because their headers aren't well formed.

## Other responses

- `403` — Some sort of API key error.
- `500` — There was an error while processing this email. Most likely you didn't provide a value we needed. This isn't an API Key error.

---

[API](https://skmtc.dev/sigparser/apis/sigparser-stateless-email-parsing-apis.md) · [All operations](https://skmtc.dev/sigparser/apis/sigparser-stateless-email-parsing-apis/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/sigparser/sigparser-stateless-email-parsing-apis/revisions/a41b40faffd5/schema)
