Applications

API methods to manage apps

post
/createApplication

https://cp.pushwoosh.com/json/1.3/createApplication
Creates a new application on the account.
Request
Response
Body Parameters
authorize_all_tokens
optional
boolean
Allows all API tokens to communicate with this app.
auth
required
string
API access token from Pushwoosh Control Panel.
icon
optional
string
Base64-encoded binary content of png file.
sdk_ios
optional
string
iOS SDK type. Possible values: "pw" or "corona". For Corona, push payload is different.
sdk_android
optional
string
Android SDK type. Possible values: "pw", "corona", "phonegap". AppPresser users select "phonegap".
title
optional
string
Title for the new app in Pushwoosh.
200: OK
{
"status_code": 200,
"status_message": "OK",
"response": {
"application": "1DC69-73EDB"
}
}

For Private Offering subscriptions only.

Example
{
"request": {
"auth": "yxoPUlwqm…………pIyEX4H", // API access token from Pushwoosh Control Panel
"icon": "iVBORw0KGgoAAAANSUhEUgAAAH0AAACVCAIAAAD6...", // Base-64 encoded binary content of png file
"authorize_all_tokens" : true, // or 'false', optional. If true, allows all api tokens to communicate with this app
"sdk_ios": "pw", // Possible values are “pw” or “corona”
"sdk_android": "pw", // Possible values are “pw”, “corona”, or “phonegap”
"title": "APP_TITLE" // Title for the new app in Pushwoosh
}
}

post
/updateApplication

https://cp.pushwoosh.com/json/1.3/updateApplication
Updates the application settings.
Request
Response
Body Parameters
auth
required
string
API access token from Pushwoosh Control Panel.
application
required
string
Pushwoosh application code.
icon
optional
string
Base64-encoded binary content of png file.
sdk_ios
optional
string
iOS SDK type. Possible values: "pw" or "corona". For Corona, push payload is different.
sdk_android
optional
string
Android SDK type. Possible values: "pw", "corona", "phonegap". AppPresser users select "phonegap".
title
optional
string
New title for the app in Pushwoosh.
200: OK
{
"status_code": 200,
"status_message": "OK",
"response": null
}

For Private Offering subscriptions only.

Example
{
"request": {
"auth": "yxoPUlwqm…………pIyEX4H", // API access token from Pushwoosh Control Panel
"application": "XXXXX-XXXXX", // application code of the app you want to update
"icon": "iVBORw0KGgoAAAANSUhEUgAAAH0AAACVCAIAAAD6...", // Base-64 encoded binary content of png file
"sdk_ios": "pw", // Possible values are “pw” or “corona”
"sdk_android": "pw", // Possible values are “pw”, “corona”, or “phonegap”
"title": "APP_TITLE" // New title for the app in Pushwoosh
}
}

post
/deleteApplication

https://cp.pushwoosh.com/json/1.3/deleteApplication
Deletes the app from the account.
Request
Response
Body Parameters
auth
required
string
API access token from Pushwoosh Control Panel.
application
required
string
Pushwoosh application code.
200: OK
{
"status_code": 200,
"status_message": "OK",
"response": null
}

For Private Offering subscriptions only.

Example
{
"request": {
"auth": "yxoPUlwqm…………pIyEX4H", // API access token from Pushwoosh Control Panel
"application": "XXXXX-XXXXX" // Pushwoosh application code
}
}

post
/getApplication

https://cp.pushwoosh.com/json/1.3/getApplication
Gets details about the app.
Request
Response
Body Parameters
auth
required
string
API access token from Pushwoosh Control Panel.
application
required
string
Pushwoosh application code.
200: OK
{
"status_code": 200,
"status_message": "OK",
"response": {
"application": {
"adm_cid": "",
"adm_secret": "",
"android_api_type": "x31",
"android_gcm_api_key": "x7836363631366236353566366236353739",
"android_sdk": "x7077",
"icon_url": null,
"ios_apple_appid": "x78343535613336333933363538333633373533356132653633366636643265373037353733363837373666366637333638326537343635373337343631373037303061353037353733363837373666366637333638323035343635373337343230343137303730",
"ios_apple_team": "x7834313732363536633663366632303464366636323639366336353230346334633433",
"ios_apple_user": "x7836313730373036633635343036313732363536633663366632643664366636323639366336353265363336663664",
"ios_gateway": "x783330",
"ios_key_management_type": "x783631373537343666",
"ios_key_password": "x7836353336363236353335333736353333",
"ios_sdk": "x7077",
"title": "0 Application For test",
"wp7_state": "x783635366536313632366336353634",
"wp7_type": "x78373536653631373537343638363536653734363936333631373436353634",
"providers": {
"ios": true,
"android": false,
"wp7": false,
"macos": true,
"blackberry": false,
"wns": false,
"adm": false,
"safari": false
},
"languages": {
"en": "34",
"zh": "12",
"sv": "7",
"de": "6",
"pt": "6"
}
}
}
}

For Private Offering subscriptions only.

{
"request": {
"auth": "yxoPUlwqm…………pIyEX4H", // API access token from Pushwoosh Control Panel
"application": "XXXXX-XXXXX" // Pushwoosh application code
}
}

post
/getApplications

https://cp.pushwoosh.com/json/1.3/getApplications
Gets the list of applications on the account. Can return result with pagination.
Request
Response
Body Parameters
auth
required
string
API access token from Pushwoosh Control Panel.
page
optional
integer
The page number for pagination.
200: OK
{
"status_code":200,
"status_message":"OK",
"response": {
"page" : 1, // Current page
"total": 2, // Total amount of pages
"applications":
{
"APPLICATION_CODE":"MyApp1",
"APPLICATION_CODE":"MyApp2"
}
}
}

For Private Offering subscriptions only.

{
"request": {
"auth": "yxoPUlwqm…………pIyEX4H", // API access token from Pushwoosh Control Panel
"page": 2 // The page number for pagination
}
}

post
/getApplicationFile

https://cp.pushwoosh.com/json/1.3/getApplicationFile
Gets the configuration files related to the app.
Request
Response
Body Parameters
auth
required
string
API access token from Pushwoosh Control Panel.
application
required
string
Pushwoosh application code.
file
required
string
Identifier of the file to retrieve. See values below.
200: OK
{
"status_code": 200,
"status_message": "OK",
"response": null
}

For Private Offering subscriptions only.

Example
{
"request": {
"auth": "yxoPUlwqm…………pIyEX4H", // API access token from Pushwoosh Control Panel
"application": "XXXXX-XXXXX", // Pushwoosh application code
"file": "ios_auto_privatekey" // identifier of the file to retrieve. See values below
}
}

Possible values for the "file" parameter: "ios_auto_privatekey" | "ios_manual_privatekey" | "ios_auto_certificate" | "ios_manual_certificate" | "ios_push_certificate" | "ios_provisioning_profile" | "macos_manual_privatekey" | "macos_manual_certificate" | "macos_push_certificate" | "safari_manual_privatekey" | "safari_push_certificate" | "safari_push_package", | "wp7_cert", "wp7_key", "wp7_ca"

Response example:

-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
-----BEGIN RSA PRIVATE KEY-----
...
-----END RSA PRIVATE KEY-----

post
/getApplicationSubscribersStats

https://cp.pushwoosh.com/json/1.3/getApplicationSubscribersStats
Displays the app's subscribers list grouped by the types of their devices.
Request
Response
Body Parameters
auth
required
string
API access token from Pushwoosh Control Panel.
application
required
string
Pushwoosh application code.
200: OK
{
"status_code": 200,
"status_message": "OK",
"response": {
"IOS": 1,
"BLACKBERRY": 0,
"ANDROID": 1,
"WINDOWS_PHONE": 0,
"OSX": 0,
"WINDOWS": 0,
"AMAZON": 0,
"SAFARI": 0,
"FIREFOX": 0
}
}

