The base URL for the API is:
https://emailmovers-api.herokuapp.com/v1
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: application/json
The enpoint to get an account details
GET: /account/info
{
records_left: 123,
renewal_date: 2015-12-31 01:00:00
}
The endpoint to get a list of companies
GET: /companies?query_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 |
The general syntax for filters is:
where=field==value
For example:
where=domain==www.example.com
Field Filter | Allowable Value |
---|---|
company | company name |
domain | domain name - e.g. contactenhance.com |
email address | |
postcode | British postcode format |
telephone |
The limit
is the number of items to return. To return all items leave it empty.
{
fields: ['field1', 'field2'],
item_count: 2,
items: [
{
field1: 'value1',
field2: 'value2'
},
{
field1: 'value3',
field2: 'value4'
}
],
total_count: 15
}
The endpoint to get a history of requests
GET: /requests?query_parameters
It works for requests made after 09.08.2016
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 |
{
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
}