Campaigns

GET https://trustely.com/api/campaigns/
curl --request GET \
--url 'https://trustely.com/api/campaigns/' \
--header 'Authorization: Bearer {api_key}' \
Parameters Details Description
page Optional Integer The page number that you want results from. Defaults to 1.
results_per_page Optional Integer How many results you want per page. Allowed values are: 10 , 25 , 50 , 100 , 250 , 500 , 1000. Defaults to 25.
{ "data": [ { "id": 1, "pixel_key": "1234567890abcdef", "name": "Example", "domain": "example.com", "branding": { "name": "", "url": "" }, "email_reports_is_enabled": true, "email_reports_last_datetime": "2019-05-22 23:40:17", "is_enabled": true, "last_datetime": null, "datetime": "2019-05-22 23:40:17" } ], "meta": { "page": 1, "results_per_page": 25, "total": 1, "total_pages": 1 }, "links": { "first": "https://trustely.com/api/campaigns?&page=1", "last": "https://trustely.com/api/campaigns?&page=1", "next": null, "prev": null, "self": "https://trustely.com/api/campaigns?&page=1" } }
GET https://trustely.com/api/campaigns/{campaign_id}
curl --request GET \
--url 'https://trustely.com/api/campaigns/{campaign_id}' \
--header 'Authorization: Bearer {api_key}' \
{ "data": { "id": 1, "pixel_key": "1234567890abcdef", "name": "Example", "domain": "example.com", "branding": { "name": "", "url": "" }, "email_reports_is_enabled": true, "email_reports_last_datetime": "2019-05-22 23:40:17", "is_enabled": true, "last_datetime": null, "datetime": "2019-05-22 23:40:17" } }
POST https://trustely.com/api/campaigns
Parameters Details Description
domain_id Optional Integer -
name Required String -
domain Required String -
branding_name Optional String -
branding_url Optional String -
email_reports Optional Array Notification handler ids
is_enabled Optional Boolean -
curl --request POST \
--url 'https://trustely.com/api/campaigns' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example' \
--form 'domain=example.com' \
{ "data": { "id": 1 } }
POST https://trustely.com/api/campaigns/{campaign_id}
Parameters Details Description
domain_id Optional Integer -
name Optional String -
domain Optional String -
branding_name Optional String -
branding_url Optional String -
email_reports Optional Array Notification handler ids
is_enabled Optional Boolean -
curl --request POST \
--url 'https://trustely.com/api/campaigns/{campaign_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'is_enabled=0' \
{ "data": { "id": 1 } }
DELETE https://trustely.com/api/campaigns/{campaign_id}
curl --request DELETE \
--url 'https://trustely.com/api/campaigns/{campaign_id}' \
--header 'Authorization: Bearer {api_key}' \