Aimtell

Aimtell Documentation

Welcome to the Aimtell documentation 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

Generic Functions

List of all javascript functions

 

Client Side 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: promise, (obj)
_aimtellTrackEvent("video", "watched", "how-to").then(function(result) {
  console.log(result)
}
{
	"result": "success",
	"message": "Event has been recorded.",
	"eventId": 1090,
	"eventCategory": "video",
	"eventAction": "watched",
	"eventLabel": "how-to",
	"eventValue" : NULL
}

_aimtellPrompt()

Description: If custom push prompt exists, show it, else load native push prompt
Params: N/A
Response: N/A

_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"
}    

_aimtellTrackAttributes(attributes)

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

  • attributes - required. object. can be any number of attributes.
    Response: promise, (obj) result, message
    Notes: Duplicate attribute records are not inserted.
_aimtellTrackAttributes({"username":"djswan", "gender":"male"})
{
	"result": "success",
	"message": "Inserted 0 records."
}

_aimtellRunNative()

Description: Launches native push notification prompt
Params: N/A
Response: N/A

Suggest Edits

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.

posthttps://api.aimtell.com/prod/login
curl -XPOST -H "Content-type: application/json" -d '{
    "username": "EMAIL",
    "password": "PASS"
}' 'https://api.aimtell.com/prod/login'
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
     200 OK
{
 "result":"success",
 "auth_token":"DAGA123JDBHP0DdadaASdCFQSDQ=",
 "uid":"819d13098123"
}

Body Params

username
string
required

Username

password
string
required

Password

 
Suggest Edits

Get All Websites

Grabs all active websites for account.

 

Authentication

 Authentication is required for this endpoint.
gethttps://api.aimtell.com/prod/sites/
curl -XGET -H 'X-Authorization: YOUR_AUTH_TOKEN' 'https://api.aimtell.com/prod/sites/'
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
     200 OK  401 Unauthorized
[
    {
        "url": "http://dashboard.aimtell.com",
        "icon": "https://s3.amazonaws.com/siteicons.aimtell.com/icon_13_1441912957..jpg",
        "id": "33",
        "name": "Aimtell Dashboards",
        "createdAt": "2015-09-10 00:45:47"
    },
    {
        "url": "https://example.aimtell.com",
        "icon": "https://s3.amazonaws.com/siteicons.aimtell.com/icon_40_1443032714..jpg",
        "id": "40",
        "name": "Example Website",
        "createdAt": "2015-09-23 18:24:42"
    }
]
{
    "result": "error",
    "message": "Please specify a valid auth_token."
}

Query Params

limit
string

Number of results

skip
string

Skip

 
Suggest Edits

Get Website Code

Returns aimtell push & website tracking code.

 

Authentication

 Authentication is required for this endpoint.
gethttps://api.aimtell.com/prod/site/code/id
curl -XGET -H 'X-Authorization: YOUR_AUTH_TOKEN' 'https://api.aimtell.com/prod/site/code/33'
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
{
    "result": "error",
    "message": "Please specify a valid auth_token."
}

Path Params

id
string
required

Site ID

 
Suggest Edits

Add Website

 

Authentication

 Authentication is required for this endpoint.
posthttps://api.aimtell.com/prod/sites/
curl -XPOST -H 'X-Authorization: YOUR_AUTH_TOKEN' -H "Content-type: application/json" -d '{
    "url": "https://fake.aimtell.com",
    "name": "Just another test website"
}' 'https://api.aimtell.com/prod/sites/'
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
     200 OK  400 Bad Request
{
    "result": "success",
    "message": "Added website https://fake.aimtell.com succesfully.",
    "id": 79
}
{
    "result": "error",
    "message": "Error #139."
}

Body Params

url
string
required

Website URL

name
string
required

Name of Website

 
Suggest Edits

Update Website Name

 

Authentication

 Authentication is required for this endpoint.
