You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to access data from the EmailX API you must first authenticate/login. Once submitted, you will receive an authentication token. This token must be added to all subsequent API requests:
The report API query returns impression and click data for a specified date range. The two most import query inputs are the start and end parameters. When combined, these inputs will return data (inclusively) for the specified date range. Both the start and end date inputs need to be provided as UNIX timestamps with milliseconds (more on that below). Queries to this API must include an authorization header that provides the token you retrieved in Step 1.
When accessing this data programmatically, you’ll need to determine the best way to generate the start and end timestamps. For purposes of trying out the API using the playground, the best way to generate timestamps (with milliseconds) is to use an online tool such as https://www.epochconverter.com/
On Epoch Converter, select the date and time for your start and end dates - using your Local Time (not GMT). This will output the “Timestamp in milliseconds” that you can copy and paste into the GraphQL playground.
To generate a start date of April 1st, 2020 midnight (12:00 am):
To generate an end date of April 30th, 2020 11:59:59 PM:
Note: you can query any date range, but ranges longer than a month will be quite slow to generate. It’s recommended that you pick smaller ranges for efficiency purposes, perhaps for a single day (and run it each day) or for a single week (and run it each week).
The text was updated successfully, but these errors were encountered:
EmailX API
Note: GraphQL Playground is used for interactively accessing the EmailX GraphQL API. It can be downloaded and installed from https://www.electronjs.org/apps/graphql-playground
Ultimately you’ll need to access the API programmatically for retrieving the data and storing it for use in your application.
All EmailX API calls should be made using POST requests to:
https://acbm.email-x.io/graphql
Using GraphQL Playground
Once installed from https://www.electronjs.org/apps/graphql-playground open the application, select “URL Endpoint,” enter the ACBM GraphQL URL, and then click “Open.”
Step 1: Authenticate
In order to access data from the EmailX API you must first authenticate/login. Once submitted, you will receive an authentication token. This token must be added to all subsequent API requests:
Request:
Response:
Playground Example:
Step 2: Retrieve data via the “report” query
The
report
API query returns impression and click data for a specified date range. The two most import query inputs are thestart
andend
parameters. When combined, these inputs will return data (inclusively) for the specified date range. Both thestart
andend
date inputs need to be provided as UNIX timestamps with milliseconds (more on that below). Queries to this API must include an authorization header that provides the token you retrieved in Step 1.For example, to query data for all of April 2020
Request:
Request Headers:
Response (truncated for brevity):
Playground Example:
Generating dates
When accessing this data programmatically, you’ll need to determine the best way to generate the
start
andend
timestamps. For purposes of trying out the API using the playground, the best way to generate timestamps (with milliseconds) is to use an online tool such as https://www.epochconverter.com/On Epoch Converter, select the date and time for your start and end dates - using your Local Time (not GMT). This will output the “Timestamp in milliseconds” that you can copy and paste into the GraphQL playground.
To generate a start date of April 1st, 2020 midnight (12:00 am):
To generate an end date of April 30th, 2020 11:59:59 PM:
Note: you can query any date range, but ranges longer than a month will be quite slow to generate. It’s recommended that you pick smaller ranges for efficiency purposes, perhaps for a single day (and run it each day) or for a single week (and run it each week).
The text was updated successfully, but these errors were encountered: