Aimtell

Aimtell Developer Documentation

Welcome to the Aimtell developer hub. You'll find comprehensive guides and documentation to help you start working with Aimtell as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    
Suggest Edits

(API) Generic Functions

List of all javascript functions

 

_aimtellCheckPermissions()

Description: Checks visitor's push notification permissions
Params: N/A
Response: (str) - granted, default or denied

_aimtellSupportsPush()

Description: Checks to see if visitor's browser supports push notifications
Params: N/A
Response: (boolean)

_aimtellGetSubscriberID()

Description: Grabs the active visitor's subscriber id. If none exists, one is generated.
Params: N/A
Response: promise, (str) subscriber id

_aimtellGetSubscriberID().then(function(id) { console.log(id) })

_aimtellGetPushToken()

Description: Pulls the device push token from the current visitor. This is delivered as a javascript promise.
Params: N/A
Response: promise, (str) device token

_aimtellGetPushToken().then(function(token) { console.log(token) })

_aimtellTrackEvent(category, action, opt_label, opt_value)

Description: Tracks a custom event to current subscriber
Params:

  • category - required. category of event
  • action - required. action of event
  • opt_label - optional. custom label
  • opt_value - option. numeric value

Response: null (view logs in dashboard or network activity)

_aimtellTrackEvent("video", "watched", "how-to");
{
	"result": "success",
	"message": "Event has been recorded.",
	"eventId": 1090,
	"eventCategory": "video",
	"eventAction": "watched",
	"eventLabel": "how-to",
	"eventValue" : NULL
}

_aimtellTrackAttributes(attributes)

Description: Tracks custom attributes against a subscriber
Params:

  • attributes - required. object. can be any number of attributes.

Response: null (view logs in dashboard or network activity)

_aimtellTrackAttributes({"username":"djswan", "gender":"male"})
{
	"result": "success",
	"message": "Inserted 0 records."
}

_aimtellGetSubscriberIDFromToken(token)

Description: Grabs visitors subscriber id based on push token
Params:

  • token - required. browser push token

Response: promise, (obj) result, uid

_aimtellGetSubscriberIDFromToken(token).then(function(user){ console.log(user) })
{
     result: "success", 
     uid: "123sampleuid123"
}    

_aimtellGetSubscriberAttributes()

Grabs current website subscriber's attributes.
Note: As custom attributes may contain which an Aimtell website owner may not want easily viewable, this function by default is locked as a security measure. You must specifically request our team to unlock it for your account

_aimtellGetSubscriberAttributes().then(function(data){console.log(data)})

_aimtellPrompt()

Description: If custom push prompt exists, show it, else load native push prompt
Params: n/a
Response: null

_aimtellForcePrompt()

Description: Force shows the custom optin, even if previously denied.
Params: n/a
Response: null

Suggest Edits

(API) Callback Functions

List of callback functions

 

_aimtellReady()

Description: Called when aimtell script has finished loading.

_aimtellPermissionGranted()

Description: Called after website visitor has granted push notification permissions.

_aimtellPermissionDenied()

Description: Called after website visitor has granted denied notification permissions.

Suggest Edits

(API) Generic Functions (v2)

List of all javascript functions

 

The following functions are part of our API v2.0 roll out. Over time these functions will replace all old javascript functions.

Important: Please note that you will need to be on Aimtell Tracking Code Version 3.934 or higher in order to take advantage of these functions. You may find out your current version by logging into your dashboard and going to View Websites > Edit > Installation/Tracking.

_at.track("alias", {"user" : "name or id", "email" : "email" });

Description: Associates an alias against the push subscriber for simplified server-side tracking
You may pass the "user" field and/or the "email" field. All emails are automatically hashed.

Response: n/a

Suggest Edits

(API) Authenticating Calls

 

All REST API calls (except the login endpoint) must pass one of the following headers to authenticate the call.

Header
Description

X-Authorization

Generated by calling the Login Endpoint

X-Authorization-Api-Key

Generated within the Dashboard under Settings > API Key.

This is the recommended method

Whitelabel account owners will also need to pass an additional header to all calls. Again, this is only required if you signed up for a custom Whitelabel account (where you have your own branded dashboard and domain.)

Header
Description

Aimtell-Whitelabel-ID

Your custom Whitelabel ID. If you lost this or did not receive this upon registration, contact us.

Suggest Edits

(API) Login

API Login

 
posthttps://api.aimtell.com/prod/login
curl --request POST \
  --url https://api.aimtell.com/prod/login \
  --header 'x-authorization: AUTH_TOKEN'
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.aimtell.com/prod/login',
  headers: { 'x-authorization': 'AUTH_TOKEN' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.aimtell.com/prod/login")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-authorization"] = 'AUTH_TOKEN'

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.aimtell.com/prod/login");
xhr.setRequestHeader("x-authorization", "AUTH_TOKEN");

xhr.send(data);
import requests

url = "https://api.aimtell.com/prod/login"

headers = {'x-authorization': 'AUTH_TOKEN'}

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

print(response.text)
A binary file was returned

You couldn't be authenticated

{
 "result":"success",
 "auth_token":"DAGA123JDBHP0DdadaASdCFQSDQ=",
 "uid":"819d13098123"
}

Body Params

username
string
required

Username

password
string
required

Password

Headers

X-Authorization
string
required

API Authentication Token

 
Suggest Edits

(API) Get All Websites

