PlugRush API

API Documentation

This document outlines the HTTP interface that the system exposes to other applications.


Base URL

Direct all API requests to the following url:
https://www.plugrush.com/api

All methods accepts both POST and GET requests. Successful requests return http code 200. Requests generating an error return http code 400.
Please do not send more than 60 requests per minute to our api. If you send too many requests, your IP might get banned.


Base Parameters

The following parameters are accepted for all requests:

  • "user" - The email account you signed up for plugrush with (required)
  • "api_key" - Your PlugRush API key, found in your api settings (required)
  • "action" - Name of the action you are requesting. Possible actions is listed below (required)
  • "method" - Can be either "json" or "xml". default is "json" (optional)


Possible Actions

The following actions are available to use in API requests



"advertiser/stats"

Returns a list with your spendings broken into dates or campaigns

Possible Parameters

  • "breakdown" - dates, campaigns, ads or referrals. defaults to dates
  • "start" - start date in the following format: Y-m-d
  • "end" - end date in the following format: Y-m-d
  • "campaign" - campaign id. optional for dates, campaigns. mandatory for ads, referrals

Example Request

  • https://www.plugrush.com/api
  • ?user=mail@domain.com
  • &api_key=o34ting43oitfgn4ofinoi
  • &action=advertiser/stats
  • &start=2017-07-18
  • &end=2017-07-25
  • &breakdown=dates

Example Response

{
    "data": [
        {
            "date": "2017-07-25",
            "amount": "1529.5208",
            "uniques": "1112347",
            "raws": "1588137"
        },
        {
            "date": "2017-07-24",
            "amount": "1645.947",
            "uniques": "1256456",
            "raws": "1690447"
        }
    ]
}


"adzone/update"

Get ad code and set/get settings for a particular domain.

Possible Parameters

  • "domain" - Domain name (required)
  • "popunder_status" - Whether to enable popunders (1 = on, 0 = off) (optional)
  • "popunder_alturl" - URL to pop when there are no available campaigns (optional)
  • "mobile_status" - Whether to enable mobile redirects (1 = on, 0 = off) (optional)
  • "mobile_alturl" - URL to redirect to when there are no available campaigns (optional)

Example Request

  • https://www.plugrush.com/api
  • ?user=mail@domain.com
  • &api_key=o34ting43oitfgn4ofinoi
  • &action=adzone/widget
  • &id=6kta
  • &mobile_status=1

Example Response

{
    "message": "Adzone updated successfully",
    "data": 
        {
            "integration_library": "<script>\nsome code\n<\/script>",
            "popunder_status": "0",
            "popunder_alturl": "",
            "mobile_status": "1",
            "mobile_alturl": "http://www.burningcamel.com/"
        }
    
}


"adzone/widget"

Get information about a particular widget

Possible Parameters

  • "id" - ID of the widget (required)

Example Request

  • https://www.plugrush.com/api
  • ?user=mail@domain.com
  • &api_key=o34ting43oitfgn4ofinoi
  • &action=adzone/widget
  • &id=6kta

Example Response

{
    "data": 
        {
            "id": "83",
            "domain": "burningcamel.com",
            "title": "Plugrush Widget",
            "width": "400",
            "height": "200",
            "code": "&lt;div\&gt;somecode&lt;\/div&gt;"
        }
    
}


"adzone/widgets"

Get all your widgets, optionally for a specific domain

Possible Parameters

  • "domain" - If specified, get all widgets for this domain only (optional)

Example Request

  • https://www.plugrush.com/api
  • ?user=mail@domain.com
  • &api_key=o34ting43oitfgn4ofinoi
  • &action=adzone/widgets
  • &domain=yourdomain.com

Example Response

{
    "data": [
        {
            "id": "83",
            "domain": "burningcamel.com",
            "title": "Plugrush Widget",
            "width": "400",
            "height": "200",
            "code": "&lt;div\&gt;somecode&lt;\/div&gt;"
        },
        {
            "id": "84",
            "domain": "burningcamel.com",
            "title": "Plugrush Widget",
            "width": "300",
            "height": "200",
            "code": "&lt;div\&gt;somecode&lt;\/div&gt;"
        }
    ]
}


