Kampanjer
GET https://popupke.com/api/campaigns/
curl --request GET \
--url 'https://popupke.com/api/campaigns/' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://popupke.com/api/campaigns/' \
--header 'Authorization: Bearer {api_key}' \
| Parametere | Detaljer | Beskrivelse |
|---|---|---|
| search | Valgfri String | Søkestrengen. |
| search_by | Valgfri String | What field are you searching by. Allowed values are: name, domain. |
| is_enabled | Valgfri boolsk | |
| datetime_field | Valgfri String | Allowed values: datetime, last_datetime |
| datetime_start | Valgfri String | Filter results starting from this datetime. Y-m-d H:i:s format. |
| datetime_end | Valgfri String | Filter results up to this datetime. Y-m-d H:i:s format. |
| order_by | Valgfri String | What field to order the results by. Allowed values are: campaign_id, datetime, last_datetime, name, domain. |
| order_type | Valgfri String | The ordering of the results. Allowed values are: ASC for ascending ordering, and DESC for descending ordering. |
| page | Valgfri Heltall | The page number that you want results from. Defaults to 1. |
| results_per_page | Valgfri Heltall | 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:35",
}
],
"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}' \
--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:35",
}
}
POST https://popupke.com/api/campaigns
| Parametere | Detaljer | Beskrivelse |
|---|---|---|
| domain_id | Valgfri Heltall | - |
| name | Obligatorisk String | - |
| domain | Obligatorisk String | - |
| branding_name | Valgfri String | - |
| branding_url | Valgfri String | - |
| email_reports | Valgfri Array | Notification handler ids |
| is_enabled | Valgfri boolsk | - |
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' \
--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}
| Parametere | Detaljer | Beskrivelse |
|---|---|---|
| domain_id | Valgfri Heltall | - |
| name | Valgfri String | - |
| domain | Valgfri String | - |
| branding_name | Valgfri String | - |
| branding_url | Valgfri String | - |
| email_reports | Valgfri Array | Notification handler ids |
| is_enabled | Valgfri boolsk | - |
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' \
--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}' \
--url 'https://popupke.com/api/campaigns/{campaign_id}' \
--header 'Authorization: Bearer {api_key}' \