Presets

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
"action": { // optional, object. Action to be performed once a user opens a message.
18
"type": "url", // string. Type of action. Available types: `url`, `deepLink`, `richMedia`, `openApp`(default).
19
"options": { // object. Options for action types. Required for all action types except for `openApp`.
20
"url": "http://example.com", // required for `url` action type, string. Will be shortened if shortener is defined.
21
"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.
22
"richMediaCode": "BBBBB-AAAAA", // required for `richMedia` action type, string. Rich Media code from Pushwoosh Control Panel.
23
"id": 123, // required for "deepLink" action type, integer. Deep Link ID.
24
"params": { // custom parameters, required for "deepLink" action type, array.
25
"param1": "value1",
26
"param2": "value2"
27
}
28
}
29
},
30
"userData": { // optional, object. Custom user data. Will be passed as "u" parameter in the payload (converted to JSON string).
31
"CustomData": "value"
32
},
33
"properties": {// optional, object. Specific content for different platforms.
34
// See the platform-specific examples in /createMessage request.
35
}
36
},
37
"scheduling": { // optional, object. Scheduling options.
38
"sendRate": 1000 // optional, integer. Throttling. Valid values are from 100 to 1000 pushes/second.
39
},
40
"segmentation": { // required, object. Segmentation options.
41
"filter": "FILTER NAME", // optional, string. Filter name from your Pushwoosh Control Panel.
42
"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
43
}
44
}
45
}
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!
Last modified 5d ago