By default, all messages sent using the /createMessage API automatically respect the Global Frequency Capping rules you have configured in your Pushwoosh Control Panel. You do not need to add any special parameters for this standard behavior.
Applying a Custom, Per-Message Cap
If you want to apply a different, more specific frequency cap for a particular API message, you can use the capping_days and capping_count parameters within the notifications object of your request.
capping_days: An integer representing the period in days for the cap (maximum 30).capping_count: An integer for the maximum number of pushes a device can receive within thecapping_daysperiod.
If a message exceeds this custom limit for a device, it will not be sent to that device.
Example Request with Custom Capping:
{
"request": {
"application": "XXXXX-XXXXX",
"auth": "YOUR_API_ACCESS_TOKEN",
"notifications": [
{
"send_date": "now",
"content": "This message has a custom frequency cap.",
"devices": ["device_hwid"],
"capping_days": 7,
"capping_count": 3
}
]
}
}
In this example, the message will only be sent if the device has received fewer than 3 pushes from this app in the last 7 days.
Important: Using a custom frequency cap does not bypass the Global Frequency Capping rules. All messages are still counted toward the global cap. If a user has already reached their global limit, the message will be blocked even if the custom cap would have allowed it.
Bypassing Frequency Capping
For critical messages that must be delivered regardless of any limits, you can use the capping_avoid: true and capping_exclude: true parameters to bypass all frequency capping rules.
Comments
0 comments
Please sign in to leave a comment.