活动

GET https://popupke.com/api/campaigns/
curl --request GET \
--url 'https://popupke.com/api/campaigns/' \
--header 'Authorization: Bearer {api_key}' \
参数 细节 描述
search 选修的 细绳 搜索字符串。
search_by 选修的 细绳 What field are you searching by. Allowed values are: name, domain.
is_enabled 选修的 布尔值
datetime_field 选修的 细绳 Allowed values: datetime, last_datetime
datetime_start 选修的 细绳 Filter results starting from this datetime. Y-m-d H:i:s format.
datetime_end 选修的 细绳 Filter results up to this datetime. Y-m-d H:i:s format.
order_by 选修的 细绳 What field to order the results by. Allowed values are: campaign_id, datetime, last_datetime, name, domain.
order_type 选修的 细绳 The ordering of the results. Allowed values are: ASC for ascending ordering, and DESC for descending ordering.
page 选修的 整数 The page number that you want results from. Defaults to 1.
results_per_page 选修的 整数 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": "2026-05-21 02:17:54",
        }
    ],
    "meta": {
        "page": 1,
        "results_per_page": 25,
        "total": 1,
        "total_pages": 1
    },
    "links": {
        "first": "https://popupke.com/api/campaigns?page=1",
        "last": "https://popupke.com/api/campaigns?page=1",
        "next": null,
        "prev": null,
        "self": "https://popupke.com/api/campaigns?page=1"
    }
}
GET https://popupke.com/api/campaigns/{campaign_id}
curl --request GET \
--url 'https://popupke.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": "2026-05-21 02:17:54",
    }
}
POST https://popupke.com/api/campaigns
参数 细节 描述
domain_id 选修的 整数 -
name 必需的 细绳 -
domain 必需的 细绳 -
branding_name 选修的 细绳 -
branding_url 选修的 细绳 -
email_reports 选修的 大批 Notification handler ids
is_enabled 选修的 布尔值 -
curl --request POST \
--url 'https://popupke.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://popupke.com/api/campaigns/{campaign_id}
参数 细节 描述
domain_id 选修的 整数 -
name 选修的 细绳 -
domain 选修的 细绳 -
branding_name 选修的 细绳 -
branding_url 选修的 细绳 -
email_reports 选修的 大批 Notification handler ids
is_enabled 选修的 布尔值 -
curl --request POST \
--url 'https://popupke.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://popupke.com/api/campaigns/{campaign_id}
curl --request DELETE \
--url 'https://popupke.com/api/campaigns/{campaign_id}' \
--header 'Authorization: Bearer {api_key}' \