Body Required
New campaign parameters
-
name string
-
description string
-
start_date string
Optional - the date this campaign started. Format yyyy-mm-dd
-
end_date string
Optional - the date this campaign finished. Format yyyy-mm-dd
-
tracking_tag string
Optional - a unique code for this campaign.
-
campaign_type_id integer
Optional - links to a campaign type as a way of categorising campaigns
-
for_group_id integer
If the user is a clustered login, then this must be supplied. Otherwise its optional but must link to a group the login has access to.
POST
/campaign
curl \
-X POST https://YOURSITE.infoodle.com/apiv2/campaign \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"Donations","description":"All ad-hoc donations generated during the Summer campaign","start_date":"2019-02-13","end_date":"2019-02-13","tracking_tag":"CT5","campaign_type_id":6,"for_group_id":543}'
Request examples
{
"name": "Donations",
"description": "All ad-hoc donations generated during the Summer campaign",
"start_date": "2019-02-13",
"end_date": "2019-02-13",
"tracking_tag": "CT5",
"campaign_type_id": 6,
"for_group_id": 543
}
Response examples (200)
{
"id": 4325342
}
Response examples (401)
{
"error": "Unauthorised"
}
Response examples (403)
{
"error": "Invalid Permission"
}