Presets API

createPreset

post
https://cp.pushwoosh.com/json/1.3
/createPreset
/createPreset
Example
1
{
2
"request": {
3
"auth": "yxoPUlwqm…………pIyEX4H", // required, string. API access token from Pushwoosh Control Panel.
4
"name": "PRESET_NAME", // required, string.
5
"applicationCode": "XXXXX-XXXXX", // required, string. Pushwoosh application code.
6
"applicationGroupCode": "AAAAA-BBBBB", // optional, string. Can be used instead of "applicationCode".
7
"campaignCode": "CCCCC-DDDDD", // optional, string. Campaign code.
8
"content": { // required, array. Contains message data.
9
"message": { // required, string or object. Message content. In case it's a string, the default language will be used.
10
"en": "English message", // Message content localized for different languages. Only ISO 639-1:2002 for language codes.
11
"fr": "French message"
12
},
13
"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).
14
"en": "English title", // Message content localized for different languages. Only ISO 639-1:2002 for language codes.
15
"fr": "French title"
16
},
17
"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).
18
"en": "English subtitle",
19
"fr": "French subtitle"
20
},
21
"action": { // optional, object. Action to be performed once a user opens a message.
22
"type": "url", // string. Type of action. Available types: `url`, `deepLink`, `richMedia`, `openApp`(default).
23
"options": { // object. Options for action types. Required for all action types except for `openApp`.
24
"url": "http://example.com", // required for `url` action type, string. Will be shortened if shortener is defined.
25
"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.
26
"richMediaCode": "BBBBB-AAAAA", // required for `richMedia` action type, string. Rich Media code from Pushwoosh Control Panel.
27
"id": 123, // required for "deepLink" action type, integer. Deep Link ID.
28
"params": { // custom parameters, required for "deepLink" action type, array.
29
"param1": "value1",
30
"param2": "value2"
31
}
32
}
33
},
34
"userData": { // optional, object. Custom user data. Will be passed as "u" parameter in the payload (converted to JSON string).
35
"CustomData": "value"
36
},
37
"platforms": {
38
"ios": {
39
"sound": "default",
40
"silent": 1,
41
"ttl": 604800,
42
"rootParams": {
43
"rule_id": "12345",
44
"screen_id": "34567"
45
},
46
"interruptionLevel": "active"
47
},
48
"android": {
49
"rootParams": {
50
"rule_id": "12345",
51
"screen_id": "34567"
52
}
53
}
54
}
55
},
56
"scheduling": { // optional, object. Scheduling options.
57
"sendRate": 1000 // optional, integer. Throttling. Valid values are from 100 to 1000 pushes/second.
58
},
59
"segmentation": { // required, object. Segmentation options.
60
"filter": "FILTER NAME", // optional, string. Filter name from your Pushwoosh Control Panel.
61
"platforms": [11,3] // required, array. The list of platforms IDs: 1 — iOS; 3 — Android; 5 — Windows Phone; 7 — OS X; 8 — Windows 8; 9 — Amazon; 10 — Safari; 11 — Chrome; 12 — Firefox; ignored if "devices" < 10
62
}
63
}
64
}
Copied!
For platform-specific parameters, please refer to /createMessage.

getPreset

post
https://cp.pushwoosh.com/json/1.3
/getPreset
/getPreset
Example
1
{
2
"request":{
3
"auth": "yxoPUlwqm…………pIyEX4H", // API access token from Pushwoosh Control Panel
4
"preset_code": "AAAAA-BBBBB" // push preset code to retrieve information for
5
}
6
}
Copied!

listPresets

post
https://cp.pushwoosh.com/json/1.3
/listPresets
/listPresets
1
{
2
"request": {
3
"auth" : "yxoPUlwqm…………pIyEX4H", // API access token from Pushwoosh Control Panel
4
"application": "XXXXX-XXXXX" // Pushwoosh app code
5
}
6
}
Copied!

deletePreset

post
https://cp.pushwoosh.com/json/1.3
/deletePreset
/deletePreset
Example
1
{
2
"request": {
3
"auth": "yxoPUlwqm…………pIyEX4H", // API access token from Pushwoosh Control Panel
4
"preset_code": "AAAAA-BBBBB" // code of a preset to delete
5
}
6
}
Copied!