SigParser for Developers

Great Docs

We provide a detailed Swagger documentation page. You can see exactly what you need to call and the structure of the response.

Easy APIs

Simple POST a JSON payload of your email to https://api.sigparser.com/Email/

Secure

Our parse email API is secure. It uses HTTPS and doesn't store any of the email contents. It processes the request and returns the results.

Call us Or We Call You

You have two options for integration, either call our API or let us call your API via Webhooks.

Email Parsing API (Call us)

In this scenario you need to write some code to connect to your email system, loop over the emails and then invoke our Email Parsing API for each email. Below you find some code for how to call our API and for C# we have a pretty detailed example of how to do that. But this can be pretty challenging but is good if you are doing research.

Priced by the API call volume. See our API pricing page here.

Webhooks (Call you)

SigParser can POST each new parsed email to a URL you define which is a pattern called Webhooks. After you make a SigParser account, under Data Sources add a Webhook connection. You can set the URL where we’ll POST the parsed email or contact updates.

The Parsed Email Data Structure

Our API returns lots of data about the email and the contacts contained within it. For example, getting the details of the sender is easy but you can also get the contents of each email embedded in a reply chain.

{
  "error": "string",
  "contacts": [
    {
      "firstName": "string",
      "lastName": "string",
      "emailAddress": "string",
      "phoneNumber": "string",
      "mobilePhone": "string",
      "officePhone": "string",
      "fax": "string",
      "address": "string",
      "title": "string",
      "twitterUrl": "string",
      "twitterHandle": "string",
      "linkedInUrl": "string",
      "linkedInHandle": "string"
    }
  ],
  "isSpammyLookingEmailMessage": true,
  "isSpammyLookingSender": true,
  "isSpam": true,
  "from_LastName": "string",
  "from_FirstName": "string",
  "from_Fax": "string",
  "from_Phone": "string",
  "from_Address": "string",
  "from_Title": "string",
  "from_MobilePhone": "string",
  "from_OfficePhone": "string",
  "from_LinkedInUrl": "string",
  "from_TwitterUrl": "string",
  "from_TwitterHandle": "string",
  "from_EmailAddress": "string",
  "emails": [
    {
      "from_EmailAddress": "string",
      "from_Name": "string",
      "textBody": "string",
      "htmlLines": [
        "string"
      ],
      "date": "2018-09-19T17:49:59.058Z",
      "didParseCorrectly": true,
      "to": [
        {
          "name": "string",
          "emailAddress": "string"
        }
      ],
      "cc": [
        {
          "name": "string",
          "emailAddress": "string"
        }
      ]
    }
  ],
  "from_LinkedInHandle": "string",
  "duration": 0
}

Programming Language Resources

We’ve tried to provide examples of how to parse emails with the most common languages of our users.

You’ll notice you only need to provide from_name, from_address which is the email address and plainbody although you should also provide htmlbody which will yield better parse results.

Curl

curl -k -i -H "Content-Type: application/json" -H "x-api-key: <ApiKey>" -X POST -d '{"from_address":"jsmith@example.com", "from_name":"John Smith","plainbody":"Here is the email body."}' 'https://api.sigparser.com/api/Email'

C# and .NET

Article: Use C# to parse Gmail emails with SigParser

nuget: SigParser

var client = new SigParser.Client(ApiKey);
            var result = client.Parse(new SigParser.EmailParseRequest
            {
                plainbody = @"
Hi John,

Lets get coffee tomorrow.

Thanks
Steve Johnson
888-333-3323 Mobile
San Diego, CA
",
                from_name = "Steve Johnson",
                from_address = "sjohnson@example.com"
            }).Result;

Python

import requests
import json

url = "https://api.sigparser.com/api/Email"

payload = json.dumps( {"from_address": "jsmith@example.com","from_name": "John Smith", "plainbody": "This is an email.", "htmlbody": null } )
headers = {
    'content-type': "application/json",
    'x-api-key': "212121212121212",
    'cache-control': "no-cache"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)

JavaScript

var request = require("request");

var options = { 
    method: 'POST',
    url: 'https://api.sigparser.com/api/Email',
    headers: 
    {   'cache-control': 'no-cache',
        'x-api-key': '232323232323',
        'content-type': 'application/json' },
    body: { from_address: 'jsmith@example.com', from_name: 'John Smith', plainbody: "This is the body of the email." },
    json: true 
};

request(options, function (error, response, body) {
    if (error) throw new Error(error);
    console.log(body);
});