Links
Comment on page

Presets API

List of methods for working with presets

createPreset

post
https://api.pushwoosh.com/json/1.3
/createPreset
/createPreset
Example
{
"request": {
"auth": "yxoPUlwqm…………pIyEX4H", // required, string. API access token from Pushwoosh Control Panel.
"name": "PRESET_NAME", // required, string.
"applicationCode": "XXXXX-XXXXX", // required, string. Pushwoosh application code.
"applicationGroupCode": "AAAAA-BBBBB", // optional, string. Can be used instead of "applicationCode".
"campaignCode": "CCCCC-DDDDD", // optional, string. Campaign code.
"content": { // required, object. Contains message data.
"message": { // required, string or object. Message content. In case it's a string, the default language will be used.
"en": "English message", // Message content localized for different languages. Only ISO 639-1:2002 for language codes.
"fr": "French message"
},
"title": { // optional, string or object. For multilanguage, set title for each language in the object. Ignored if platform-specific titles are specified (e.g., 'ios_title', 'android-header', etc.; see the platform-specific parameters examples in the /createMessage API).
"en": "English title", // Message content localized for different languages. Only ISO 639-1:2002 for language codes.
"fr": "French title"
},
"subtitle": { // // optional, string or object. For multilanguage, set title for each language in the object. Ignored if platform-specific subtitles are specified (e.g., 'ios_subtitle', etc.; see the platform-specific parameters examples in the /createMessage API).
"en": "English subtitle",
"fr": "French subtitle"
},
"action": { // optional, object. Action to be performed once a user opens a message.
"type": "url", // optional, string. Type of action. Available types: `url`, `deepLink`, `richMedia`, `openApp`(default).
"options": { // optional, object. Options for action types. Required for all action types except for `openApp`.
"url": "http://example.com", // required for `url` action type, string. Will be shortened if shortener is defined.
"shortener": 2, // optional, integer. Available values: 0 — do not minimize, 2 — bit.ly. If no shortener is specified, bit.ly shortener will be used by default.
"richMediaCode": "BBBBB-AAAAA", // required for `richMedia` action type, string. Rich Media code from Pushwoosh Control Panel.
"id": 123, // required for "deepLink" action type, integer. Deep Link ID.
"params": { // optional, custom parameters, required for "deepLink" action type, array.
"param1": "value1",
"param2": "value2"
}
}
},
"userData": { // optional, object. Custom user data. Will be passed as "u" parameter in the payload (converted to JSON string).
"CustomData": "value"
},
"platforms": {
"ios": {
"sound": "default",
"silent": 1,
"ttl": 604800,
"rootParams": {
"rule_id": "12345",
"screen_id": "34567"
},
"interruptionLevel": "active"
},
"android": {
"rootParams": {
"rule_id": "12345",
"screen_id": "34567"
}
}
}
},
"scheduling": { // optional, object. Scheduling options.
"sendRate": 1000 // optional, integer. Throttling. Valid values are from 100 to 1000 pushes/second.
},
"segmentation": { // required, object. Segmentation options.
"filter": "FILTER NAME", // optional, string. Filter name from your Pushwoosh Control Panel.
"platforms": [11,3] // required, array. The list of platforms IDs: 1 — iOS; 3 — Android; 7 — OS X; 8 — Windows 8; 9 — Amazon; 10 — Safari; 11 — Chrome; 12 — Firefox; ignored if "devices" < 10
}
}
}
For platform-specific parameters, please refer to /createMessage.

getPreset

post
https://api.pushwoosh.com/json/1.3
/getPreset
/getPreset
Example
{
"request":{
"auth": "yxoPUlwqm…………pIyEX4H", // required, API access token from Pushwoosh Control Panel
"preset_code": "AAAAA-BBBBB" // required, push preset code to retrieve information for
}
}

listPresets

post
https://api.pushwoosh.com/json/1.3
/listPresets
/listPresets
{
"request": {
"auth" : "yxoPUlwqm…………pIyEX4H", // required, API access token from Pushwoosh Control Panel
"application": "XXXXX-XXXXX" // required, Pushwoosh app code
}
}

deletePreset

post
https://api.pushwoosh.com/json/1.3
/deletePreset
/deletePreset
Example
{
"request": {
"auth": "yxoPUlwqm…………pIyEX4H", // required, API access token from Pushwoosh Control Panel
"preset_code": "AAAAA-BBBBB" // required, code of a preset to delete
}
}