Сайты
GET https://popup.bz/api/campaigns/
curl --request GET \
--url 'https://popup.bz/api/campaigns/' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://popup.bz/api/campaigns/' \
--header 'Authorization: Bearer {api_key}' \
Parameters | Подробнее | Описание |
---|---|---|
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://popup.bz/api/campaigns?&page=1",
"last": "https://popup.bz/api/campaigns?&page=1",
"next": null,
"prev": null,
"self": "https://popup.bz/api/campaigns?&page=1"
}
}
GET https://popup.bz/api/campaigns/{campaign_id}
curl --request GET \
--url 'https://popup.bz/api/campaigns/{campaign_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://popup.bz/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://popup.bz/api/campaigns
Parameters | Подробнее | Описание |
---|---|---|
domain_id | Optional Integer | - |
name | Required String | - |
domain | Required String | - |
branding_name | Optional String | - |
branding_url | Optional String | - |
email_reports | Optional Массив | Идентификаторы обработчиков уведомлений |
is_enabled | Optional Boolean | - |
curl --request POST \
--url 'https://popup.bz/api/campaigns' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example' \
--form 'domain=example.com' \
--url 'https://popup.bz/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://popup.bz/api/campaigns/{campaign_id}
Parameters | Подробнее | Описание |
---|---|---|
domain_id | Optional Integer | - |
name | Optional String | - |
domain | Optional String | - |
branding_name | Optional String | - |
branding_url | Optional String | - |
email_reports | Optional Массив | Идентификаторы обработчиков уведомлений |
is_enabled | Optional Boolean | - |
curl --request POST \
--url 'https://popup.bz/api/campaigns/{campaign_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'is_enabled=0' \
--url 'https://popup.bz/api/campaigns/{campaign_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'is_enabled=0' \
{
"data": {
"id": 1
}
}
DELETE https://popup.bz/api/campaigns/{campaign_id}
curl --request DELETE \
--url 'https://popup.bz/api/campaigns/{campaign_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://popup.bz/api/campaigns/{campaign_id}' \
--header 'Authorization: Bearer {api_key}' \