Grabs all active websites for account.

 
gethttps://api.aimtell.com/prod/sites/
curl --request GET \
  --url https://api.aimtell.com/prod/sites/ \
  --header 'x-authorization: AUTH_TOKEN'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.aimtell.com/prod/sites/',
  headers: { 'x-authorization': 'AUTH_TOKEN' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.aimtell.com/prod/sites/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-authorization"] = 'AUTH_TOKEN'

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.aimtell.com/prod/sites/");
xhr.setRequestHeader("x-authorization", "AUTH_TOKEN");

xhr.send(data);
import requests

url = "https://api.aimtell.com/prod/sites/"

headers = {'x-authorization': 'AUTH_TOKEN'}

response = requests.request("GET", url, headers=headers)

print(response.text)
A binary file was returned

You couldn't be authenticated

[
  {
    "id": 179,
    "uid": "76cedd11b19e",
    "url": "https://demo.aimtell.com",
    "name": "Demo Website",
    "icon": "https://s3.amazonaws.com/siteicons.aimtell.com/icon_40_1443032714..jpg",
    "promptId": 0,
    "webPushID": null,
    "auto_prompt": 1,
    "createdAt": "2015-12-28 17:54:42",
    "active": 1
  },
  {
    "id": 999,
    "uid": "76cedd11b19e",
    "url": "https://example.aimtell.com",
    "name": "Example Aimtell ",
    "icon": "https://s3.amazonaws.com/siteicons.aimtell.com/icon_999_1485981616.png",
    "promptId": 200,
    "webPushID": "web.20.aimtell.com",
    "auto_prompt": 1,
    "createdAt": "2016-06-01 21:40:05",
    "active": 1
  },
  {
    "id": 2634,
    "uid": "76cedd11b19e",
    "url": "https://wordpress.aimtell.com",
    "name": "wordpress site",
    "icon": "https://s3.amazonaws.com/siteicons.aimtell.com/icon_2634_1487894753.png",
    "promptId": null,
    "webPushID": "web.16.aimtell.com",
    "auto_prompt": 1,
    "createdAt": "2017-02-24 00:07:25",
    "active": 1
  }
]
{
  "result": "error",
  "message": "Invalid token.",
  "error_code": 71831
}

Query Params

limit
string

Number of results

skip
string

Skip

Headers

X-Authorization
string
required

API Authentication Token

 
Suggest Edits

(API) Get Website Code

Returns Aimtell push & website tracking code.

 
gethttps://api.aimtell.com/prod/site/code/id
curl --request GET \
  --url https://api.aimtell.com/prod/site/code/id \
  --header 'x-authorization: AUTH_TOKEN'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.aimtell.com/prod/site/code/id',
  headers: { 'x-authorization': 'AUTH_TOKEN' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.aimtell.com/prod/site/code/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-authorization"] = 'AUTH_TOKEN'

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.aimtell.com/prod/site/code/id");
xhr.setRequestHeader("x-authorization", "AUTH_TOKEN");

xhr.send(data);
import requests

url = "https://api.aimtell.com/prod/site/code/id"

headers = {'x-authorization': 'AUTH_TOKEN'}

response = requests.request("GET", url, headers=headers)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "url": "demo.aimtell.com",
  "value": "<!-- start aimtell tracking code --> <script type='text/javascript'>var _at = {};_at.domain = 'demo.aimtell.com';_at.owner = '76cedd11b19e';_at.idSite = '179';_at.attributes = {};  (function() {var u='//api.aimtell.com/prod/';var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'trackpush.min.js'; s.parentNode.insertBefore(g,s);})();</script><!-- end aimtell tracking code -->",
  "idSite": 179,
  "uid": "76cedd11b19e"
}
{
  "result": "error",
  "message": "Invalid token.",
  "error_code": 71831
}

Path Params

id
string
required

Site ID

Headers

X-Authorization
string
required

API Authentication Token

 
Suggest Edits

(API) Add Website

Add a Website to Account

 
posthttps://api.aimtell.com/prod/sites/
curl --request POST \
  --url https://api.aimtell.com/prod/sites/ \
  --header 'x-authorization: AUTH_TOKEN'
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.aimtell.com/prod/sites/',
  headers: { 'x-authorization': 'AUTH_TOKEN' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.aimtell.com/prod/sites/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-authorization"] = 'AUTH_TOKEN'

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.aimtell.com/prod/sites/");
xhr.setRequestHeader("x-authorization", "AUTH_TOKEN");

xhr.send(data);
import requests

url = "https://api.aimtell.com/prod/sites/"

headers = {'x-authorization': 'AUTH_TOKEN'}

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

print(response.text)
A binary file was returned

You couldn't be authenticated

{
    "result": "success",
    "message": "Added website https://fake.aimtell.com succesfully.",
    "id": 79
}
{
  "result": "error",
  "message": "Invalid token.",
  "error_code": 71831
}
{
    "result": "error",
    "message": "Error #139."
}

Body Params

url
string
required

Website URL

name
string
required

Name of Website

Headers

X-Authorization
string
required

API Authentication Token

 
Suggest Edits

(API) Update Website Details

Update a Website's Name or Icon

 
puthttps://api.aimtell.com/prod/site/id
curl --request PUT \
  --url https://api.aimtell.com/prod/site/id \
  --header 'x-authorization: AUTH_TOKEN'
var request = require("request");

var options = { method: 'PUT',
  url: 'https://api.aimtell.com/prod/site/id',
  headers: { 'x-authorization': 'AUTH_TOKEN' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.aimtell.com/prod/site/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["x-authorization"] = 'AUTH_TOKEN'

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.aimtell.com/prod/site/id");
xhr.setRequestHeader("x-authorization", "AUTH_TOKEN");

xhr.send(data);
import requests

url = "https://api.aimtell.com/prod/site/id"

headers = {'x-authorization': 'AUTH_TOKEN'}

response = requests.request("PUT", url, headers=headers)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
    "result": "success",
    "message": "Updated website succesfully.",
    "id": "1"
}
{
    "result": "error",
    "message": "Please specify a valid auth_token."
}
{
    "result": "error",
    "message": "Error #136."
}

Path Params

id
string
required

Site ID

Body Params

name
string
required

Website Name

icon
string

URL of Website Icon

Headers

X-Authorization
string
required

API Authentication Token

 
Suggest Edits

(API) Update Website Push Package (Safari)

Updates the Safari push package.

 
posthttps://api.aimtell.com/prod/push/package/id
curl --request POST \
  --url https://api.aimtell.com/prod/push/package/id \
  --header 'x-authorization: AUTH_TOKEN'
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.aimtell.com/prod/push/package/id',
  headers: { 'x-authorization': 'AUTH_TOKEN' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.aimtell.com/prod/push/package/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-authorization"] = 'AUTH_TOKEN'

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.aimtell.com/prod/push/package/id");
xhr.setRequestHeader("x-authorization", "AUTH_TOKEN");

xhr.send(data);
import requests

url = "https://api.aimtell.com/prod/push/package/id"

headers = {'x-authorization': 'AUTH_TOKEN'}

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

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "result": "success"
}
{
  "result": "error",
  "message": "Invalid token.",
  "error_code": 71831
}
{
    "result": "error",
    "message": "Error #136."
}

Path Params

id
string
required

Site ID

Headers

X-Authorization
string
required

API Authentication Token

 
Suggest Edits

(API) Delete Website

Delete a specific Website.

 
deletehttps://api.aimtell.com/prod/site/id
curl --request DELETE \
  --url https://api.aimtell.com/prod/site/id \
  --header 'x-authorization: AUTH_TOKEN'
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.aimtell.com/prod/site/id',
  headers: { 'x-authorization': 'AUTH_TOKEN' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.aimtell.com/prod/site/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)
request["x-authorization"] = 'AUTH_TOKEN'

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://api.aimtell.com/prod/site/id");
xhr.setRequestHeader("x-authorization", "AUTH_TOKEN");

xhr.send(data);
import requests

url = "https://api.aimtell.com/prod/site/id"

headers = {'x-authorization': 'AUTH_TOKEN'}

response = requests.request("DELETE", url, headers=headers)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
    "result": "success",
    "message": "Successfully de-activated website.",
  	"id": "79
}
{
    "result": "error",
    "message": "Please specify a valid auth_token."
}

Path Params

id
string
required

Site ID

Headers

X-Authorization
string
required

API Authentication Token

 
Suggest Edits

(API) Get Subscribers

Fetches all Subscribers for account

 
gethttps://api.aimtell.com/prod/subscribers/id
curl --request GET \
  --url https://api.aimtell.com/prod/subscribers/id
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.aimtell.com/prod/subscribers/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.aimtell.com/prod/subscribers/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.aimtell.com/prod/subscribers/id");

xhr.send(data);
import requests

url = "https://api.aimtell.com/prod/subscribers/id"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "count": 2,
  "skip": 0,
  "limit": 25,
  "segmentId": null,
  "filter": null,
  "subscribers": [
    {
      "subscriber_uid": "c9603591-ffe0-ea08-8067-83420e5b4f5c",
      "subscriberId": "c9603591-ffe0-ea08-8067-82478e5b4f5c",
      "deviceType": "desktop",
      "browserName": "Chrome",
      "operatingSystemCode": "Mac OS X",
      "browserLang": "en-US",
      "region": "Virginia",
      "city": "Ashburn",
      "ip": "54.174.82.151",
      "country": "United States",
      "postal": "20149",
      "idSite": 4240,
      "createdAt": "2017-06-30 20:02:49"
    },
    {
      "subscriber_uid": "d3428c3f-b78b-5563-042c-e3d49d98fa22",
      "subscriberId": "d3428c3f-b26b-5563-042c-e3d49d98fa46",
      "deviceType": "desktop",
      "browserName": "Firefox",
      "operatingSystemCode": "Mac OS X",
      "browserLang": "en-US",
      "region": "Virginia",
      "city": "Ashburn",
      "ip": "54.174.82.151",
      "country": "United States",
      "postal": "20149",
      "idSite": 4240,
      "createdAt": "2017-08-15 21:43:35"
    }
  ]
}
{
  "result": "error",
  "message": "Invalid token.",
  "error_code": 71831
}

Path Params

id
int32
required

Site ID

Query Params

limit
string

Limit

skip
string

Skip

segmentId
int32

The ID of the segment you wish to filter by.

include
string

additional fields to include (i.e. attributes).

Headers

X-Authorization
string

API Authentication Token

 
Suggest Edits

(API) Get Subscriber

Fetches a specific Subscriber

 
gethttps://api.aimtell.com/prod/subscribers/idSite
curl --request GET \
  --url 'https://api.aimtell.com/prod/subscribers/idSite?subscriber_uid=subscriber_uid' \
  --header 'x-authorization: AUTH_TOKEN'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.aimtell.com/prod/subscribers/idSite',
  qs: { subscriber_uid: 'subscriber_uid' },
  headers: { 'x-authorization': 'AUTH_TOKEN' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.aimtell.com/prod/subscribers/idSite?subscriber_uid=subscriber_uid")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-authorization"] = 'AUTH_TOKEN'

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.aimtell.com/prod/subscribers/idSite?subscriber_uid=subscriber_uid");
xhr.setRequestHeader("x-authorization", "AUTH_TOKEN");

xhr.send(data);
import requests

url = "https://api.aimtell.com/prod/subscribers/idSite"

querystring = {"subscriber_uid":"subscriber_uid"}

headers = {'x-authorization': 'AUTH_TOKEN'}

response = requests.request("GET", url, headers=headers, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "idSite": "300",
  "subscriberId": "00388872-cd0b-4243-0333-642526c72f0f",
  "browserLang": "ar",
  "browserName": "Chrome",
  "operatingSystemCode": "Windows",
  "deviceType": "mobile",
  "ip": "77.75.88.125",
  "region": "Beyrouth",
  "city": "Beirut",
  "country": "Lebanon",
  "custom_attributes": []
}
{
  "result": "error",
  "message": "Invalid token.",
  "error_code": 71831
}

Path Params

idSite
int32
required

Website ID

Query Params

subscriber_uid
string
required

Headers

X-Authorization
string
required

API Authentication Token

 
Suggest Edits

(API) Track Subscriber Attribute

Track Subscriber Attribute

 
posthttps://api.aimtell.com/prod/subscriber/
curl -XPOST -H 'X-Authorization: AUTH_TOKEN' -H "Content-type: application/json" -d '{
    "idSite": "1",
    "subscriber_uid": "5059b0a2-747d-0f74-73c4-24c8442de237",
    "attributes": {
        "first_name" : "jeff",
        "gender" : "male"
    }
}' 'https://api.aimtell.com/prod/subscriber/'
curl -XPOST -H 'X-Authorization: AUTH_TOKEN' -H "Content-type: application/json" -d '{
    "idSite": "1",
    "user": "jeffdunham12",
    "attributes": {
        "first_name" : "jeff",
        "gender" : "male"
    }
}' 'https://api.aimtell.com/prod/subscriber/'
curl -XPOST -H 'X-Authorization: AUTH_TOKEN' -H "Content-type: application/json" -d '{
    "idSite": "1",
    "email": "jeff@dunham.com",
    "attributes": {
        "first_name" : "jeff",
        "gender" : "male"
    }
}' 'https://api.aimtell.com/prod/subscriber/'
A binary file was returned

You couldn't be authenticated

{
  "result":"success"
}
{
    "result": "error",
    "message": "Please specify a valid auth_token."
}
{
    "result": "error",
    "message": "Error #136."
}

Body Params

idSite
string
required

Website ID

subscriber_uid
string

Aimtell Subscriber ID

user
string

Subscriber "User" Alias

email
string

Subscriber "Email" Alias

attributes
array of strings

Headers

X-Authorization
string
required

API Authentication Token

 

When tracking attributes against a subscriber you must pass one of the following parameters in the body of your call:

  • user (a user alias that has been tracked by the javascript alias function)
  • email (an email alias that has been tracked by the javascript alias function)
  • subscriber_uid (Aimtell's internal subscriber id for the subscriber)
Suggest Edits

(API) Track Subscriber Event

Fetches Subscriber Event.

 
posthttps://api.aimtell.com/prod/subscriber/
curl -XPOST -H 'X-Authorization: AUTH_TOKEN' -H "Content-type: application/json" -d '{
    "idSite": "1",
    "subscriber_uid": "5059b0a2-747d-0f74-73c4-24c8442de237",
    "event": {
        "category" : "video",
        "action" : "watched"
     }
}' 'https://api.aimtell.com/prod/subscriber/'
curl -XPOST -H 'X-Authorization: AUTH_TOKEN' -H "Content-type: application/json" -d '{
    "idSite": "1",
    "user": "jeffdunham12",
    "event": {
        "category" : "video",
        "action" : "watched"
    }
}' 'https://api.aimtell.com/prod/subscriber/'
curl -XPOST -H 'X-Authorization: AUTH_TOKEN' -H "Content-type: application/json" -d '{
    "idSite": "1",
    "email": "jeff@dunham.com",
    "event": {
        "category" : "video",
        "action" : "watched"
    }
}' 'https://api.aimtell.com/prod/subscriber/'
A binary file was returned

