Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
API description

Base URL

The base URL for the API is:

https://emailmovers-api.herokuapp.com/v1

Headers

Authentication (required)

The API uses token-based authentication to authenticate calls. You will need an access_token. You can get it after sign up on https://www.contactenhance.com. and go to Settings page.

Authorization: Token token={access_token}

Content-Type

Content-Type: application/json

Get an account details

The enpoint to get an account details

GET: /account/info

Response

{
  records_left: 123,
  renewal_date: 2015-12-31 01:00:00
}

Get a list of companies

The endpoint to get a list of companies

GET: /companies?query_parameters

Parameters

Below is a table summarizing the parameters that can be available in the API request

Parameter Required Description Values Default
where true Used to specify filters for reports {field}=={value} none
limit false Number of items to return positive integer all

Where filters

The general syntax for filters is:

where=field==value

For example:

where=domain==www.example.com

Summary of filters and allowable values

Field Filter Allowable Value
company company name
domain domain name - e.g. contactenhance.com
email email address
postcode British postcode format
telephone

Limit

The limit is the number of items to return. To return all items leave it empty.

Response

{
  fields: ['field1', 'field2'],
  item_count: 2,
  items: [
    {
      field1: 'value1',
      field2: 'value2'
    },
    {
      field1: 'value3',
      field2: 'value4'
    }
  ],
  total_count: 15
}

Get a history of requests

The endpoint to get a history of requests

GET: /requests?query_parameters

It works for requests made after 09.08.2016

Parameters

Below is a table summarizing the parameters that can be available in the API request

Parameter Required Description Values Default
from false Used to specify min. date requests was made yyyy-mm-dd 2016-08-09
to false Used to specify max. date requests was made yyyy-mm-dd today
limit false Number of items to return positive integer 100
page false Define offset positive integer 1
order false Define order of the requests. Ordered by date request was made asc, desc asc

Response

{
  fields: ['field1', 'field2'],
  item_count: 2,
  items: [
    {
      query: 'where=email==admin@example.com',
      ip_address: '123.45.67.89',
      sent_at: '2016-08-09T09:13:04.380Z',
      item_count: 1,
      items: [
        {
          field1: 'value1',
          field2: 'value2'
        }
      ]
    },
    // ...
  ],
  total_count: 15
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment