Campaigns

API methods to manage Campaigns

post
/createCampaign

https://cp.pushwoosh.com/json/1.3/createCampaign
Creates a push campaign within the app.
Request
Response
Body Parameters
auth
required
string
API access token from Pushwoosh Control Panel.
application
required
string
Pushwoosh application code.
name
required
string
Campaign name.
description
optional
string
Campaign description.
200: OK
{
"status_code": 200,
"status_message": "OK",
"response": {
"campaign": "XXXXX-XXXXX"
}
}

For Private Offering subscriptions only.

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

post
/deleteCampaign

https://cp.pushwoosh.com/json/1.3/deleteCampaign
Deletes a particular campaign.
Request
Response
Body Parameters
auth
required
string
API access token from Pushwoosh Control Panel.
campaign
required
string
ID of a campaign to delete.
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
"campaign": "XXXXX-XXXXX" // ID of a campaign to delete
}
}

post
/getCampaigns

https://cp.pushwoosh.com/json/1.3/getCampaigns
Retrieves the list of campaigns for the app.
Request
Response
Body Parameters
auth
required
string
API access token from Pushwoosh Control Panel.
application
required
string
Pushwoosh application code.
cursor
optional
string
Indicates the last campaign retrieved in the previous request.
limit
optional
integer
The max number of campaigns for a single response.
200: OK
{
"status_code": 200,
"status_message": "OK",
"response": {
"campaigns": [
{
"code": "7CFF3-63A7B",
"name": "CAMPAIGN_NAME_1",
"description": "DESCRIPTION1"
},
{
"code": "C284C-33DD3",
"name": "CAMPAIGN_NAME_2",
"description": "DESCRIPTION2"
}
],
"limit": 100,
"cursor": "+4PxJPhhwITD4PFsiKui1BA=="
}
}
Example
{
"request": {
"auth": "jLcRP74KodNa2UW........ztFSOJAQNAB9f5Za", // API access token from Pushwoosh Control Panel
"application": "XXXXX-XXXXX", // Pushwoosh application code
"cursor": "+4PxJPhhwITD4PFsiKui1BA==", // Indicates the last campaign retrieved in the previous request.
"limit": 100 // The max number of campaigns for a single response.
}
}