You couldn't be authenticated

{
  "result":"success"
}
{
    "result": "error",
    "message": "Please specify a valid auth_token."
}
{
    "result": "error",
    "message": "Error #136."
}

Body Params

idSite
string
required

Website ID

subscriber_uid
string

Aimtell Subscriber ID

user
string

Subscriber "User" Alias

email
string

Subscriber "Email" Alias

event
array of strings

Headers

X-Authorization
string
required

API Authentication Token

 

When tracking events against a subscriber you must pass one of the following parameters in the body of your call:

  • user (a user alias that has been tracked by the javascript alias function)
  • email (an email alias that has been tracked by the javascript alias function)
  • subscriber_uid (Aimtell's internal subscriber id for the subscriber)
Suggest Edits

(API) Opt-Out Subscriber

Opt-Out Subscriber

 
posthttps://api.aimtell.com/prod/subscriber/
curl --request POST \
  --url https://api.aimtell.com/prod/subscriber/ \
  --header 'x-authorization: AUTH_TOKEN' \
  --data '{"idSite":"4240","subscriber_uid":"5059b0a2-747d-0f74-73c4-24c8442de237"}'
curl --request POST \
  --url https://api.aimtell.com/prod/subscriber/ \
  --header 'x-authorization: cGFvbG9AYWltdGVsbC5jb206YWExNGY5MzNkYzcyNTU1NjkwZTI2NDYwODZhNmIyNTE=' \
  --data '{"idSite":"4240","subscriber_uid":"","optout":"true","user":"jeffdunham12"}'
curl --request POST \
  --url https://api.aimtell.com/prod/subscriber/ \
  --header 'x-authorization: cGFvbG9AYWltdGVsbC5jb206YWExNGY5MzNkYzcyNTU1NjkwZTI2NDYwODZhNmIyNTE=' \
  --data '{"idSite":"4240","subscriber_uid":"","optout":"true","user":"","email":"jeff12@dunham.com"}'
A binary file was returned

You couldn't be authenticated

{
  "result":"success"
}
{
    "result": "error",
    "message": "Please specify a valid auth_token."
}
{
    "result": "error",
    "message": "Error #136."
}

Body Params

idSite
string
required

Website ID

subscriber_uid
string

Aimtell Subscriber ID

user
string

Subscriber "User" Alias

email
string

Subscriber "Email" Alias

optout
boolean

Headers

X-Authorization
string
required

API Authentication Token

 

You must pass one of the following parameters in the body of your call:

  • user (a user alias that has been tracked by the javascript alias function)
  • email (an email alias that has been tracked by the javascript alias function)
  • subscriber_uid (Aimtell's internal subscriber id for the subscriber)

Please note that subscribers who have been opt'd out are subject to automatic deletion per your Data Retention Settings for your site (as seen in the dashboard under Websites > Edit > Misc. Settings)

Suggest Edits

(API) Get All Segments

Fetches all Segments for account

 
gethttps://api.aimtell.com/prod/segments/idSite
curl --request GET \
  --url https://api.aimtell.com/prod/segments/idSite \
  --header 'x-authorization: AUTH_TOKEN'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.aimtell.com/prod/segments/idSite',
  headers: { 'x-authorization': 'AUTH_TOKEN' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.aimtell.com/prod/segments/idSite")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-authorization"] = 'AUTH_TOKEN'

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.aimtell.com/prod/segments/idSite");
xhr.setRequestHeader("x-authorization", "AUTH_TOKEN");

xhr.send(data);
import requests

url = "https://api.aimtell.com/prod/segments/idSite"

headers = {'x-authorization': 'AUTH_TOKEN'}

response = requests.request("GET", url, headers=headers)

print(response.text)
A binary file was returned

You couldn't be authenticated

[
  {
    "idsegment": 245,
    "owner": "76cedd11b19e",
    "name": "Sample Segment #1 - Lives In California",
    "definition": "region==California",
    "idSite": 179,
    "createdAt": "2015-12-28 17:54:42",
    "updatedAt": "2015-12-28 17:54:42",
    "deleted": 0
  },
  {
    "idsegment": 246,
    "owner": "76cedd11b19e",
    "name": "Sample Segment #2 - Viewed Tutorial Video",
    "definition": "eventCategory==video,eventAction==tutorial",
    "idSite": 179,
    "createdAt": "2015-12-28 17:54:42",
    "updatedAt": "2015-12-28 17:54:42",
    "deleted": 0
  },
  {
    "idsegment": 5909,
    "owner": "76cedd11b19e",
    "name": "Campaign for people who click certain links",
    "definition": "pageUrl==https://josephmurphybrasil.com/",
    "idSite": 179,
    "createdAt": "2017-01-02 18:50:54",
    "updatedAt": "2017-01-02 18:52:39",
    "deleted": 0
  }
]
{
  "result": "error",
  "message": "Invalid token.",
  "error_code": 71831
}

Path Params

idSite
string
required

Site ID

Headers

X-Authorization
string
required

API Authentication Token

 
Suggest Edits

(API) Get Segment

Fetches a specific Segment

 
gethttps://api.aimtell.com/prod/segment/id
curl --request GET \
  --url https://api.aimtell.com/prod/segment/id \
  --header 'x-authorization: AUTH_TOKEN'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.aimtell.com/prod/segment/id',
  headers: { 'x-authorization': 'AUTH_TOKEN' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.aimtell.com/prod/segment/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-authorization"] = 'AUTH_TOKEN'

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.aimtell.com/prod/segment/id");
xhr.setRequestHeader("x-authorization", "AUTH_TOKEN");

xhr.send(data);
import requests

url = "https://api.aimtell.com/prod/segment/id"

headers = {'x-authorization': 'AUTH_TOKEN'}

response = requests.request("GET", url, headers=headers)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "idsegment": 245,
  "owner": "76cedd11b19e",
  "name": "Sample Segment #1 - Lives In California",
  "definition": "region==California",
  "idSite": 179,
  "createdAt": "2015-12-28 17:54:42",
  "updatedAt": "2015-12-28 17:54:42",
  "deleted": 0
}
{
  "result": "error",
  "message": "Invalid token.",
  "error_code": 71831
}

Path Params

id
string
required

Segment ID

Headers

X-Authorization
string
required

API Authentication Token

 
Suggest Edits

(API) Create Segment

Create a NEW Segment

 
posthttps://api.aimtell.com/prod/segments/
curl --request POST \
  --url https://api.aimtell.com/prod/segments/ \
  --header 'x-authorization: AUTH_TOKEN'
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.aimtell.com/prod/segments/',
  headers: { 'x-authorization': 'AUTH_TOKEN' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.aimtell.com/prod/segments/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-authorization"] = 'AUTH_TOKEN'

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.aimtell.com/prod/segments/");
xhr.setRequestHeader("x-authorization", "AUTH_TOKEN");

xhr.send(data);
import requests

url = "https://api.aimtell.com/prod/segments/"

headers = {'x-authorization': 'AUTH_TOKEN'}

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

print(response.text)
A binary file was returned

You couldn't be authenticated

{
	"result":"success",
  "message":"Successfully created",
  "id":88
}
{
    "result": "error",
    "message": "Error #139."
}

Body Params

idSite
string
required

Site ID

name
string

Name of Segment

definition
string

Definition

Headers

X-Authorization
string
required

API Authentication Token

 
Suggest Edits

(API) Update Segment

Update a Specific Segment

 
puthttps://api.aimtell.com/prod/segment/id
curl --request PUT \
  --url https://api.aimtell.com/prod/segment/id \
  --header 'x-authorization: AUTH_TOKEN'
var request = require("request");

var options = { method: 'PUT',
  url: 'https://api.aimtell.com/prod/segment/id',
  headers: { 'x-authorization': 'AUTH_TOKEN' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.aimtell.com/prod/segment/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["x-authorization"] = 'AUTH_TOKEN'

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.aimtell.com/prod/segment/id");
xhr.setRequestHeader("x-authorization", "AUTH_TOKEN");

xhr.send(data);
import requests

url = "https://api.aimtell.com/prod/segment/id"

headers = {'x-authorization': 'AUTH_TOKEN'}

response = requests.request("PUT", url, headers=headers)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
    "result": "success",
    "idSegment": "24",
    "message": "Successfully updated segment"
}
{
    "result": "error",
    "message": "Please specify a valid auth_token."
}
{
    "result": "error",
    "message": "Error #136."
}

Path Params

id
string
required

Segment ID

Body Params

name
string

Name of Segment

definition
string

Definition

Headers

X-Authorization
string
required

API Authentication Token

 
Suggest Edits

(API) Delete Segment

Delete a specific Segment

 
deletehttps://api.aimtell.com/prod/segment/id
curl --request DELETE \
  --url https://api.aimtell.com/prod/segment/id \
  --header 'x-authorization: AUTH_TOKEN'
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.aimtell.com/prod/segment/id',
  headers: { 'x-authorization': 'AUTH_TOKEN' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.aimtell.com/prod/segment/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)
request["x-authorization"] = 'AUTH_TOKEN'

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://api.aimtell.com/prod/segment/id");
xhr.setRequestHeader("x-authorization", "AUTH_TOKEN");

xhr.send(data);
import requests

url = "https://api.aimtell.com/prod/segment/id"

headers = {'x-authorization': 'AUTH_TOKEN'}

response = requests.request("DELETE", url, headers=headers)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
    "result": "success",
    "idSegment": "5",
    "message": "Successfully removed segment"
}
{
    "result": "error",
    "message": "Please specify a valid auth_token."
}

Path Params

id
string
required

Segment ID

Headers

X-Authorization
string
required

API Authentication Token

 
Suggest Edits

(API) Get All Manual Campaigns

Enables you to fetch all MANUAL campaigns

 
gethttps://api.aimtell.com/prod/campaigns/id
curl --request GET \
  --url https://api.aimtell.com/prod/campaigns/id \
  --header 'x-authorization: AUTH_TOKEN'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.aimtell.com/prod/campaigns/id',
  headers: { 'x-authorization': 'AUTH_TOKEN' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.aimtell.com/prod/campaigns/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-authorization"] = 'AUTH_TOKEN'

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.aimtell.com/prod/campaigns/id");
xhr.setRequestHeader("x-authorization", "AUTH_TOKEN");

xhr.send(data);
import requests

url = "https://api.aimtell.com/prod/campaigns/id"

headers = {'x-authorization': 'AUTH_TOKEN'}

response = requests.request("GET", url, headers=headers)

print(response.text)
A binary file was returned

You couldn't be authenticated

[
  {
    "name": "Sample",
    "title": "",
    "body": "",
    "link": "",
    "id": 4381,
    "updatedAt": "2016-10-31 12:57",
    "sent_date": null,
    "schedule_date": null,
    "status": 1,
    "customIcon": null,
    "sentcount": null,
    "clickcount": null,
    "conversions": null,
    "bounced": null,
    "updatedAt_tz": "PDT",
    "draft": true,
    "campaign_results": {
      "sent": 0,
      "delivered": 0,
      "bounced": 0,
      "clicked": 0,
      "conversions": 0
    }
  },
  {
    "name": "Sample Conversion Campaign",
    "title": "",
    "body": "",
    "link": "",
    "id": 4906,
    "updatedAt": "2016-11-15 16:05",
    "sent_date": null,
    "schedule_date": null,
    "status": 1,
    "customIcon": null,
    "sentcount": null,
    "clickcount": null,
    "conversions": null,
    "bounced": null,
    "updatedAt_tz": "PST",
    "draft": true,
    "campaign_results": {
      "sent": 0,
      "delivered": 0,
      "bounced": 0,
      "clicked": 0,
      "conversions": 0
    }
  },
  {
    "name": "Sample Campaign # 3",
    "title": "",
    "body": "",
    "link": "",
    "id": 6604,
    "updatedAt": "2016-12-19 14:36",
    "sent_date": null,
    "schedule_date": null,
    "status": 1,
    "customIcon": null,
    "sentcount": null,
    "clickcount": null,
    "conversions": null,
    "bounced": null,
    "updatedAt_tz": "PST",
    "draft": true,
    "campaign_results": {
      "sent": 0,
      "delivered": 0,
      "bounced": 0,
      "clicked": 0,
      "conversions": 0
    }
  }
]
{
  "result": "error",
  "message": "Invalid token.",
  "error_code": 71831
}

Path Params

id
string
required

Site ID

Query Params

limit
string

Number of results

skip
string

Skip

Headers

X-Authorization
string
required

API Authentication Token

 

Additional resources:
Campaign status breakdown: https://documentation.aimtell.com/v1.0/docs/campaign-status

Suggest Edits

(API) Get Manual Campaign

Fetches a specific MANUAL Campaign

 
gethttps://api.aimtell.com/prod/campaign/id
curl --request GET \
  --url https://api.aimtell.com/prod/campaign/id \
  --header 'x-authorization: AUTH_TOKEN'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.aimtell.com/prod/campaign/id',
  headers: { 'x-authorization': 'AUTH_TOKEN' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.aimtell.com/prod/campaign/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-authorization"] = 'AUTH_TOKEN'

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.aimtell.com/prod/campaign/id");
xhr.setRequestHeader("x-authorization", "AUTH_TOKEN");

xhr.send(data);
import requests

url = "https://api.aimtell.com/prod/campaign/id"

headers = {'x-authorization': 'AUTH_TOKEN'}

response = requests.request("GET", url, headers=headers)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": 259,
  "uid": "76cedd11b19e",
  "idSite": 179,
  "name": "Sample Campaign #1",
  "title": "Welcome to Aimtell!",
  "body": "Got questions? Check out our knowledge base.",
  "link": "https://kb.aimtell.com",
  "customIcon": null,
  "segments": "245",
  "conversion_trigger": null,
  "sent_date": null,
  "createdAt": "2015-12-28 17:54:42",
  "updatedAt": "2015-12-28 17:54:42",
  "automation": null,
  "status": 4,
  "schedule_pretty_time": "06:55 AM",
  "schedule_pretty_date": "12/28/2015",
  "campaign_results": {
    "sent": 27,
    "delivered": 27,
    "bounced": 0,
    "clicked": 2,
    "conversions": 0
  }
}
{
  "result": "error",
  "message": "Invalid token.",
  "error_code": 71831
}

Path Params

id
string
required

Campaign ID

Query Params

load
string

Load Additional Information (i.e. Segments)

Headers

X-Authorization
string
required

API Authentication Token

 

Additional resources:
Campaign status breakdown: https://documentation.aimtell.com/v1.0/docs/campaign-status

Suggest Edits

(API) Get Manual Campaign Clicks

Enables you to fetch all clicks from a MANUAL campaign, broken down on a subscriber level.

 
gethttps://api.aimtell.com/prod/campaign/id/clicks
curl --request GET \
  --url https://api.aimtell.com/prod/campaign/id/clicks \
  --header 'x-authorization: AUTH_TOKEN'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.aimtell.com/prod/campaign/id/clicks',
  headers: { 'x-authorization': 'AUTH_TOKEN' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.aimtell.com/prod/campaign/id/clicks")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-authorization"] = 'AUTH_TOKEN'

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.aimtell.com/prod/campaign/id/clicks");
xhr.setRequestHeader("x-authorization", "AUTH_TOKEN");

xhr.send(data);
import requests

url = "https://api.aimtell.com/prod/campaign/id/clicks"

headers = {'x-authorization': 'AUTH_TOKEN'}

response = requests.request("GET", url, headers=headers)

print(response.text)
A binary file was returned

You couldn't be authenticated

[{
	"subscriber_uid": "63779e18-6c2c-4dd0-da76-ace61926fc53",
	"created_at": "2017-02-16 18:13:54"
}, {
	"subscriber_uid": "514870c5-665e-effb-34d9-b8bbd9dd3467",
	"created_at": "2017-02-16 13:11:21"
}, {
	"subscriber_uid": "59bc3f07-915c-e1c3-8a81-6ad82ad783a0",
	"created_at": "2017-02-15 21:01:58"
}, {
	"subscriber_uid": "da554ad4-1f77-dde0-b598-d0a386883ab4",
	"created_at": "2017-02-14 23:33:16"
}, {
	"subscriber_uid": "958645fc-9e85-b3a8-2a15-35d278417be8",
	"created_at": "2017-02-14 22:12:21"
}]
{
  "result": "error",
  "message": "Invalid token.",
  "error_code": 71831
}

Path Params

id
string
required

Campaign ID

Headers

X-Authorization
string
required

API Authentication Token

 
Suggest Edits

(API) Get Manual Campaign Results (By Day)

Fetches Manual Campaign Results (by Day)

 
gethttps://api.aimtell.com/prod/campaign/id/results
curl --request GET \
  --url 'https://api.aimtell.com/prod/campaign/id/results?startDate=01%2F01%2F2000&endDate=01%2F15%2F2000'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.aimtell.com/prod/campaign/id/results',
  qs: 
   { startDate: '01/01/2000',
     endDate: '01/15/2000' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.aimtell.com/prod/campaign/id/results?startDate=01%2F01%2F2000&endDate=01%2F15%2F2000")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.aimtell.com/prod/campaign/id/results?startDate=01%2F01%2F2000&endDate=01%2F15%2F2000");

xhr.send(data);
import requests

url = "https://api.aimtell.com/prod/campaign/id/results"

querystring = {"startDate":"01/01/2000","endDate":"01/15/2000"}

response = requests.request("GET", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
	"sent": {
		"03\/05\/2017": 9,
		"03\/06\/2017": 8,
		"03\/07\/2017": 3,
		"03\/08\/2017": 4,
		"03\/09\/2017": 10
	},
	"delivered": {
		"03\/05\/2017": 9,
		"03\/06\/2017": 8,
		"03\/07\/2017": 3,
		"03\/08\/2017": 4,
		"03\/09\/2017": 10
	},
	"bounced": {
		"03\/05\/2017": 0,
		"03\/06\/2017": 0,
		"03\/07\/2017": 0,
		"03\/08\/2017": 0,
		"03\/09\/2017": 0
	},
	"clicked": {
		"03\/05\/2017": 6,
		"03\/06\/2017": 8,
		"03\/07\/2017": 2,
		"03\/08\/2017": 4,
		"03\/09\/2017": 5
	},
	"conversions": {
		"03\/05\/2017": 2,
		"03\/06\/2017": 8,
		"03\/07\/2017": 2,
		"03\/08\/2017": 3,
		"03\/09\/2017": 5
	}
}
{
  "result": "error",
  "message": "Invalid token.",
  "error_code": 71831
}

Path Params

id
string
required

Campaign ID

Query Params

startDate
string
required

Date

endDate
string
required

Date

Headers

X-Authorization
string

API Authentication Token

 
Suggest Edits

(API) Create Campaign

Create a Campaign

 
posthttps://api.aimtell.com/prod/campaigns/
curl --request POST \
  --url https://api.aimtell.com/prod/campaigns/ \
  --header 'x-authorization: AUTH_TOKEN'
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.aimtell.com/prod/campaigns/',
  headers: { 'x-authorization': 'AUTH_TOKEN' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.aimtell.com/prod/campaigns/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-authorization"] = 'AUTH_TOKEN'

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.aimtell.com/prod/campaigns/");
xhr.setRequestHeader("x-authorization", "AUTH_TOKEN");

xhr.send(data);
import requests

url = "https://api.aimtell.com/prod/campaigns/"

headers = {'x-authorization': 'AUTH_TOKEN'}

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

print(response.text)
A binary file was returned

You couldn't be authenticated

{
    "result": "success",
    "campaignId": 72129
}
{
    "result": "error",
    "message": "Error #139."
}

Body Params

name
string
required

Campaign Name

idSite
string
required

Site ID

title
string

Name of Segment

body
string

Definition

link
string

Link

schedule_date
date

Date (i.e. 2017-08-25 21:16:50)

segments
string

Segments

automation
string

Automation (d = daily, w = weekly, m = monthly)

push_ttl
int32

expiration time (in seconds)

status
string

1 = draft, 2 = scheduled

Headers

X-Authorization
string
required

API Authentication Token

 
Suggest Edits

(API) Update Campaign

Updates a Specific Campaign

 
puthttps://api.aimtell.com/prod/campaign/id
curl --request PUT \
  --url https://api.aimtell.com/prod/campaign/id \
  --header 'x-authorization: AUTH_TOKEN'
var request = require("request");

var options = { method: 'PUT',
  url: 'https://api.aimtell.com/prod/campaign/id',
  headers: { 'x-authorization': 'AUTH_TOKEN' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.aimtell.com/prod/campaign/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["x-authorization"] = 'AUTH_TOKEN'

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.aimtell.com/prod/campaign/id");
xhr.setRequestHeader("x-authorization", "AUTH_TOKEN");

xhr.send(data);
import requests

url = "https://api.aimtell.com/prod/campaign/id"

headers = {'x-authorization': 'AUTH_TOKEN'}

response = requests.request("PUT", url, headers=headers)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
    "result": "success",
    "campaignId": "133321"
}
{
    "result": "error",
    "message": "Please specify a valid auth_token."
}
{
    "result": "error",
    "message": "Error #136."
}

Path Params

id
string
required

Campaign ID

Body Params

name
string

Name of Campaign

title
string

Push Title

body
string

Push Body Message

link
string

Push Notification Link

schedule_date
string

Push Notification Schedule Date

segments
string

Segments

customIcon
string

url of custom icon to use (recommended size: 250x250)

customImage
string

url of custom image to use (recommended size: 300x500)

status
int32

set 1 for draft, 2 for scheduled

Headers

X-Authorization
string
required

API Authentication Token

 
Suggest Edits

(API) Delete Campaign

Delete a specific Campaign.

 
deletehttps://api.aimtell.com/prod/campaign/id
curl --request DELETE \
  --url https://api.aimtell.com/prod/campaign/id \
  --header 'x-authorization: AUTH_TOKEN'
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.aimtell.com/prod/campaign/id',
  headers: { 'x-authorization': 'AUTH_TOKEN' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.aimtell.com/prod/campaign/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)
request["x-authorization"] = 'AUTH_TOKEN'

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://api.aimtell.com/prod/campaign/id");
xhr.setRequestHeader("x-authorization", "AUTH_TOKEN");

xhr.send(data);
import requests

url = "https://api.aimtell.com/prod/campaign/id"

headers = {'x-authorization': 'AUTH_TOKEN'}

response = requests.request("DELETE", url, headers=headers)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "result":"success",
  "message": "campaign deleted",
  "campaignId":"80"
}
{
    "result": "error",
    "message": "Please specify a valid auth_token."
}

Path Params

id
string
required

Campaign ID

Headers

X-Authorization
string
required

API Authentication Token

 
Suggest Edits

(API) Get All Event Triggered Campaigns

Fetches All Event Triggered Campaign

 
gethttps://api.aimtell.com/prod/event-campaigns/id
curl --request GET \
  --url https://api.aimtell.com/prod/event-campaigns/id \
  --header 'x-authorization: AUTH_TOKEN'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.aimtell.com/prod/event-campaigns/id',
  headers: { 'x-authorization': 'AUTH_TOKEN' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.aimtell.com/prod/event-campaigns/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-authorization"] = 'AUTH_TOKEN'

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.aimtell.com/prod/event-campaigns/id");
xhr.setRequestHeader("x-authorization", "AUTH_TOKEN");

xhr.send(data);
import requests

url = "https://api.aimtell.com/prod/event-campaigns/id"

headers = {'x-authorization': 'AUTH_TOKEN'}

response = requests.request("GET", url, headers=headers)

print(response.text)
A binary file was returned

You couldn't be authenticated

[
  {
    "id": 819,
    "uid": "76cedd11b19e",
    "idSite": 179,
    "name": "Sample Triggered Notification # 1:  Abandoned Cart",
    "title": "",
    "body": "",
    "link": "",
    "customIcon": "https://s3.amazonaws.com/siteicons.aimtell.com/icon_40_1443032714..jpg",
    "delay": 0,
    "eventCategory": "cart",
    "eventAction": "abandoned",
    "eventLabel": "",
    "conversion_trigger": null,
    "createdAt": "2016-10-24 23:26:06",
    "updatedAt": "2017-02-18 01:11:34",
    "status": 1,
    "sentcount": null,
    "clickcount": null,
    "conversions": null,
    "bounced": null,
    "draft": true,
    "campaign_results": {
      "sent": 0,
      "delivered": 0,
      "bounced": 0,
      "clicked": 0,
      "conversions": 0
    }
  },
  {
    "id": 1659,
    "uid": "76cedd11b19e",
    "idSite": 179,
    "name": "Sample Triggered Notification # 2: Item Shipped",
    "title": "Your order has been shipped!",
    "body": "All items from order have now been shipped.  Click to view tracking information.",
    "link": "https://demo.aimtell.com",
    "customIcon": "https://s3.amazonaws.com/siteicons.aimtell.com/icon_40_1443032714..jpg",
    "delay": 30,
    "eventCategory": "Item",
    "eventAction": "Shipped",
    "eventLabel": "",
    "conversion_trigger": null,
    "createdAt": "2016-12-23 17:33:19",
    "updatedAt": "2017-02-18 01:12:03",
    "status": 5,
    "sentcount": null,
    "clickcount": null,
    "conversions": null,
    "bounced": null,
    "campaign_results": {
      "sent": 0,
      "delivered": 0,
      "bounced": 0,
      "clicked": 0,
      "conversions": 0
    }
  }
]
{
  "result": "error",
  "message": "Invalid token.",
  "error_code": 71831
}

Path Params

id
string
required

Site ID

Query Params

limit
string

Number of results

skip
string

Skip

Headers

X-Authorization
string
required

API Authentication Token

 
Suggest Edits

(API) Get Event Triggered Campaign

Fetches Event Triggered Campaign

 
gethttps://api.aimtell.com/prod/event-campaign/id
curl --request GET \
  --url https://api.aimtell.com/prod/event-campaign/id \
  --header 'x-authorization: AUTH_TOKEN'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.aimtell.com/prod/event-campaign/id',
  headers: { 'x-authorization': 'AUTH_TOKEN' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.aimtell.com/prod/event-campaign/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-authorization"] = 'AUTH_TOKEN'

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.aimtell.com/prod/event-campaign/id");
xhr.setRequestHeader("x-authorization", "AUTH_TOKEN");

xhr.send(data);
import requests

url = "https://api.aimtell.com/prod/event-campaign/id"

headers = {'x-authorization': 'AUTH_TOKEN'}

response = requests.request("GET", url, headers=headers)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": 819,
  "uid": "76cedd11b19e",
  "idSite": 179,
  "name": "Sample Triggered Notification # 1:  Abandoned Cart",
  "title": "",
  "body": "",
  "link": "",
  "customIcon": "https://s3.amazonaws.com/siteicons.aimtell.com/icon_40_1443032714..jpg",
  "delay": 0,
  "eventCategory": "cart",
  "eventAction": "abandoned",
  "eventLabel": "",
  "conversion_trigger": null,
  "createdAt": "2016-10-24 23:26:06",
  "updatedAt": "2017-02-18 01:11:34",
  "status": 1,
  "bounced": null,
  "campaign_results": {
    "sent": 0,
    "delivered": 0,
    "bounced": 0,
    "clicked": 0,
    "conversions": 0
  }
}
{
  "result": "error",
  "message": "Invalid token.",
  "error_code": 71831
}

Path Params

id
string
required

Campaign ID

Headers

X-Authorization
string
required

API Authentication Token

 
Suggest Edits

(API) Get Event Campaign Results (By Day)

Fetches Event Campaign Results (by Day)

 
gethttps://api.aimtell.com/prod/event-campaign/id/results
curl --request GET \
  --url 'https://api.aimtell.com/prod/event-campaign/id/results?startDate=01%2F01%2F2000&endDate=01%2F31%2F2000' \
  --header 'x-authorization: AUTH_TOKEN'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.aimtell.com/prod/event-campaign/id/results',
  qs: 
   { startDate: '01/01/2000',
     endDate: '01/31/2000' },
  headers: { 'x-authorization': 'AUTH_TOKEN' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.aimtell.com/prod/event-campaign/id/results?startDate=01%2F01%2F2000&endDate=01%2F31%2F2000")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-authorization"] = 'AUTH_TOKEN'

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.aimtell.com/prod/event-campaign/id/results?startDate=01%2F01%2F2000&endDate=01%2F31%2F2000");
xhr.setRequestHeader("x-authorization", "AUTH_TOKEN");

xhr.send(data);
import requests

url = "https://api.aimtell.com/prod/event-campaign/id/results"

querystring = {"startDate":"01/01/2000","endDate":"01/31/2000"}

headers = {'x-authorization': 'AUTH_TOKEN'}

response = requests.request("GET", url, headers=headers, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
	"sent": {
		"03\/05\/2017": 0,
		"03\/06\/2017": 0,
		"03\/07\/2017": 0,
		"03\/08\/2017": 0,
		"03\/09\/2017": 0
	},
	"delivered": {
		"03\/05\/2017": 0,
		"03\/06\/2017": 0,
		"03\/07\/2017": 0,
		"03\/08\/2017": 0,
		"03\/09\/2017": 0
	},
	"bounced": {
		"03\/05\/2017": 0,
		"03\/06\/2017": 0,
		"03\/07\/2017": 0,
		"03\/08\/2017": 0,
		"03\/09\/2017": 0
	},
	"clicked": {
		"03\/05\/2017": 0,
		"03\/06\/2017": 0,
		"03\/07\/2017": 0,
		"03\/08\/2017": 0,
		"03\/09\/2017": 0
	},
	"conversions": {
		"03\/05\/2017": 0,
		"03\/06\/2017": 0,
		"03\/07\/2017": 0,
		"03\/08\/2017": 0,
		"03\/09\/2017": 0
	}
}
{
  "result": "error",
  "message": "Invalid token.",
  "error_code": 71831
}

Path Params

id
string
required

Campaign ID

Query Params

startDate
string
required

Date

endDate
string
required

Date

Headers

X-Authorization
string
required

API Authentication Token

 
Suggest Edits

(API) Create Event Triggered Campaign

Create an Event Triggered Campaign

 
posthttps://api.aimtell.com/prod/event-campaigns/
curl --request POST \
  --url https://api.aimtell.com/prod/event-campaigns/ \
  --header 'x-authorization: AUTH_TOKEN'
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.aimtell.com/prod/event-campaigns/',
  headers: { 'x-authorization': 'AUTH_TOKEN' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.aimtell.com/prod/event-campaigns/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-authorization"] = 'AUTH_TOKEN'

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.aimtell.com/prod/event-campaigns/");
xhr.setRequestHeader("x-authorization", "AUTH_TOKEN");

xhr.send(data);
import requests

url = "https://api.aimtell.com/prod/event-campaigns/"

headers = {'x-authorization': 'AUTH_TOKEN'}

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

print(response.text)
A binary file was returned

You couldn't be authenticated

{
    "result": "success",
    "campaignId": 1991
}
{
    "result": "error",
    "message": "Error #139."
}

Body Params

name
string
required

Campaign Name

idSite
string
required

Site ID

Headers

X-Authorization
string
required

API Authentication Token

 
Suggest Edits

(API) Update Event Triggered Campaign

 
puthttps://api.aimtell.com/prod/event-campaign/id
curl --request PUT \
  --url https://api.aimtell.com/prod/event-campaign/id \
  --header 'x-authorization: AUTH_TOKEN'
var request = require("request");

var options = { method: 'PUT',
  url: 'https://api.aimtell.com/prod/event-campaign/id',
  headers: { 'x-authorization': 'AUTH_TOKEN' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.aimtell.com/prod/event-campaign/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["x-authorization"] = 'AUTH_TOKEN'

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.aimtell.com/prod/event-campaign/id");
xhr.setRequestHeader("x-authorization", "AUTH_TOKEN");

xhr.send(data);
import requests

url = "https://api.aimtell.com/prod/event-campaign/id"

headers = {'x-authorization': 'AUTH_TOKEN'}

response = requests.request("PUT", url, headers=headers)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
	"result": "success",
	"campaignId": "329"
}
{
    "result": "error",
    "message": "Please specify a valid auth_token."
}
{
    "result": "error",
    "message": "Error #136."
}

Path Params

id
string
required

Campaign ID

Body Params

name
string

Name of Campaign

title
string

Push Title

body
string

Push Body Message

link
string

Push Notification Link

status
int32
eventAction
string
eventCategory
string
eventLabel
string
delay
int32
customIcon
string

url of custom icon to use (recommended size: 250x250)

customImage
string

url of custom image to use (recommended size: 300x500))

Headers

X-Authorization
string
required

API Authentication Token

 

Only allowed to update definition and name updates.

Definition must follow the format below

Suggest Edits

(API) Delete Event Triggered Campaign

Delete a specific Event Triggered Campaign

 
deletehttps://api.aimtell.com/prod/event-campaign/id
curl --request DELETE \
  --url https://api.aimtell.com/prod/event-campaign/id \
  --header 'x-authorization: AUTH_TOKEN'
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.aimtell.com/prod/event-campaign/id',
  headers: { 'x-authorization': 'AUTH_TOKEN' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.aimtell.com/prod/event-campaign/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)
request["x-authorization"] = 'AUTH_TOKEN'

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://api.aimtell.com/prod/event-campaign/id");
xhr.setRequestHeader("x-authorization", "AUTH_TOKEN");

xhr.send(data);
import requests

url = "https://api.aimtell.com/prod/event-campaign/id"

headers = {'x-authorization': 'AUTH_TOKEN'}

response = requests.request("DELETE", url, headers=headers)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "result":"success",
  "message": "campaign deleted",
  "campaignId":"80"
}
{
    "result": "error",
    "message": "Please specify a valid auth_token."
}

Path Params

id
string
required

Campaign ID

Headers

X-Authorization
string
required

API Authentication API

 

Only allowed to update definition and name updates.

Definition must follow the format below

Suggest Edits

(API) Get All API Push Campaigns

Fetches All API Push Campaigns

 
gethttps://api.aimtell.com/prod/api-campaigns/id
curl --request GET \
  --url https://api.aimtell.com/prod/api-campaigns/id \
  --header 'x-authorization: AUTH_TOKEN'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.aimtell.com/prod/api-campaigns/id',
  headers: { 'x-authorization': 'AUTH_TOKEN' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.aimtell.com/prod/api-campaigns/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-authorization"] = 'AUTH_TOKEN'

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.aimtell.com/prod/api-campaigns/id");
xhr.setRequestHeader("x-authorization", "AUTH_TOKEN");

xhr.send(data);
import requests

url = "https://api.aimtell.com/prod/api-campaigns/id"

headers = {'x-authorization': 'AUTH_TOKEN'}

response = requests.request("GET", url, headers=headers)

print(response.text)
A binary file was returned

You couldn't be authenticated

[{
	"id": 256504,
	"objectId": "58c1d6d498d94",
	"owner_uid": "76cedd11b19e",
	"campaignId": null,
	"title": "Great Job Timmy",
	"body": "Be sure to come back and finish your profile",
	"link": "https:\/\/google.com",
	"idSite": 999,
	"customIcon": "https:\/\/s3.amazonaws.com\/siteicons.aimtell.com\/icon_999_1485981616.png",
	"segmentId": null,
	"alias": null,
	"uids": "25399108-047a-5d08-ead6-1188ae3ea7e8",
	"processed": 1,
	"createdAt": "2017-03-09 22:27:32",
	"updatedAt": "2017-03-09 22:27:33",
	"campaign_results": {
		"sent": 1,
		"delivered": 1,
		"bounced": 0,
		"clicked": 1,
		"conversions": 0
	}
}, {
	"id": 256497,
	"objectId": "58c1d664edf27",
	"owner_uid": "76cedd11b19e",
	"campaignId": null,
	"title": ".",
	"body": ".",
	"link": "https:\/\/google.com",
	"idSite": 999,
	"customIcon": "https:\/\/s3.amazonaws.com\/siteicons.aimtell.com\/icon_999_1485981616.png",
	"segmentId": null,
	"alias": null,
	"uids": "25399108-047a-5d08-ead6-1188ae3ea7e8",
	"processed": 1,
	"createdAt": "2017-03-09 22:25:40",
	"updatedAt": "2017-03-09 22:25:45",
	"campaign_results": {
		"sent": 0,
		"delivered": 0,
		"bounced": 0,
		"clicked": 0,
		"conversions": 0
	}
}
]
{
  "result": "error",
  "message": "Invalid token.",
  "error_code": 71831
}

Path Params

id
string
required

Site ID

Query Params

limit
string

Number of results

skip
string

Skip

Headers

X-Authorization
string
required

API Authentication Token

 
Suggest Edits

(API) Get API Campaign

Fetches API Campaign

 
gethttps://api.aimtell.com/prod/api-campaign/id
curl --request GET \
  --url https://api.aimtell.com/prod/api-campaign/id \
  --header 'x-authorization: AUTH_TOKEN'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.aimtell.com/prod/api-campaign/id',
  headers: { 'x-authorization': 'AUTH_TOKEN' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.aimtell.com/prod/api-campaign/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-authorization"] = 'AUTH_TOKEN'

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.aimtell.com/prod/api-campaign/id");
xhr.setRequestHeader("x-authorization", "AUTH_TOKEN");

xhr.send(data);
import requests

url = "https://api.aimtell.com/prod/api-campaign/id"

headers = {'x-authorization': 'AUTH_TOKEN'}

response = requests.request("GET", url, headers=headers)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
	"id": 256504,
	"objectId": "58c1d6d498d94",
	"owner_uid": "76cedd11b19e",
	"title": "Great job Timmy",
	"body": "Be sure to come back and finish your profile",
	"link": "https:\/\/google.com",
	"idSite": 999,
	"customIcon": "https:\/\/s3.amazonaws.com\/siteicons.aimtell.com\/icon_999_1485981616.png",
	"segmentId": null,
	"alias": null,
	"uids": "25399108-047a-5d08-ead6-1188ae3ea7e8",
	"processed": 1,
	"createdAt": "2017-03-09 22:27:32",
	"updatedAt": "2017-03-09 22:27:33",
	"campaign_results": {
		"sent": 1,
		"delivered": 1,
		"bounced": 0,
		"clicked": 1,
		"conversions": 0
	}
}
{
  "result": "error",
  "message": "Invalid token.",
  "error_code": 71831
}

Path Params

id
string
required

Campaign ID

Headers

X-Authorization
string
required

API Authentication Token

 
Suggest Edits

(API) Get API Campaign Results (By Day)

Fetches API Campaign Results (by Day)

 
gethttps://api.aimtell.com/prod/api-campaign/id/results
curl --request GET \
  --url 'https://api.aimtell.com/prod/api-campaign/id/results?startDate=01%2F01%2F2000&endDate=01%2F31%2F2000' \
  --header 'x-authorization: AUTH_TOKEN'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.aimtell.com/prod/api-campaign/id/results',
  qs: 
   { startDate: '01/01/2000',
     endDate: '01/31/2000' },
  headers: { 'x-authorization': 'AUTH_TOKEN' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.aimtell.com/prod/api-campaign/id/results?startDate=01%2F01%2F2000&endDate=01%2F31%2F2000")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-authorization"] = 'AUTH_TOKEN'

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.aimtell.com/prod/api-campaign/id/results?startDate=01%2F01%2F2000&endDate=01%2F31%2F2000");
xhr.setRequestHeader("x-authorization", "AUTH_TOKEN");

xhr.send(data);
import requests

url = "https://api.aimtell.com/prod/api-campaign/id/results"

querystring = {"startDate":"01/01/2000","endDate":"01/31/2000"}

headers = {'x-authorization': 'AUTH_TOKEN'}

response = requests.request("GET", url, headers=headers, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
	"sent": {
		"03\/05\/2017": 0,
		"03\/06\/2017": 0,
		"03\/07\/2017": 0,
		"03\/08\/2017": 0,
		"03\/09\/2017": 1
	},
	"delivered": {
		"03\/05\/2017": 0,
		"03\/06\/2017": 0,
		"03\/07\/2017": 0,
		"03\/08\/2017": 0,
		"03\/09\/2017": 1
	},
	"bounced": {
		"03\/05\/2017": 0,
		"03\/06\/2017": 0,
		"03\/07\/2017": 0,
		"03\/08\/2017": 0,
		"03\/09\/2017": 0
	},
	"clicked": {
		"03\/05\/2017": 0,
		"03\/06\/2017": 0,
		"03\/07\/2017": 0,
		"03\/08\/2017": 0,
		"03\/09\/2017": 1
	},
	"conversions": {
		"03\/05\/2017": 0,
		"03\/06\/2017": 0,
		"03\/07\/2017": 0,
		"03\/08\/2017": 0,
		"03\/09\/2017": 0
	}
}
{
  "result": "error",
  "message": "Invalid token.",
  "error_code": 71831
}

Path Params

id
string
required

Campaign ID

Query Params

startDate
string
required

Date

endDate
string
required

Date

Headers

X-Authorization
string
required

API Authentication Token

 
Suggest Edits

(API) Send Push Notification

Send a Push Notification

 
posthttps://api.aimtell.com/prod/push/
curl --request POST \
  --url https://api.aimtell.com/prod/push/ \
  --header 'x-authorization: AUTH_TOKEN'
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.aimtell.com/prod/push/',
  headers: { 'x-authorization': 'AUTH_TOKEN' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.aimtell.com/prod/push/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-authorization"] = 'AUTH_TOKEN'

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.aimtell.com/prod/push/");
xhr.setRequestHeader("x-authorization", "AUTH_TOKEN");

xhr.send(data);
import requests

url = "https://api.aimtell.com/prod/push/"

headers = {'x-authorization': 'AUTH_TOKEN'}

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

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "result": "success",
  "message": "Request received. Push sending shortly.",
  "objectId": "5r777x9f8f01d"
}
{
  "result": "error",
  "message": "Invalid token.",
  "error_code": 71831
}
{
    "result": "error",
    "message": "Error #136."
}

Body Params

idSite
int32
required

Site ID

title
string
required

Notification Title

body
string
required

Notification Body

link
string
required

Notification Link

subscriber_uids
array of strings

Subscriber UIDS

segmentId
int32

Segment ID

alias
string

A subscriber alias (usually a username, userid or email)

customIcon
string

url of custom icon to use (recommended size: 250x250)

customImage
string

url of custom image to use (recommended size: 300x500)

Headers

X-Authorization
string
required

API Authentication Token

 

There are several ways to send push notifications over the API.

Option 1) Send to Segment

Required Fields: title, body, link, segmentId

By specifying the segmentId we will automatically fetch all subscribers that match that segment and send them the corresponding notification based on the title, body, and link provided.

curl -XPOST -H 'X-Authorization: AUTH_TOKEN' -H "Content-type: application/json" -d '{
    "idSite": "100",
    "title": "An Awesome Push",
    "body": "Looks pretty great.",
    "link" : "https://aimtell.com",
    "segmentId": 12301
}' 'https://api.aimtell.com/prod/push'

Option 2) Send Push To Specific Subscribers Based on UIDS

Required Fields: title, body, link, uids

By specifying the Aimtell subscriber uids we will send the notification to those subscribers. You may pass up to 1000 subscriber uids separated by commas.

curl -XPOST -H 'X-Authorization: AUTH_TOKEN' -H "Content-type: application/json" -d '{
    "idSite": "100",
    "title": "An Awesome Push",
    "body": "Looks pretty great.",
    "link" : "https://aimtell.com",
    "subscriber_uids": "fgc123-123anch-g81bc-19ufj,1298dna-fdsn97-csd781-chasdh1"
}' 'https://api.aimtell.com/prod/push'

Option 3) Send Push To Specific Subscriber based on an Alias

Required Fields: title, body, link, alias

Alias allows you to send a notification to a subscriber based an associated username, user id or email. To learn more, view this help desk article: https://documentation.aimtell.com/hc/en-us/articles/360002633692-Tracking-Subscriber-Aliases

curl -XPOST -H 'X-Authorization: AUTH_TOKEN' -H "Content-type: application/json" -d '{
    "idSite": "100",
    "title": "An Awesome Push",
    "body": "Looks pretty great.",
    "link" : "https://aimtell.com",
    "alias": "username==jacksparrow17"
}' 'https://api.aimtell.com/prod/push'
Suggest Edits

(API) Get Notification Logs

Fetches Notification Logs

 
gethttps://api.aimtell.com/prod/log/notifications/id
curl --request GET \
  --url https://api.aimtell.com/prod/log/notifications/id \
  --header 'x-authorization: AUTH_TOKEN'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.aimtell.com/prod/log/notifications/id',
  headers: { 'x-authorization': 'AUTH_TOKEN' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.aimtell.com/prod/log/notifications/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-authorization"] = 'AUTH_TOKEN'

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.aimtell.com/prod/log/notifications/id");
xhr.setRequestHeader("x-authorization", "AUTH_TOKEN");

xhr.send(data);
import requests

url = "https://api.aimtell.com/prod/log/notifications/id"

headers = {'x-authorization': 'AUTH_TOKEN'}

response = requests.request("GET", url, headers=headers)

print(response.text)
A binary file was returned

You couldn't be authenticated

[
  {
    "id": 34080598,
    "uid": "76cedd11b19e",
    "idSite": 179,
    "type": 4,
    "campaignId": 130,
    "title": "No More Hacks: Why Tired, Old, Bori",
    "body": "Israeli researchers studied 200 of the best ads in 1999. These were the top finalists a...",
    "link": "https://blog.kissmetrics.com/no-more-hacks/",
    "subscriber_uid": "ef0aefee2751",
    "clicked": 0,
    "createdAt": "2017-03-06 10:32"
  },
  {
    "id": 34080597,
    "uid": "76cedd11b19e",
    "idSite": 179,
    "type": 4,
    "campaignId": 130,
    "title": "No More Hacks: Why Tired, Old, Bori",
    "body": "Israeli researchers studied 200 of the best ads in 1999. These were the top finalists a...",
    "link": "https://blog.kissmetrics.com/no-more-hacks/",
    "subscriber_uid": "ddaaa3f43dc3",
    "clicked": 0,
    "createdAt": "2017-03-06 10:32"
  },
  {
    "id": 33961362,
    "uid": "76cedd11b19e",
    "idSite": 179,
    "type": 1,
    "campaignId": 260,
    "title": "A New Marketing Channel",
    "body": "An entirely new way to re-engage your website visitors!",
    "link": "https://aimtell.com",
    "subscriber_uid": "ef0aefee2751",
    "clicked": 0,
    "createdAt": "2017-03-06 09:03"
  },
  {
    "id": 33961361,
    "uid": "76cedd11b19e",
    "idSite": 179,
    "type": 1,
    "campaignId": 260,
    "title": "A New Marketing Channel",
    "body": "An entirely new way to re-engage your website visitors!",
    "link": "https://aimtell.com",
    "subscriber_uid": "ddaaa3f43dc3",
    "clicked": 0,
    "createdAt": "2017-03-06 09:03"
  }
]
{
  "result": "error",
  "message": "Invalid token.",
  "error_code": 71831
}

Path Params

id
string
required

Site ID

Query Params

filter
string

Filter

limit
string

Limit number of results

skip
string

Skip offset

Headers

X-Authorization
string
required

API Authentication Token

 
Suggest Edits

(API) Get Attributes Logs

Fetches Attributes Logs

 
gethttps://api.aimtell.com/prod/log/attributes/id
curl --request GET \
  --url https://api.aimtell.com/prod/log/attributes/id \
  --header 'x-authorization: AUTH_TOKEN'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.aimtell.com/prod/log/attributes/id',
  headers: { 'x-authorization': 'AUTH_TOKEN' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.aimtell.com/prod/log/attributes/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-authorization"] = 'AUTH_TOKEN'

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.aimtell.com/prod/log/attributes/id");
xhr.setRequestHeader("x-authorization", "AUTH_TOKEN");

xhr.send(data);
import requests

url = "https://api.aimtell.com/prod/log/attributes/id"

headers = {'x-authorization': 'AUTH_TOKEN'}

response = requests.request("GET", url, headers=headers)

print(response.text)
A binary file was returned

You couldn't be authenticated

[
  {
    "id": 12369,
    "owner_uid": "76cedd11b19e",
    "idSite": 179,
    "subscriber_uid": "ef0aefee2751",
    "attribute": "age",
    "value": "66",
    "createdAt": "2015-12-28 09:54",
    "updatedAt": null
  },
  {
    "id": 12370,
    "owner_uid": "76cedd11b19e",
    "idSite": 179,
    "subscriber_uid": "ef0aefee2751",
    "attribute": "gender",
    "value": "male",
    "createdAt": "2015-12-28 09:54",
    "updatedAt": null
  },
  {
    "id": 12372,
    "owner_uid": "76cedd11b19e",
    "idSite": 179,
    "subscriber_uid": "ddaaa3f43dc3",
    "attribute": "age",
    "value": "28",
    "createdAt": "2015-12-28 09:54",
    "updatedAt": null
  },
  {
    "id": 12373,
    "owner_uid": "76cedd11b19e",
    "idSite": 179,
    "subscriber_uid": "ddaaa3f43dc3",
    "attribute": "gender",
    "value": "male",
    "createdAt": "2015-12-28 09:54",
    "updatedAt": null
  },
  {
    "id": 12375,
    "owner_uid": "76cedd11b19e",
    "idSite": 179,
    "subscriber_uid": "75d29d3ba7cb",
    "attribute": "age",
    "value": "40",
    "createdAt": "2015-12-28 09:54",
    "updatedAt": null
  },
  {
    "id": 12376,
    "owner_uid": "76cedd11b19e",
    "idSite": 179,
    "subscriber_uid": "75d29d3ba7cb",
    "attribute": "gender",
    "value": "male",
    "createdAt": "2015-12-28 09:54",
    "updatedAt": null
  },
  {
    "id": 12378,
    "owner_uid": "76cedd11b19e",
    "idSite": 179,
    "subscriber_uid": "7584af350185",
    "attribute": "age",
    "value": "28",
    "createdAt": "2015-12-28 09:54",
    "updatedAt": null
  },
  {
    "id": 12379,
    "owner_uid": "76cedd11b19e",
    "idSite": 179,
    "subscriber_uid": "7584af350185",
    "attribute": "gender",
    "value": "male",
    "createdAt": "2015-12-28 09:54",
    "updatedAt": null
  },
  {
    "id": 12381,
    "owner_uid": "76cedd11b19e",
    "idSite": 179,
    "subscriber_uid": "530de45d4f60",
    "attribute": "age",
    "value": "40",
    "createdAt": "2015-12-28 09:54",
    "updatedAt": null
  },
  {
    "id": 12382,
    "owner_uid": "76cedd11b19e",
    "idSite": 179,
    "subscriber_uid": "530de45d4f60",
    "attribute": "gender",
    "value": "male",
    "createdAt": "2015-12-28 09:54",
    "updatedAt": null
  }
]
{
  "result": "error",
  "message": "Invalid token.",
  "error_code": 71831
}

Path Params

id
string
required

Site ID

Query Params

filter
string

Filter

limit
string

Limit number of results to return

skip
string

Skip offset

Headers

X-Authorization
string
required

API Authentication Token

 
Suggest Edits

(API) Get Pageview Logs

Fetches Pageview Logs

 
gethttps://api.aimtell.com/prod/log/pageviews/id
curl --request GET \
  --url https://api.aimtell.com/prod/log/pageviews/id \
  --header 'x-authorization: AUTH_TOKEN'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.aimtell.com/prod/log/pageviews/id',
  headers: { 'x-authorization': 'AUTH_TOKEN' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.aimtell.com/prod/log/pageviews/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-authorization"] = 'AUTH_TOKEN'

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.aimtell.com/prod/log/pageviews/id");
xhr.setRequestHeader("x-authorization", "AUTH_TOKEN");

xhr.send(data);
import requests

url = "https://api.aimtell.com/prod/log/pageviews/id"

headers = {'x-authorization': 'AUTH_TOKEN'}

response = requests.request("GET", url, headers=headers)

print(response.text)
A binary file was returned

You couldn't be authenticated

[
  {
    "id": 22931,
    "id_visit": 7176,
    "idSite": 179,
    "subscriber_uid": "530de45d4f60",
    "page_title": "Sample Page #2",
    "page_url": "https://demo.aimtell.com/page2",
    "createdAt": "2015-12-28 09:54"
  },
  {
    "id": 22930,
    "id_visit": 7175,
    "idSite": 179,
    "subscriber_uid": "7584af350185",
    "page_title": "Sample Page #3",
    "page_url": "https://demo.aimtell.com/page2",
    "createdAt": "2015-12-28 09:54"
  },
  {
    "id": 22929,
    "id_visit": 7174,
    "idSite": 179,
    "subscriber_uid": "75d29d3ba7cb",
    "page_title": "Sample Page #4",
    "page_url": "https://demo.aimtell.com/page2",
    "createdAt": "2015-12-28 09:54"
  }
]
{
  "result": "error",
  "message": "Invalid token.",
  "error_code": 71831
}

Path Params

id
string
required

Site ID

Query Params

filter
string

Filter

limit
string

Limit number of results to return

skip
string

Skip offset

Headers

X-Authorization
string
required

API Authentication Token

 
Suggest Edits

(API) Get Event Logs

Fetches the Event Log

 
gethttps://api.aimtell.com/prod/log/events/id
curl --request GET \
  --url https://api.aimtell.com/prod/log/events/id \
  --header 'x-authorization: AUTH_TOKEN'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.aimtell.com/prod/log/events/id',
  headers: { 'x-authorization': 'AUTH_TOKEN' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.aimtell.com/prod/log/events/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-authorization"] = 'AUTH_TOKEN'

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.aimtell.com/prod/log/events/id");
xhr.setRequestHeader("x-authorization", "AUTH_TOKEN");

xhr.send(data);
import requests

url = "https://api.aimtell.com/prod/log/events/id"

headers = {'x-authorization': 'AUTH_TOKEN'}

response = requests.request("GET", url, headers=headers)

print(response.text)
A binary file was returned

You couldn't be authenticated

[{
	"subscriber_uid": "424cd240-02ae-2329-33ca-993723601262",
	"id_site": 1689,
	"createdAt": "2017-08-30 11:43",
	"event_category": "Item",
	"event_action": "Add To Cart",
	"event_label": "Fair Fray Skinnies",
	"event_value": null
}, {
	"subscriber_uid": "b5eadeb0-cb27-5797-078c-3e17ff394f53",
	"id_site": 1689,
	"createdAt": "2017-08-30 11:43",
	"event_category": "Item",
	"event_action": "Purchased",
	"event_label": "Bring It Back Chiffon Top",
	"event_value": 10
}, {
	"subscriber_uid": "b5eadeb0-cb27-5797-078c-3e17ff394f53",
	"id_site": 1689,
	"createdAt": "2017-08-30 11:43",
	"event_category": "Item",
	"event_action": "Purchased",
	"event_label": "Hang Around Dolman Top",
	"event_value": 4
}, {
	"subscriber_uid": "b5eadeb0-cb27-5797-078c-3e17ff394f53",
	"id_site": 1689,
	"createdAt": "2017-08-30 11:43",
	"event_category": "Item",
	"event_action": "Purchased",
	"event_label": "Hang Around Dolman Top",
	"event_value": 4
}, {
	"subscriber_uid": "424cd240-02ae-2329-33ca-993723601262",
	"id_site": 1689,
	"createdAt": "2017-08-30 11:40",
	"event_category": "Item",
	"event_action": "Add To Cart",
	"event_label": "Work It Out Tank",
	"event_value": null
}, {
	"subscriber_uid": "87c0cd26-4426-2806-9f6e-c7741f366824",
	"id_site": 1689,
	"createdAt": "2017-08-30 11:39",
	"event_category": "Item",
	"event_action": "Add To Cart",
	"event_label": "Com-Pleat Me Top",
	"event_value": null
}, {
	"subscriber_uid": "87c0cd26-4426-2806-9f6e-c7741f366824",
	"id_site": 1689,
	"createdAt": "2017-08-30 11:39",
	"event_category": "Item",
	"event_action": "Add To Cart",
	"event_label": "Say My Name Ribbed Bodysuit",
	"event_value": null
}, {
	"subscriber_uid": "87c0cd26-4426-2806-9f6e-c7741f366824",
	"id_site": 1689,
	"createdAt": "2017-08-30 11:39",
	"event_category": "Item",
	"event_action": "Add To Cart",
	"event_label": "Patch Me Do It Denim Jacket",
	"event_value": null
}, {
	"subscriber_uid": "a1b80792-68ad-d8d7-82a8-4e8902ece769",
	"id_site": 1689,
	"createdAt": "2017-08-30 11:39",
	"event_category": "Item",
	"event_action": "Add To Cart",
	"event_label": "Burn Free Cut Out Tee",
	"event_value": null
}]
{
  "result": "error",
  "message": "Invalid token.",
  "error_code": 71831
}

Path Params

id
string
required

Site ID

Query Params

limit
string

Limit number of results to return

skip
string

Skip offset

Headers

X-Authorization
string
required

API Authentication Token

 
Suggest Edits

(API) Add Subscriber Attribute [deprecated]

 

Header Auth

 Authentication is required for this endpoint.
posthttps://api.aimtell.com/prod/subscriber/id
curl -XPOST -H 'X-Authorization: AUTH_TOKEN' -H "Content-type: application/json" -d '{
    "idSite": "1",
    "owner_uid": "ia123d",
    "username": "djswan",
    "gender" : "male"
}' 'https://api.aimtell.com/prod/subscriber/27c2f4e2-8d30-168d-cdcb-69886cb80b79'
A binary file was returned

You couldn't be authenticated

{
  "result":"success",
  "message":"Inserted 2 rows."
}
{
    "result": "error",
    "message": "Please specify a valid auth_token."
}
{
    "result": "error",
    "message": "Error #136."
}

Path Params

id
string
required

Subscriber ID

Body Params

idSite
string

Site ID

owner_uid
string

Account ID

 
Suggest Edits

(API) Add Subscriber Event [deprecated]

 

Header Auth

 Authentication is required for this endpoint.
posthttps://api.aimtell.com/prod/subscriber/id/event
curl -XPOST -H 'X-Authorization: AUTH_TOKEN' -H "Content-type: application/json" -d '{
    "idSite": "1",
    "eventCategory": "video",
    "eventAction" : "finished"
}' 'https://api.aimtell.com/prod/subscriber/27c2f4e2-8d30-168d-cdcb-69886cb80b79/event'
A binary file was returned

You couldn't be authenticated

{
    "result": "success",
}
{
    "result": "error",
    "message": "Please specify a valid auth_token."
}
{
    "result": "error",
    "message": "Error #136."
}

Path Params

id
string
required

Subscriber ID

Body Params

idSite
string
required

Site ID

eventCategory
string
required

Event Category

eventAction
string
required

Event Action

eventLabel
string

Event Label

eventValue
int32

Event Value