The campaign parameter in the /createMessage API corresponds to a feature called Aggregated Messages in the Pushwoosh Control Panel. This is different from the "Campaigns" found in the Customer Journey builder, and the codes from Customer Journeys cannot be used for this API parameter.
There are two ways to find the correct campaign code for your API call:
1. From the Pushwoosh Control Panel
- Navigate to Statistics → Aggregated statistics.
- Click on the specific aggregated message you want to use.
- Look at the URL in your browser's address bar. The campaign code is the value of the
campaignCodeparameter.- Example URL:
https://app.pushwoosh.com/applications/XXXXX-XXXXX/statistics/aggregated-message?campaignCode=YYYYY-YYYYY - In this example,
YYYYY-YYYYYis the code you need.
- Example URL:
2. Using the API
You can programmatically retrieve a list of all your campaigns (aggregated messages) and their codes by calling the /getCampaigns method.
POST https://api.pushwoosh.com/json/1.3/getCampaigns
The response will include a list of campaigns with their names and the correct hyphen-separated campaignCode required for the /createMessage call. For more details, please refer to the /getCampaigns API documentation.
Comments
0 comments
Please sign in to leave a comment.