"campaign/delete"

Delete a campaign in your account

Possible Parameters

  • "id" - The ID of the campaign

Example Request

  • https://www.plugrush.com/api
  • ?user=mail@domain.com
  • &api_key=o34ting43oitfgn4ofinoi
  • &action=campaign/delete
  • &id=123456

Example Response

{
    "message": "Campaign deleted successfully"
}


"campaign/list"

Returns a list of the campaigns in your account

Possible Parameters

  • "type" - Can be on of the following (plug, blind, mobile, popunder, adblock) (optional)
  • "status" - Can be on of the following (rejected, refunded, pending, running, paused, completed) (optional)
  • "start" - filters campaigns to start after given start parameter (optional)
  • "end" - filters campaigns to start before given start parameter (optional)

Example Request

  • https://www.plugrush.com/api
  • ?user=mail@domain.com
  • &api_key=o34ting43oitfgn4ofinoi
  • &action=campaign/list

Example Response

{
    "data": [
        {
            "id": "numeric id",
            "title": "Campaign title",
            "type": "plug",
            "status": "running",
            "countries_count": "5",
            "traffic_ordered": "10000000",
            "traffic_received": "1282391",
            "max_hits_per_hour": "5000",
            "traffic_received_current_hour": "129",
            "bid": "0.000000",
            "paid": "8997.000000",
            "spent": "0.000000",
            "autorenew": "no",
            "started": "2017-07-25 00:00:00",
            "ended": "still running"
        },
        {
            "id": "12490",
            "title": "PLUG CR PT IN",
            "type": "plug",
            "status": "running",
            "countries_count": "1",
            "traffic_ordered": "700000",
            "traffic_received": "698047",
            "max_hits_per_hour": "5000",
            "traffic_received_current_hour": "4",
            "bid": "0.001250",
            "paid": "875.000000",
            "spent": "872.558750",
            "autorenew": "yes",
            "started": "2017-07-25 12:42:00",
            "ended": "still running"
        }
    ]
}


"campaign/pause"

Pause or unpause the given campaign

Possible Parameters

  • "id" - Campaign ID
  • "pause" - Whether to pause (1) or unpause (0) the campaign

Example Request

  • https://www.plugrush.com/api
  • ?user=mail@domain.com
  • &api_key=o34ting43oitfgn4ofinoi
  • &action=campaign/pause
  • &id=123456
  • &pause=1

Example Response

{
    "message": "The campaign has been paused"
}


"category/list"

Returns a list of categories that can be used in PlugRush

Possible Parameters

No additional parameters required

Example Request

  • https://www.plugrush.com/api
  • ?user=mail@domain.com
  • &api_key=o34ting43oitfgn4ofinoi
  • &action=category/list

Example Response

{
    "data": {
        "24": "Amateur",
        "25": "Anal",
        "26": "Ass to Mouth",
        "27": "Fisting",
        "28": "Creampie",
        "29": "Asian",
        "30": "BBW",
        "31": "Big Dicks",
        "32": "Big Tits",
        "33": "Blowjob",
        "34": "Lesbian",
        "116": "Arab"
    }
}


"earnings"

Returns earnings for a given time period

Possible Parameters

  • "start" - start date in the following format: Y-m-d
  • "end" - end date in the following format: Y-m-d
  • "domain" - optional
  • "type" - plug, blind, popunder, mobile_redirect, adblock, mobile_pop or mobile_plug. optional
  • "breakdown" - adzones, dates, trackers or websites. defaults to dates
  • "min_hits" - specify a minimum level of traffic: 100 defaults to zero, only applies to trackers
  • "tracker" - specify a partial or full tracker: your_tracker defaults to nothing, only applies to trackers

Limitations

  • "breakdown" - when set to trackers, a maximum of 10000 trackers will be shown
  • use the "tracker" parameter to filter trackers if needed

Example Request

  • https://www.plugrush.com/api
  • ?user=mail@domain.com
  • &api_key=o34ting43oitfgn4ofinoi
  • &action=earnings
  • &start=2017-07-18
  • &end=2017-07-25
  • &domain=yoursite.com
  • &type=mobile_redirects

