活动

GET https://0dm.site/api/campaigns/
curl --request GET \
--url 'https://0dm.site/api/campaigns/' \
--header 'Authorization: Bearer {api_key}' \
参数 细节 描述
page 选修的 整数 您想要结果的页码。默认为1
results_per_page 选修的 整数 您希望每页有多少个结果。允许的值为:10 , 25 , 50 , 100 , 250 , 500 , 1000。默认为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://0dm.site/api/campaigns?&page=1", "last": "https://0dm.site/api/campaigns?&page=1", "next": null, "prev": null, "self": "https://0dm.site/api/campaigns?&page=1" } }
GET https://0dm.site/api/campaigns/{campaign_id}
curl --request GET \
--url 'https://0dm.site/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://0dm.site/api/campaigns
参数 细节 描述
domain_id 选修的 整数 -
name 必需的 细绳 -
domain 必需的 细绳 -
branding_name 选修的 细绳 -
branding_url 选修的 细绳 -
email_reports 选修的 大批 通知处理程序 ID
is_enabled 选修的 布尔值 -
curl --request POST \
--url 'https://0dm.site/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://0dm.site/api/campaigns/{campaign_id}
参数 细节 描述
domain_id 选修的 整数 -
name 选修的 细绳 -
domain 选修的 细绳 -
branding_name 选修的 细绳 -
branding_url 选修的 细绳 -
email_reports 选修的 大批 通知处理程序 ID
is_enabled 选修的 布尔值 -
curl --request POST \
--url 'https://0dm.site/api/campaigns/{campaign_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'is_enabled=0' \
{ "data": { "id": 1 } }
DELETE https://0dm.site/api/campaigns/{campaign_id}
curl --request DELETE \
--url 'https://0dm.site/api/campaigns/{campaign_id}' \
--header 'Authorization: Bearer {api_key}' \