For Private Offering subscriptions only.

Example
{
"request": {
"auth": "yxoPUlwqm…………pIyEX4H", // API access token from Pushwoosh Control Panel
"application": "XXXXX-XXXXX" // Pushwoosh application code
}
}

post
/getAppStats

https://cp.pushwoosh.com/json/1.3/getAppStats
Gets the statistics of the app.
Request
Response
Body Parameters
auth
required
string
API access token from Pushwoosh Control Panel.
application
required
string
Pushwoosh application code.
datefrom
required
string
Date and time, start of the reporting period. Formatted dare: Y-m-d H:i:s
dateto
required
string
Date and time, end of the reporting period. Formatted date: Y-m-d H:i:s
200: OK
{
"status_code": 200,
"status_message": "OK",
"response": {
"request_id": "c93a202f439235f9adaaa06d651548ab"
}
}

For Private Offering subscriptions only.

Example
{
"request": {
"auth": "yxoPUlwqm…………pIyEX4H", // API access token from Pushwoosh Control Panel
"application": "XXXXX-XXXXX", // Pushwoosh application code
"datefrom": "2013-06-04 00:00:00", // date and time, start of the reporting period
"dateto": "2013-06-07 00:00:00" // date and time, end of the reporting period
}
}

Statistic displays registered actions for application, device or message, for the timeframe specified.

Reports are automatically aggregated using the following rules: yearly > 1 year monthly > 1 month daily > 1 day hourly > 3 hours minutely in other cases.

Actions: Application Level: open, install

Device Level: register, unregister

Message level: send, open

All statistics objects have the same format:

Field

Type

Description

formatter

string

report scale: yearly, monthly, daily, hourly, minutely

rows

list

report rows

Each of the report rows is a dictionary:

Field

Type

Description

count

int

registered actions count

action

string

registered action

datetime

string

Formatted date: Y-m-d H:i:s

As every scheduled request, /getAppStats request requires an additional /getResults request.

Response body:

Field

Type

Description

request_id

string

Scheduled request ID. Please check /getResults method for more information.

Scheduled (/getResults) response body:

Field

Type

Description

applications

dictionary

statistics for applications

devices

dictionary

statistics for devices

messages

dictionary

statistics for messages

Example
{
"error": {
"code": 0,
"message": "OK"
},
"json_data": {
"applications": {
"formatter": "hourly",
"rows": [{
"count": 0,
"action": "open",
"datetime": "2013-06-06 00:00:00"
}, ...
]
}
}
}

post
/setApplicationPlatformStatus

https://cp.pushwoosh.com/json/1.3/setApplicationPlatformStatus
Changes the plaform's status of the app.
Request
Response
Body Parameters
auth
required
string
API access token from Pushwoosh Control Panel.
application
required
string
Pushwoosh application code.
platform
required
integer
The platform type. See platform types list below.
status
required
string
"enable" or "disable"
200: OK
{
"status_code": 200,
"status_message": "OK",
"response": {
"message": "iOS pushes are disabled",
"available_platforms": {
"iOS": false,
"BlackBerry": false,
"Android": true,
"Windows Phone": false,
"OS X": false,
"Windows": false,
"Amazon": false,
"Safari": false,
"Chrome": true,
"Firefox": false,
"Internet Explorer 11": false
}
}
}

For Private Offering subscriptions only.

Example
{
"request": {
"application": "XXXXX-XXXXX", // Pushwoosh application code
"auth": "yxoPUlwqm…………pIyEX4H", // API access token from Pushwoosh Control Panel
"platform": 1, // 1 — iOS; 2 — BlackBerry; 3 — Android; 5 — Windows Phone; 7 — OS X; 8 — Windows 8; 9 — Amazon; 10 — Safari; 11 — Chrome; 12 — Firefox
"status": "disable" // or "enable"
}
}