Example Response

{
    "data": [
        {
            "date": "2017-07-18",
            "amount": 495.49
        },
            {
            "date": "2017-07-19",
            "amount": 428.33
        },
            {
            "date": "2017-07-20",
            "amount": 426.01
        },
            {
            "date": "2017-07-21",
            "amount": 487.28
        },
            {
            "date": "2017-07-22",
            "amount": 419.24
        },
            {
            "date": "2017-07-23",
            "amount": 522.41
        },
            {
            "date": "2017-07-24",
            "amount": 503.39
        },
            {
            "date": "2017-07-25",
            "amount": 111.09
        }
    ]
}


"list/add"

Add one or more items to a list

Possible Parameters

  • "id" - The ID of the list you are modifying (required)
  • "type" - The type of element you are adding: "campaign" or "website" (required)
  • "data" - The element(s) to add, separated by tilde (~): campaign ID, website ID, domain or urlencoded URL (required)

Example Request

  • https://www.plugrush.com/api
  • ?user=mail@domain.com
  • &api_key=o34ting43oitfgn4ofinoi
  • &action=list/add
  • &id=123456
  • &type=website
  • &data=10001~10002~10003

Example Response

{
    "message": "The website was added to the list"
}


"list/create"

Create a new list

Possible Parameters

  • "data" - Name of the list (required)
  • "type" - Type of list to create: blacklist (required)

Example Request

  • https://www.plugrush.com/api
  • ?user=mail@domain.com
  • &api_key=o34ting43oitfgn4ofinoi
  • &action=list/create
  • &data=TheNewList
  • &type=blacklist

Example Response

{
    "message": "List created",
    "data":
        {
                "id": "83",
                "title": "TheNewList",
                "type": "blacklist" 
        }
}


"list/delete"

Delete a list that you own

Possible Parameters

  • "id" - The ID of the list (required)

Example Request

  • https://www.plugrush.com/api
  • ?user=mail@domain.com
  • &api_key=o34ting43oitfgn4ofinoi
  • &action=list/delete
  • &id=123456

Example Response

{
    "message": "List deleted"
}


"list/get"

Get a single list

Possible Parameters

  • "id" - The ID of the list (required)

Example Request

  • https://www.plugrush.com/api
  • ?user=mail@domain.com
  • &api_key=o34ting43oitfgn4ofinoi
  • &action=list/get

Example Response

{
    "data": 
        {
            "List":
                {
                    "id": "83",
                    "type": "Blacklist",
                    "user_id": "83",
                    "count": "5",
                    "title": "MyList",
                },
            "Campaigns": [
                "515",
                "1585",
                "1425" 
            ],
            "Websites": [
                "1515",
                "425",
                "3455"
            ],
            "IPRanges": [
                {
                    "from": "80.80.80.1",
                    "to": "80.80.80.10"
                },
                {
                    "from": "80.90.80.1",
                    "to": "80.90.80.15"
                }
            ]
        }
    
}


"list/list"

Get all lists

Example Request

  • https://www.plugrush.com/api
  • ?user=mail@domain.com
  • &api_key=o34ting43oitfgn4ofinoi
  • &action=list/list

Example Response

{
    "data": [
        {
            "List":
                {
                    "id": "83",
                    "type": "Blacklist",
                    "user_id": "83",
                    "count": "5",
                    "title": "MyList",
                },
            "Campaigns": [
                "515",
                "1585",
                "1425" 
            ],
            "Websites": [
                "1515",
                "425",
                "3455"
            ],
            "IPRanges": [
                {
                    "from": "80.80.80.1",
                    "to": "80.80.80.10"
                },
                {
                    "from": "80.90.80.1",
                    "to": "80.90.80.15"
                }
            ]
        },
        {
            "List":
                {
                    "id": "87",
                    "type": "Blacklist",
                    "user_id": "83",
                    "count": "4",
                    "title": "MySecondList",
                },
            "Campaigns": [
                "512",
                "1444" 
            ],
            "Websites": [
                "1515",
                "3455"
            ],
            "IPRanges": [
                {
                    "from": "80.80.40.1",
                    "to": "80.80.40.10"
                },
                {
                    "from": "80.90.80.1",
                    "to": "80.90.80.15"
                }
            ]
        }
    ]
}


