post https://external-api.xtremepush.com/api/external/list/campaign
Used to get a list of previously created campaigns. All campaigns may be returned or lists of campaign of a certain type if criteria are provided.
Examples
Get a list of all campaigns past and live. For best results, we recommend setting a limit on your query. Send several requests to obtain the full list:
curl --request POST \
--url https://external-api.xtremepush.com/api/external/list/campaign \
--header 'content-type: application/json' \
--data '{
"apptoken": "YOUR_APPTOKEN",
"limit": 50,
"offset": 0
}'
Get a list of all live campaigns:
curl --request POST \
--url https://external-api.xtremepush.com/api/external/list/campaign \
--header 'content-type: application/json' \
--data '{
"apptoken": "YOUR_APPTOKEN",
"condition": [
["active", "=", 1]
],
"limit": 50,
"offset": 0
}'
Get all automated campaigns with a schedule live and past:
curl --request POST \
--url https://external-api.xtremepush.com/api/external/list/campaign \
--header 'content-type: application/json' \
--data '{
"apptoken": "YOUR_APPTOKEN",
"condition": [
["send_type", "!=", 0]
],
"limit": 50,
"offset": 0
}'
Get the most recently created campaign:
curl --request POST \
--url https://external-api.xtremepush.com/api/external/list/campaign \
--header 'content-type: application/json' \
--data '{
"apptoken":"YOUR_APPTOKEN",
"limit": 1,
"offset": 0
}'
Review the campaign model properties page to see the available parameters.