Manual delivery
Send a campaign via our API
In addition to the message delivery options available in the Leanplum dashboard, you can also manually trigger campaign delivery via the REST API using the startCampaign action.
After selecting Manual as the delivery option in the campaign composer, the campaign top-level actions will only be delivered if Leanplum receives a startCampaign
REST API call containing the campaign ID of the campaign you want to send and a valid user ID and/or device ID.
Manually triggering a campaign will send all top-level actions. Top-level in-app actions will be made available for the user to receive when their next session is started.
Here is an example of what a startCampaign
REST API call looks like:
https://api.leanplum.com/api?appId=[ENTER_APP_ID]&clientKey=[ENTER_DEVELOPMENT_CLIENT_KEY]&apiVersion=1.0.6&action=startCampaign&userId=[ENTER_USER_ID]&campaignId=[ENTER_CAMPAIGN_ID]
The ID of the campaign is found in the URL when viewing a campaign (e.g.
www.leanplum.com/dashboard2/[APP_ID]/composer/[CAMPAIGN_ID]/audience}
). Note that there might be multiple IDs in the URL, the campaign ID is right aftercomposer/
.
For more information, please review our API docs.
Updated almost 3 years ago