"list/remove"

Removes one or move items from a list

Possible Parameters

  • "id" - The ID of the list (required)
  • "type" - The type of element you are removing: "campaign" or "website" (required)
  • "data" - The element to remove, separated by tilde (~): campaign ID, IP Range (ip_begin,ip_end), website ID, domain or urlencoded URL (required)

Example Request

  • https://www.plugrush.com/api
  • ?user=mail@domain.com
  • &api_key=o34ting43oitfgn4ofinoi
  • &action=list/remove
  • &id=123456
  • &type=website
  • &data=55667

Example Response

{
    "message": "The website was removed from the list"
}


"locales/list"

Returns a list of languages that can be used in PlugRush

Possible Parameters

No additional parameters required

Example Request

  • https://www.plugrush.com/api
  • ?user=mail@domain.com
  • &api_key=o34ting43oitfgn4ofinoi
  • &action=locales/list

Example Response

{
    "data": {
        "1": "Afrikaans",
        "2": "Albanian",
        "3": "Amharic",
        "13": "Arabic",
        "18": "Arabic",
        "20": "Armenian",
        "21": "Assamese",
        "23": "Azeri",
        "25": "Belarusian",
        "27": "Bengali",
        "28": "Bosnian",
        "29": "Bulgarian",
        "30": "Burmese",
        "31": "Catalan",
        "32": "Chinese",
        "37": "Croatian",
        "38": "Czech",
        "39": "Danish",
        "40": "Dhivehi/Maldivian",
        "42": "Dutch",
        "55": "English",
        "57": "Estonian",
        "58": "Faroese",
        "60": "Finnish",
        "66": "French",
        "75": "FYRO Macedonia",
        "79": "Georgian",
        "81": "German",
        "85": "Greek",
        "87": "Gujarati",
        "88": "Hebrew",
        "90": "Hungarian",
        "91": "Icelandic",
        "93": "Indonesian",
        "94": "Italian",
        "96": "Japanese",
        "99": "Kazakh",
        "101": "Korean",
        "102": "Kyrgyz",
        "103": "Lao",
        "105": "Latvian",
        "106": "Lithuanian",
        "108": "Malay",
        "110": "Maltese",
        "113": "Mongolian",
        "114": "Nepali",
        "115": "Norwegian",
        "118": "Polish",
        "120": "Portuguese",
        "124": "Romanian",
        "125": "Russian",
        "129": "Serbian",
        "134": "Slovak",
        "135": "Slovenian",
        "136": "Somali",
        "154": "Spanish",
        "157": "Swahili",
        "159": "Swedish",
        "161": "Tamil",
        "164": "Thai",
        "167": "Turkish",
        "168": "Turkmen",
        "169": "Ukrainian",
        "170": "Urdu",
        "172": "Uzbek",
        "173": "Vietnamese",
        "175": "Xhosa",
        "177": "Zulu"
    }
}


"orientations/list"

Returns a list of orientations that can be used in PlugRush

Possible Parameters

No additional parameters required

Example Request

  • https://www.plugrush.com/api
  • ?user=mail@domain.com
  • &api_key=o34ting43oitfgn4ofinoi
  • &action=orientations/list

Example Response

{
    "data": {
        "1": "Straight",
        "2": "Gay",
        "3": "Shemale/Tranny",
    }
}


"post/delete"

Delete a single post/plug

Possible Parameters

  • "id" - The ID of the post/plug you want to delete (required)

Example Request

  • https://www.plugrush.com/api
  • ?user=mail@domain.com
  • &api_key=o34ting43oitfgn4ofinoi
  • &action=post/delete
  • &id=123456

Example Response

{
    "message": "The plug was deleted"

}


"post/get"

Get a single post

Possible Parameters

  • "id" - The ID of the post you are requesting (required)

Example Request

  • https://www.plugrush.com/api
  • ?user=mail@domain.com
  • &api_key=o34ting43oitfgn4ofinoi
  • &action=post/get
  • &domain=yourdomain.com
  • &id=123456