puthttps://api.aimtell.com/prod/site/id
curl -XPUT -H 'X-Authorization: YOUR_AUTH_TOKEN' -H "Content-type: application/json" -d '{
    "name": "New Website Name"
}' 'https://api.aimtell.com/prod/site/1'
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
     200 OK  401 Unauthorized  400 Bad Request
{
    "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

Website Name

 

Only allowed to update definition and name updates.

Definition must follow the format below

Suggest Edits

Update Website Icon

 

Authentication

 Authentication is required for this endpoint.
puthttps://api.aimtell.com/site/icon/id
No code samples available
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
     200 OK  401 Unauthorized  400 Bad Request
{
  "result": "success",
  "message": "Updated website icon.",
  "icon": "https://s3.amazonaws.com/siteicons.aimtell.com/icon_79_1443670476..jpg",
  "id": "79"
}
{
    "result": "error",
    "message": "Please specify a valid auth_token."
}
{
    "result": "error",
    "message": "Error #136."
}

Path Params

id
string
required

Site ID

Body Params

icon
file

Icon

 
Suggest Edits

Update Website Push Package (Safari)

Updates the safari push package.

 

Authentication

 Authentication is required for this endpoint.
posthttps://api.aimtell.com/prod/push/package/id
curl -XPOST -H 'X-Authorization: YOUR_AUTH_TOKEN' -H "Content-type: application/json" 'https://api.aimtell.com/prod/push/package/79'
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
     200 OK  401 Unauthorized  400 Bad Request
{
  "result": "success",
  "message": "Push package generated for fake.aimtell.com."
}
{
    "result": "error",
    "message": "Please specify a valid auth_token."
}
{
    "result": "error",
    "message": "Error #136."
}

Path Params

id
string
required

Site ID

 

Only allowed to update definition and name updates.

Definition must follow the format below

Suggest Edits

Delete Website

 

Authentication

 Authentication is required for this endpoint.
deletehttps://api.aimtell.com/prod/site/id
curl -XDELETE -H 'X-Authorization: YOUR_AUTH_TOKEN' 'https://api.aimtell.com/prod/site/79'
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
     200 OK  401 Unauthorized
{
    "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

 

Only allowed to update definition and name updates.

Definition must follow the format below

Suggest Edits

Get Custom Attributes

 

Authentication

 Authentication is required for this endpoint.
gethttps://api.aimtell.com/prod/attributes/id
curl -XGET -H 'X-Authorization: YOUR_AUTH_TOKEN' 'https://api.aimtell.com/prod/attributes/1'
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
     200 OK  401 Unauthorized
[
    "broadcast_count",
    "fname",
    "follower_count",
    "following_count",
    "like_count",
    "lname",
    "push_token",
    "username",
    "wisdom"
]
{
    "result": "error",
    "message": "Please specify a valid auth_token."
}

Path Params

id
string
required

Site ID

 
Suggest Edits

Get All Segments

 

Authentication

 Authentication is required for this endpoint.
gethttps://api.aimtell.com/prod/segments/idSite
curl -XGET -H 'X-Authorization: AUTH_TOKEN' 'https://api.aimtell.com/prod/segments/1'
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
     200 OK  401 Unauthorized
[
  {
    "idsegment": "6",
    "owner": "ia123d",
    "name": "maybe just only usa",
    "definition": "countryCode==us",
    "idSite": "1",
    "createdAt": "2015-08-24 22:55:21",
    "updatedAt": "2015-08-24 22:55:21",
    "deleted": "0"
  },
  {
    "idsegment": "7",
    "owner": "ia123d",
    "name": "user is djswan",
    "definition": "username==djswan",
    "idSite": "1",
    "createdAt": "2015-08-24 22:56:38",
    "updatedAt": "2015-08-24 22:56:38",
    "deleted": "0"
  },
  {
    "idsegment": "8",
    "owner": "ia123d",
    "name": "Irvine",
    "definition": "city==irvine",
    "idSite": "1",
    "createdAt": "2015-09-06 19:13:42",
    "updatedAt": "2015-09-06 19:13:42",
    "deleted": "0"
  }
]
{
    "result": "error",
    "message": "Please specify a valid auth_token."
}

Path Params

idSite
string
required

Site ID

 
Suggest Edits

Get Segment

 

Authentication

 Authentication is required for this endpoint.
gethttps://api.aimtell.com/prod/segment/id
curl -XGET -H 'X-Authorization: AUTH_TOKEN' 'https://api.aimtell.com/prod/segment/8'
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
     200 OK  401 Unauthorized
{
  "idsegment": "8",
  "owner": "ia123d",
  "name": "Irvine",
  "definition": "city==irvine",
  "idSite": "1",
  "createdAt": "2015-09-06 19:13:42",
  "updatedAt": "2015-09-06 19:13:42",
  "deleted": "0"
}
{
    "result": "error",
    "message": "Please specify a valid auth_token."
}

Path Params

id
string
required

Segment ID

 
Suggest Edits

Get Suggested Segment Value

 

Authentication

 Authentication is required for this endpoint.
gethttps://api.aimtell.com/prod/segments/id/suggested/name
curl -XGET -H 'X-Authorization: AUTH_TOKEN' 'https://api.aimtell.com/prod/segments/1/suggested/countryCode'
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
     200 OK  401 Unauthorized
[
  "San Antonio",
  "San Francisco",
  "Santa Monica",
  "Cambridge"
]
{
    "result": "error",
    "message": "Please specify a valid auth_token."
}

Path Params

id
string
required

Site ID

name
string
required

Segment Name

 
Suggest Edits

Update Segment

 

Authentication

 Authentication is required for this endpoint.
puthttps://api.aimtell.com/prod/segment/id
curl -XPUT -H 'X-Authorization: AUTH_TOKEN' -H "Content-type: application/json" -d '{
    "name": "city is sommerville"
}' 'https://api.aimtell.com/prod/segment/5'
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
     200 OK  401 Unauthorized  400 Bad Request
{
    "result": "success",
    "idSegment": "5",
    "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

 

Only allowed to update definition and name updates.

Definition must follow the format below

Suggest Edits

Delete Segment

 

Authentication

 Authentication is required for this endpoint.
deletehttps://api.aimtell.com/prod/segment/id
curl -XDELETE -H 'X-Authorization: AUTH_TOKEN' 'https://api.aimtell.com/prod/segment/5'
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
     200 OK  401 Unauthorized
{
    "result": "success",
    "idSegment": "5",
    "message": "Successfully removed segment"
}
{
    "result": "error",
    "message": "Please specify a valid auth_token."
}

Path Params

id
string
required

Segment ID

 

Only allowed to update definition and name updates.

Definition must follow the format below

Suggest Edits

Create Segment

 

Authentication

 Authentication is required for this endpoint.
posthttps://api.aimtell.com/prod/segments/
curl -XPOST -H 'X-Authorization: AUTH_TOKEN' -H "Content-type: application/json" -d '{
    "name": "city is sommerville",
    "idSite": 1,
    "definition": "city==Irvine"
}' 'https://api.aimtell.com/prod/segments'
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
     200 OK  400 Bad Request
{
	"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

 
Suggest Edits

Get All Campaigns

 

Authentication

 Authentication is required for this endpoint.
gethttps://api.aimtell.com/prod/campaigns/id
curl -XGET -H 'X-Authorization: AUTH_TOKEN' 'https://api.aimtell.com/prod/campaigns/1'
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
     200 OK  401 Unauthorized
[
  {
    "name": "special at irvine center",
    "id": "28",
    "updatedAt": "09-15-2015 15:09",
    "schedule_date": "09-09-2015 16:30",
    "status": "1",
    "draft": true
  },
  {
    "name": "a new campaign",
    "id": "32",
    "updatedAt": "09-14-2015 16:36",
    "schedule_date": "09-14-2015 17:30",
    "status": "1",
    "draft": true
  }
]
{
    "result": "error",
    "message": "Please specify a valid auth_token."
}

Path Params

id
string
required

Site ID

Query Params

limit
string

Number of results

skip
string

Skip

 
Suggest Edits

Get Campaign

 

Authentication

 Authentication is required for this endpoint.
gethttps://api.aimtell.com/prod/campaign/id
curl -XGET -H 'X-Authorization: YOUR_AUTH_TOKEN' 'https://api.aimtell.com/prod/campaign/19?load=segments'
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
     200 OK  401 Unauthorized
{
    "timezone": "America/Los_Angeles",
    "id": "19",
    "uid": "ia123d",
    "idSite": "1",
    "name": "first campaign for d",
    "title": "sample",
    "body": "aim for 11",
    "link": "http://www.google.com",
    "segments": [
        {
            "idsegment": "7",
            "owner": "ia123d",
            "name": "user is djswan",
            "definition": "username==djswan",
            "idSite": "1",
            "createdAt": "2015-08-24 22:56:38",
            "updatedAt": "2015-08-24 22:56:38",
            "deleted": "0"
        }
    ],
    "createdAt": "2015-08-10 23:19:20",
    "updatedAt": "2015-09-09 22:08:14",
    "status": "0",
    "schedule_pretty_time": "06:15 PM",
    "schedule_pretty_date": "09/09/2015"
}
{
    "result": "error",
    "message": "Please specify a valid auth_token."
}

Path Params

id
string
required

Campaign ID

Query Params

load
string

Load Additional Information (i.e. Segments)

 
Suggest Edits

Create Campaign

 

Authentication

 Authentication is required for this endpoint.
posthttps://api.aimtell.com/prod/campaigns/
curl -XPOST -H 'X-Authorization: AUTH_TOKEN' -H "Content-type: application/json" -d '{
    "name": "awesome camapign",
    "idSite: 1
}' 'https://api.aimtell.com/prod/campaigns/'
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
     200 OK  400 Bad Request
{
    "result": "success",
    "campaignId": 79
}
{
    "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

Schedule Date

segments
string

Segments

automation
string

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

 
Suggest Edits

Update Campaign

 

Authentication

 Authentication is required for this endpoint.
puthttps://api.aimtell.com/prod/campaign/id
curl -XPUT -H 'X-Authorization: AUTH_TOKEN' -H "Content-type: application/json" -d '{
    "name": "campaign me at 80"
}' 'https://api.aimtell.com/prod/campaign/80'
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
     200 OK  401 Unauthorized  400 Bad Request
{
    "result": "success",
    "campaignId": "80"
}
{
    "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

 

Only allowed to update definition and name updates.

Definition must follow the format below

Suggest Edits

Delete Campaign

 

Authentication

 Authentication is required for this endpoint.
deletehttps://api.aimtell.com/prod/campaign/id
curl -XDELETE -H 'X-Authorization: AUTH_TOKEN' 'https://api.aimtell.com/prod/campaign/80'
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
     200 OK  401 Unauthorized
{
  "result":"success",
  "message": "campaign deleted",
  "campaignId":"80"
}
{
    "result": "error",
    "message": "Please specify a valid auth_token."
}

Path Params

id
string
required

Campaign ID

 

Only allowed to update definition and name updates.

Definition must follow the format below

 

Authentication

 Authentication is required for this endpoint.
gethttps://api.aimtell.com/prod/user/
curl -XGET -H 'X-Authorization: AUTH_TOKEN' 'https://api.aimtell.com/prod/user/'
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
     200 OK  401 Unauthorized
{
  "uid": "ia123d",
  "timezone": "America/Los_Angeles",
  "registration_date": "2014-10-05 00:00:00",
  "last_login": "2015-10-01 04:01:32",
  "username": "dj@aimtell.com",
  "auth_token": "AUTH_TOKEN",
  "first_name": "DJ",
  "last_name": "Swanepoel",
  "trial": "0",
  "trial_end": "0000-00-00 00:00:00"
}
{
    "result": "error",
    "message": "Please specify a valid auth_token."
}
 
Suggest Edits

Update User

 

Authentication

 Authentication is required for this endpoint.
puthttps://api.aimtell.com/prod/user/
curl -XPUT -H 'X-Authorization: YOUR_AUTH_TOKEN' -H "Content-type: application/json" -d '{
    "first_name": "DJ"
}' 'https://api.aimtell.com/prod/user/ia123d'
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
     200 OK  401 Unauthorized  400 Bad Request
{
    "result": "success",
    "message": "User updated.",
    "user": {
        "uid": "ia123d",
        "timezone": "America/Los_Angeles",
        "registration_date": "2014-10-05 00:00:00",
        "last_login": "2015-10-01 04:03:20",
        "username": "dj@aimtell.com",
        "auth_token": "AUTH_TOKEN",
        "first_name": "DJ",
        "last_name": "Swanepoel",
        "trial": "0",
        "trial_end": "0000-00-00 00:00:00"
    }
}
{
    "result": "error",
    "message": "Please specify a valid auth_token."
}
{
    "result": "error",
    "message": "Error #136."
}

Body Params

first_name
string

First Name

last_name
string

Last Name

password
string

Password

timezone
string

Timezone

 

Only allowed to update definition and name updates.

Definition must follow the format below

Suggest Edits

Get Subscribers

 

Authentication

 Authentication is required for this endpoint.
gethttps://api.aimtell.com/prod/subscribers/id
curl -XGET -H 'X-Authorization: AUTH_TOKEN' 'https://api.aimtell.com/prod/subscribers/1?limit=5'
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
     200 OK  401 Unauthorized
{
    "count": 1,
    "subscribers": [
        {
            "idvisit": "1585",
            "idSite": "1",
            "subscriberId": "2ec7acc3-9aa8-93b7-ad2e-2667d9e7d5d2",
            "visitor_localtime": "2015-09-22 00:41:15",
            "deviceType": "1",
            "resolution": "1440 x 900",
            "browserName": "Chrome",
            "browserVersion": "46.0.2490.33",
            "operatingSystemCode": "Mac OS X",
            "operatingSystemVersion": "10_10_5",
            "referrerUrl": "",
            "referrerName": "",
            "browser_lang": "en-US",
            "ip": "68.5.116.87",
            "longitude": "-118",
            "latitude": "34",
            "region": "New YOrk",
            "regionCode": "NY",
            "city": "New York",
            "postal": "92694",
            "country": "United States",
            "countryCode": "US",
            "time_on_site": "0",
            "createdAt": "2015-09-22 00:41:16"
        }
    ]
}
{
    "result": "error",
    "message": "Please specify a valid auth_token."
}

Path Params

id
string
required

Site ID

Query Params

segment
string

Filter

limit
string

Limit

skip
string

Skip

 
Suggest Edits

Get Subscriber

 

Authentication

 Authentication is required for this endpoint.
gethttps://api.aimtell.com/prod/subscriber/id
curl -XGET -H 'X-Authorization: AUTH_TOKEN' 'https://api.aimtell.com/prod/subscriber/93f84542-67c3-a4bf-50a2-265feaeb753d'
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
     200 OK  401 Unauthorized
{
    "idvisit": "56",
    "idSite": "39",
    "subscriberId": "93f84542-67c3-a4bf-50a2-265feaeb753d",
    "visitor_localtime": "2015-09-16 01:27:56",
    "deviceType": "1",
    "resolution": "1188 x 668",
    "browserName": "Microsoft Internet Explorer",
    "browserVersion": "10.0",
    "operatingSystemCode": "Windows",
    "operatingSystemVersion": "8",
    "referrerUrl": "http://www.whatanimalami.com/",
    "referrerName": "www.whatanimalami.com",
    "browser_lang": "en-US",
    "ip": "166.176.120.90",
    "longitude": "-95",
    "latitude": "30",
    "region": "Texas",
    "regionCode": "TX",
    "city": "Houston",
    "postal": "77002",
    "country": "United States",
    "countryCode": "US",
    "time_on_site": "0",
    "createdAt": "2015-09-21 22:18:21"
}
{
    "result": "error",
    "message": "Please specify a valid auth_token."
}

Path Params

id
string
required

Subscriber ID

 
Suggest Edits

Add Subscriber Attribute

 

Authentication

 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'
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
     200 OK  401 Unauthorized  400 Bad Request
{
  "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

 

Only allowed to update definition and name updates.

Definition must follow the format below

Suggest Edits

Add Subscriber Event

 

Authentication

 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",
    "owner_uid": "ia123d",
    "eventCategory": "video",
    "eventAction" : "finished
}' 'https://api.aimtell.com/prod/subscriber/27c2f4e2-8d30-168d-cdcb-69886cb80b79/event'
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
     200 OK  401 Unauthorized  400 Bad Request
{
    "result": "success",
    "message": "Event has been recorded.",
    "eventId": 1050,
    "eventCategory": "video",
    "eventAction": "finished",
    "eventLabel": null,
    "eventValue": null
}
{
    "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

owner_uid
string
required

Account ID

eventCategory
string
required

Event Category

eventAction
string
required

Event Action

eventLabel
string

Event Label

eventValue
int32

Event Value

 

Only allowed to update definition and name updates.

Definition must follow the format below

Suggest Edits

Get Notification Logs

 

Authentication

 Authentication is required for this endpoint.
gethttps://api.aimtell.com/prod/log/notifications/id
curl -XGET -H 'X-Authorization: AUTH_TOKEN' 'https://api.aimtell.com/prod/log/notifications/33'
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
     200 OK  401 Unauthorized
[
    {
        "id": "432",
        "uid": "ia123d",
        "idSite": "33",
        "campaignId": "78",
        "title": "tip",
        "body": "body",
        "link": "http://www.google.com",
        "subscriber_uid": "18f07d63-f966-3052-73d9-2a89dcbd92e9",
        "clicked": "0",
        "createdAt": "2015-09-30 19:46:25"
    },
    {
        "id": "433",
        "uid": "ia123d",
        "idSite": "33",
        "campaignId": "78",
        "title": "tip",
        "body": "body",
        "link": "http://www.google.com",
        "subscriber_uid": "1bac27a9-483b-3643-b6a9-c18b5dfaf2ab",
        "clicked": "0",
        "createdAt": "2015-09-30 19:46:25"
    },
    {
        "id": "434",
        "uid": "ia123d",
        "idSite": "33",
        "campaignId": "78",
        "title": "tip",
        "body": "body",
        "link": "http://www.google.com",
        "subscriber_uid": "482e9a7d-a391-18ce-2984-f58b8f25e373",
        "clicked": "0",
        "createdAt": "2015-09-30 19:46:25"
    },
    {
        "id": "435",
        "uid": "ia123d",
        "idSite": "33",
        "campaignId": "78",
        "title": "tip",
        "body": "body",
        "link": "http://www.google.com",
        "subscriber_uid": "754fca8c-b773-affe-79d6-3304b606fb5d",
        "clicked": "0",
        "createdAt": "2015-09-30 19:46:25"
    },
    {
        "id": "427",
        "uid": "ia123d",
        "idSite": "33",
        "campaignId": "77",
        "title": "lets get lunch",
        "body": "now please",
        "link": "http://www.deltaco.com",
        "subscriber_uid": "18f07d63-f966-3052-73d9-2a89dcbd92e9",
        "clicked": "0",
        "createdAt": "2015-09-30 19:36:26"
    }
]
{
    "result": "error",
    "message": "Please specify a valid auth_token."
}

Path Params

id
string
required

Site ID

Query Params

filter
string

Filter

limit
string

Limit number of results

skip
string

Skip offset

 
Suggest Edits

Get Attributes Logs

 

Authentication

 Authentication is required for this endpoint.
gethttps://api.aimtell.com/prod/log/attributes/id
curl -XGET -H 'X-Authorization: AUTH_TOKEN' 'https://api.aimtell.com/prod/log/attributes/1'
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
     200 OK  401 Unauthorized
[
    {
        "id": "6340",
        "owner_uid": "ia123d",
        "idSite": "33",
        "subscriber_uid": "72517475-27b9-c788-f75d-eeda81b99534",
        "attribute": "gender",
        "value": "male",
        "createdAt": "2015-09-17 05:56:46"
    },
    {
        "id": "6339",
        "owner_uid": "ia123d",
        "idSite": "33",
        "subscriber_uid": "72517475-27b9-c788-f75d-eeda81b99534",
        "attribute": "gender",
        "value": "male",
        "createdAt": "2015-09-17 05:56:00"
    },
    {
        "id": "6338",
        "owner_uid": "ia123d",
        "idSite": "33",
        "subscriber_uid": "72517475-27b9-c788-f75d-eeda81b99534",
        "attribute": "gender",
        "value": "male",
        "createdAt": "2015-09-17 05:55:42"
    },
    {
        "id": "6337",
        "owner_uid": "ia123d",
        "idSite": "33",
        "subscriber_uid": "72517475-27b9-c788-f75d-eeda81b99534",
        "attribute": "gender",
        "value": "male",
        "createdAt": "2015-09-17 05:54:27"
    },
    {
        "id": "6336",
        "owner_uid": "ia123d",
        "idSite": "33",
        "subscriber_uid": "72517475-27b9-c788-f75d-eeda81b99534",
        "attribute": "gender",
        "value": "male",
        "createdAt": "2015-09-17 05:53:40"
    }
]
{
    "result": "error",
    "message": "Please specify a valid auth_token."
}

Path Params

id
string
required

Site ID

Query Params

filter
string

Filter

limit
string

Limit number of results to return

skip
string

Skip offset

 
Suggest Edits

Get Pageview Logs

 

Authentication

 Authentication is required for this endpoint.
gethttps://api.aimtell.com/prod/log/pageviews/id
curl -XGET -H 'X-Authorization: AUTH_TOKEN' 'https://api.aimtell.com/prod/log/pageviews/1'
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
     200 OK  401 Unauthorized
[
    {
        "id": "2850",
        "id_visit": "1736",
        "idSite": "33",
        "subscriber_uid": "72517475-27b9-c788-f75d-eeda81b99534",
        "page_title": "Aimtell - Manual Push Campaign",
        "page_url": "http://localhost.dashboard.aimtell.com/manual/76",
        "createdAt": "2015-09-30 23:19:46"
    },
    {
        "id": "2849",
        "id_visit": "1736",
        "idSite": "33",
        "subscriber_uid": "72517475-27b9-c788-f75d-eeda81b99534",
        "page_title": "Aimtell - Manual Push Campaign",
        "page_url": "http://localhost.dashboard.aimtell.com/manual",
        "createdAt": "2015-09-30 23:19:45"
    },
    {
        "id": "2848",
        "id_visit": "1736",
        "idSite": "33",
        "subscriber_uid": "72517475-27b9-c788-f75d-eeda81b99534",
        "page_title": "Aimtell - Manual Push Campaign",
        "page_url": "http://localhost.dashboard.aimtell.com/manual/new",
        "createdAt": "2015-09-30 23:19:43"
    },
    {
        "id": "2847",
        "id_visit": "1735",
        "idSite": "33",
        "subscriber_uid": "72517475-27b9-c788-f75d-eeda81b99534",
        "page_title": "Aimtell - Websites",
        "page_url": "http://localhost.dashboard.aimtell.com/websites/new",
        "createdAt": "2015-09-30 23:10:48"
    },
    {
        "id": "2846",
        "id_visit": "1734",
        "idSite": "33",
        "subscriber_uid": "72517475-27b9-c788-f75d-eeda81b99534",
        "page_title": "Aimtell - Subscribers",
        "page_url": "http://localhost.dashboard.aimtell.com/account",
        "createdAt": "2015-09-30 21:33:07"
    }
]
{
    "result": "error",
    "message": "Please specify a valid auth_token."
}

Path Params

id
string
required

Site ID

Query Params

filter
string

Filter

limit
string

Limit number of results to return

skip
string

Skip offset

 
Suggest Edits

Send Push Notification

 

Authentication

 Authentication is required for this endpoint.
posthttps://api.aimtell.com/prod/push/
curl -XPOST -H 'X-Authorization: AUTH_TOKEN' -H "Content-type: application/json" -d '{
    "idSite": "33",
    "title": "An Awesome Push",
    "body": "Looks pretty great.",
    "link" : "https://aimtell.com",
    "alias": "gender==male"
}' 'https://api.aimtell.com/prod/push'
{{ results.method }}
{{ results.url }}
{{ results.requestHeaders }}
{{ results.data }}
{{ results.responseHeaders }}
     200 OK  401 Unauthorized  400 Bad Request
{
  "result":"success",
  "count":11
}
{
    "result": "error",
    "message": "Please specify a valid auth_token."
}
{
    "result": "error",
    "message": "Error #136."
}

Body Params

idSite
int32
required

Site ID

title
string

Notification Title

body
string

Notification Body

link
string

Notification Link

campaignId
int32

Campaign ID

uids
array of strings

Subscriber UIDS

segmentId
int32

Segment ID

alias
string

Alias of subcribers to send to (ie username==djswan)

 

There are several ways to send push notifications.

Option 1) Send to Campaign
Required Fields: campaignId
By specifying the campaignId parameter the system will automatically fetch your campaign's details including push title, push body, push link and target subscribers.

Option 2) 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.

Option 3) Send to Alias
Required Fields: title, body, link, alias
By specifying the alias we will fetch the subscribers that match that alias. For instance, you may set the alias to be "age" = "30" and we will send your message to all users who are 30. This is a quicker way to target users without the need of creating a new segment. You may use standard operators for your alias such as > , >=, <, <=, !@, etc. View our alias documentation page for more help.

Option 4) Send Push To Specific Subscribers Based on UIDS
Required Fields: title, body, link, uids
By specifying the subscriber uids we will send the notification to those subscribers.

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