Example Response

{
    "data": {
        "id": "123456",
        "status": "1",
        "link": "http://www.yourdomain.com/video/title-of-the-post",
        "title": "Title of the Post",
        "description": "The post description",
        "domain": "yourdomain.com",
        "impressions": "1234",
        "clicks": "234",
        "thumbnail": "http://r2.plugrush.com/path/to/thumb/180x135.jpg"
    }
}


"post/list"

Returns a list of posts for a given domain

Possible Parameters

  • "domain" - The domain you are requesting posts for (required)
  • "limit" - The number of posts you want (optional, default is 50)
  • "page" - Use for paginating results (optional)

Example Request

  • https://www.plugrush.com/api
  • ?user=mail@domain.com
  • &api_key=o34ting43oitfgn4ofinoi
  • &action=post/list
  • &domain=yourdomain.com
  • &limit=50
  • &page=1

Example Response

{
    "data": [
        {
            "id": "3o",
            "domain": "yourdomain.com",
            "title": "Title of the post",
            "description": "The post description",
            "link": "http://www.yourdomain.com/video/title-of-the-post",
            "thumbnail": "http://cdn.plugrush.com/path/to/thumb/180x135.jpg",
            "clicks": "244",
            "impressions": "780907"
        },
        {
            "id": "3o",
            "domain": "yourdomain.com",
            "title": "Title of the post",
            "description": "The post description",
            "link": "http://www.yourdomain.com/video/title-of-the-post",
            "thumbnail": "http://cdn.plugrush.com/path/to/thumb/180x135.jpg",
            "clicks": "244",
            "impressions": "780907"
        },
        {
            "id": "3o",
            "domain": "yourdomain.com",
            "title": "Title of the post",
            "description": "The post description",
            "link": "http://www.yourdomain.com/video/title-of-the-post",
            "thumbnail": "http://cdn.plugrush.com/path/to/thumb/180x135.jpg",
            "clicks": "244",
            "impressions": "780907"
        },
    ]
}


"post/save"

Will update a post

Possible Parameters

  • "link" - The url for the post you are submitting (required)
  • "title" - Title for the post you are submitting (required)
  • "description" - Description for the post you are submitting (required)
  • "thumbnail" - Thumbnail for the post you are submitting (required)
  • "type" - 2 for gallery post, 1 for regular post
  • "categories" - category id's seperated by commas

Example Request

  • https://www.plugrush.com/api
  • ?user=mail@domain.com
  • &api_key=o34ting43oitfgn4ofinoi
  • &action=post/save
  • &link=http://www.yourdomain.com/video/funny-man
  • &title=Funny+man
  • &description=A+description+for+the+plug
  • &thumbnail=http://www.yourdomain.com/video/funny-man.jpg
  • &type=1
  • &categories=24,45,73,122

Example Response

Not documented yet..


"site/delete"

Delete a domain from your account

Possible Parameters

  • "domain" - The domain you are deleting required

Example Request

  • https://www.plugrush.com/api
  • ?user=mail@domain.com
  • &api_key=o34ting43oitfgn4ofinoi
  • &action=site/delete
  • &domain=yourdomain.com

Example Response

{
    "message": "The domain was deleted"
}


"site/get"

Will return info about a website

Possible Parameters

  • "domain" - The domain name you are requesting (required)

Example Request

  • https://www.plugrush.com/api
  • ?user=mail@domain.com
  • &api_key=o34ting43oitfgn4ofinoi
  • &action=site/get
  • &domain=yourdomain.com

Example Response

{
    "data": {
        "verification_key": "HASH",
        "popunder_id": "{ID}",
        "popunder_code": "<script src="pu.js" type="text/javascript"></script>",
        "popunder_alturl": "http://www.youralturl.com/pop_redirect",
        "popunder_limit": "1",
        "mobile_id": "{ID}",
        "mobile_code": "<script src="mobile.js" type="text/javascript"></script>",
        "mobile_alturl": "http://alturl.com",
        "adblock_id": "{ID}",
        "adblock_code": "<script type="text/javascript">adblock();</script>",
        "adblock_alturl": "",
        "adblock_warning": "2",
        "adblock_redirect": "0",
        "adblock_level": "2",
        "integration_library": "<script>\nsome code\n<\/script>"
    }
}


"site/list"

Will return a list of all the websites in an account

Possible Parameters

No additional parameters required

Example Request

  • https://www.plugrush.com/api
  • ?user=mail@domain.com
  • &api_key=o34ting43oitfgn4ofinoi
  • &action=site/list

Example Response

{
    "data": [
        {
            "id": "ID",
            "domain": "yourdomain.com",
            "status": "Active",
            "post_count": "20",
            "adzone_count": "4",
            "pop_enabled": 0,
            "mobile_enabled": 0,
            "adblock_enabled": 0
        },
        {
            "id": "ID",
            "domain": "yourotherdomain.com",
            "status": "Active",
            "post_count": "15",
            "adzone_count": "8",
            "pop_enabled": 1,
            "mobile_enabled": 1,
            "adblock_enabled": 1
        },
        {
            "id": "ID",
            "domain": "yourthirddomain.com",
            "status": "Pending",
            "post_count": "0",
            "adzone_count": "0",
            "pop_enabled": 0,
            "mobile_enabled": 0,
            "adblock_enabled": 0
        }
    ]
}


"site/post"

Will update info and settings for a website

Possible Parameters

  • "domain" - The domain you are updating required
  • "popunder_limit" - Pops per 24 hours per user
  • "popunder_alturl" - Url to send unsold traffic to
  • "mobile_alturl" - Url to send unsold traffic to
  • "adblock_warning" - Toggle on or off warning to adblock users
  • "adblock_redirect" - wether to redirect adblock users or not (0/1)
  • "adblock_level" - 0 for level Low, 1 for level High
  • "adblock_alturl" - Url to send unsold traffic to

Example Request

  • https://www.plugrush.com/api
  • ?user=mail@domain.com
  • &api_key=o34ting43oitfgn4ofinoi
  • &action=site/post
  • &domain=yourdomain.com

Example Response

{
    "message": "Site updated successfully"
}


"site/register"

Will register a new domain in your account

Possible Parameters

  • "link" - URL to the website you are registering. Including http:// (required)
  • "type_id" - Website type id. Use site/types to get a list of possible values (required)
  • "locale_id" - Language id for the website. Use locales/list to get a list of possible values (required)
  • "category_id" - Website category id. Use category/list to get a list of possible values (required)
  • "orientation_id" - Website orientation id. Use orientation/list to get a list of possible values (required - defaults to 1)

Example Request

  • https://www.plugrush.com/api
  • ?user=mail@domain.com
  • &api_key=o34ting43oitfgn4ofinoi
  • &action=site/register
  • &link=http://www.yourdomain.com/
  • &type_id=6
  • &locale_id=134
  • &category_id=134
  • &orientation_id=1

Example Response

{
    "message": "Website registered successfully",
    "data": {
        "active": 0,
        "domain": "yourdomain.com",
        "url": "http://www.yourdomain.com",
        "domaintype_id": "6",
        "locale_id": "134",
        "category_id": "134",
        "orientation_id": "1",
        "id": "ID",
        "verification_key": "verification key",
        "integration_library": "<script>\nsome code\n<\/script>"
    }
}


"site/set"

Updates settings for a website

Possible Parameters

  • "domain" - The domain you are updating required
  • "pop_url" - URL to send unsold traffic to, urlencoded
  • "pop_desktop" - Whether to enable desktop popunders (0/1)
  • "pop_mobile" - Whether to enable mobile popunders (0/1)
  • "mobile_url" - URL to send unsold traffic to, urlencoded
  • "mobile_redirect" - Mobile redirect: 0 to disable, or one of: mob_on_pageload, mob_on_any_action, mob_on_pageview, mob_after_x_sec, mob_on_exit
  • "mobile_redirect_param" - Extra paramter for certain mobile redirect options. Possible values:
    • mob_on_pageview: 2, 3, 4, 5, 6, 7, 8, 9
    • mob_after_x_sec: 10, 20, 30, 45, 60, 90, 120, 150, 180, 240, 300, 360, 420, 480, 540, 600

Example Request

  • https://www.plugrush.com/api
  • ?user=mail@domain.com
  • &api_key=o34ting43oitfgn4ofinoi
  • &action=site/post
  • &domain=yourdomain.com
  • &popunder_desktop=1

Example Response

{
    "message": "Site updated successfully"
}


"site/types"

Returns a list of website types that can be used in PlugRush

Possible Parameters

No additional parameters required

Example Request

  • https://www.plugrush.com/api
  • ?user=mail@domain.com
  • &api_key=o34ting43oitfgn4ofinoi
  • &action=site/types

Example Response

{
    "data": {
        "1": "Babelog",
        "2": "Blog",
        "3": "Dump",
        "4": "MGP",
        "5": "TGP",
        "6": "Tube"
    }
}


"site/verify"

Will verify a domain by checking if the correct meta tag is included on the page

Possible Parameters

  • "domain" - The domain you are verifying required

Example Request

  • https://www.plugrush.com/api
  • ?user=mail@domain.com
  • &api_key=o34ting43oitfgn4ofinoi
  • &action=site/verify
  • &domain=yourdomain.com

Example Response

{
    "message": "Website has been verified"
}


"tradestats"

Get trade stats

Possible Parameters

  • "breakdown" - How stats are grouped: dates, websites or referrals. Defaults to 'dates'
  • "domain" - If provided, only show stats for this domain, which must be owned by you
  • "referrer" - If provided, only show trades with this third-party domain. Implies breakdown = 'dates'
  • "start" - Show stats starting from this date (inclusive). Defaults to seven days ago
  • "end" - Show stats up to and inclusing this date. Defaults to the current date

Example Request

  • https://www.plugrush.com/api
  • ?user=mail@domain.com
  • &api_key=o34ting43oitfgn4ofinoi
  • &action=tradestats
  • &breakdown=dates
  • &start=2017-07-16
  • &end=2017-07-18

Example Response

{
    "data": {
        "2017-07-18": {
            "sent": 91360,
            "received": 993,
            "returnRatioPercent": 1.09,
            "credits": 90367
        },
        "2017-07-17": {
            "sent": 0,
            "received": 32,
            "returnRatioPercent": "Infinity",
            "credits": -32
        },
        "2017-07-16": {
            "sent": 7,
            "received": 28,
            "returnRatioPercent": 400,
            "credits": -21
        }
    }
}


"verify"

Returns success if user credentials and api_key is valid

Possible Parameters

  • "type" - regular or gallery (optional. regular is default)

Example Request

  • https://www.plugrush.com/api
  • ?user=mail@domain.com
  • &api_key=o34ting43oitfgn4ofinoi
  • &action=verify

Example Response

{
    "message": "API key has been verified"
}


"widget/colors"

Returns color presets to use for creating widgets

Possible Parameters

No additional parameters required

Example Request

  • https://www.plugrush.com/api
  • ?user=mail@domain.com
  • &api_key=o34ting43oitfgn4ofinoi
  • &action=widget/colors

Example Response

{
    "data": [
        {
            "id": "1dh8",
            "title": "Beige and Brown"
        },
        {
            "id": "1fw8",
            "title": "Basic Blue"
        },
        {
            "id": "1fwb",
            "title": "Gray delight"
        },
        {
            "id": "1fwi",
            "title": "Plugrush'ish"
        },
        {
            "id": "1fwm",
            "title": "Google'ish"
        }
    ]
}


"widget/create"

Creates a new widget based on a color and a layout preset

Possible Parameters

  • "domain" - The domain you are creating a widget for (required)
  • "layout_id" - ID of the layout preset to use (required)
  • "color_id" - ID of the color preset to use (required)
  • "title" - A title for the widget (required)
  • "sell_traffic" - Whether to enable sale of clicked traffic from this widget (optional)
  • "ignore_categories" - Whether to ignore selected categories for sold clicked traffic (optional)
  • "sell_blind_traffic" - Whether to enable sale of blind clicked traffic from this widget (optional)
  • "sell_mobile_traffic" - Whether to detect and mobile redirect traffic from this widget (optional)
  • "gallery" - Whether to create a regular (0) or gallery (1) style widget (optional)
  • "categories" - Category id's seperated by commas (optional)

Example Request

  • https://www.plugrush.com/api
  • ?user=mail@domain.com
  • &api_key=o34ting43oitfgn4ofinoi
  • &action=widget/create
  • &domain=yourdomain.com
  • &layout_id=1dh8
  • &color_id=1d9c
  • &title=My widget title
  • &sell_traffic=1
  • &sell_blind_traffic=1
  • &sell_mobile_traffic=1
  • &ignore_categories=1
  • &gallery=0
  • &categories=24,25,26,27,28,29,30

Example Response

{
    "message": "Widget created successfully!",
    "data": {
        "id": "ID",
        "domain": "yourdomain",
        "title": "My widget title",
        "width": "300",
        "height": "250",
        "code": "<iframe allowtransparency="1" frameborder="0" height="250" id="plwpr9538450942f634e5ca5.79654774" scrolling="no" src="http://widget.plugrush.com/yourdomain/ID" width="300"></iframe>"
    }
}


"widget/get"

Will return info about a single widget

Possible Parameters

  • "id" - ID of the widget being requested (required)

Example Request

  • https://www.plugrush.com/api
  • ?user=mail@domain.com
  • &api_key=o34ting43oitfgn4ofinoi
  • &action=widget/get
  • &id=1df3

Example Response

{
    "data": {
        "id": "ID",
        "domain": "yourdomain",
        "title": "My widget title",
        "width": "300",
        "height": "250",
        "code": "<iframe allowtransparency="1" frameborder="0" height="250" id="plwpr9538450942f634e5ca5.79654774" scrolling="no" src="http://widget.plugrush.com/yourdomain/ID" width="300"></iframe>"
    }
}


"widget/layouts"

Returns layout presets to use for creating widgets

Possible Parameters

No additional parameters required

Example Request

  • https://www.plugrush.com/api
  • ?user=mail@domain.com
  • &api_key=o34ting43oitfgn4ofinoi
  • &action=widget/layouts

Example Response

{
    "data": [
        {
            "id": "1d9c",
            "title": "160x600",
            "width": "160",
            "height": "600",
            "cols": "1",
            "rows": "4"
        },
        {
            "id": "1d9g",
            "title": "180x600",
            "width": "180",
            "height": "600",
            "cols": "1",
            "rows": "4"
        },
        {
            "id": "1h7s",
            "title": "960x250",
            "width": "960",
            "height": "250",
            "cols": "6",
            "rows": "2"
        }
    ]
}


"widget/list"

Returns a list of all the widgets for a given website

Possible Parameters

No additional parameters required

Example Request

  • https://www.plugrush.com/api
  • ?user=mail@domain.com
  • &api_key=o34ting43oitfgn4ofinoi
  • &action=widget/list
  • &domain=yourdomain.com

Example Response

{
    "data": [
        {
            "id": "ID",
            "domain": "yourdomain.com",
            "title": "Below video player",
            "width": "650",
            "height": "250",
            "code": "<iframe src="http://widget.plugrush.com/yourdomain.com/ID"></iframe>"
        },
        {
            "id": "ID",
            "domain": "yourdomain.com",
            "title": "Right column cube",
            "width": "300",
            "height": "250",
            "code": "<iframe src="http://widget.plugrush.com/yourdomain.com/ID"></iframe>"
        },
        {
            "id": "ID",
            "domain": "yourdomain.com",
            "title": "Full width",
            "width": "985",
            "height": "250",
            "code": "<iframe src="http://widget.plugrush.com/yourdomain.com/ID"></iframe>"
        }
    ]
}


(Not implemented yet)"campaign/get"

Returns details for a specific campaign

Possible Parameters

Not documented yet..

Example Request

Not documented yet..

Example Response

Not documented yet..


(Not implemented yet)"campaign/ads"

Returns all ads for a specific campaign

Possible Parameters

Not documented yet..

Example Request

Not documented yet..

Example Response

Not documented yet..


(Not implemented yet)"campaign/post"

Updates a specific campaign

Possible Parameters

Not documented yet..

Example Request

Not documented yet..

Example Response

Not documented yet..