Segmentit

GET https://webpushke.com/api/segments/
curl --request GET \
--url 'https://webpushke.com/api/segments/' \
--header 'Authorization: Bearer {api_key}' \
Parametrit Yksityiskohdat Kuvaus
page Valinnainen Kokonaisluku The page number that you want results from. Defaults to 1.
results_per_page Valinnainen Kokonaisluku How many results you want per page. Allowed values are: 10 , 25 , 50 , 100 , 250 , 500 , 1000. Defaults to 25.
{ "data": [ { "id": 1, "user_id": 1, "website_id": 1, "name": "API Sample", "settings": { "subscribers_ids": [1,2,3,4,5] }, "type": "custom", "total_subscribers": 5, "last_datetime": null, "datetime": "2025-04-04 18:34:16" } ], "meta": { "page": 1, "results_per_page": 25, "total": 1, "total_pages": 1 }, "links": { "first": "https://webpushke.com/api/segments?&page=1", "last": "https://webpushke.com/api/segments?&page=1", "next": null, "prev": null, "self": "https://webpushke.com/api/segments?&page=1" } }
GET https://webpushke.com/api/segments/{segment_id}
curl --request GET \
--url 'https://webpushke.com/api/segments/{segment_id}' \
--header 'Authorization: Bearer {api_key}' \
{ "data": { "id": 1, "user_id": 1, "website_id": 1, "name": "API Sample", "settings": { "subscribers_ids": [1,2,3,4,5] }, "type": "filter", "total_subscribers": 5, "last_datetime": null, "datetime": "2025-04-04 18:34:16" } }
POST https://webpushke.com/api/segments
Parametrit Yksityiskohdat Kuvaus
website_id Pakollinen Kokonaisluku -
name Pakollinen merkkijono -
type Valinnainen merkkijono Allowed values: custom , filter
subscribers_ids Valinnainen merkkijono Available when: segment = custom
filters_custom_parameter_key[index] Valinnainen merkkijono Available when: segment = filter
filters_custom_parameter_value[index] Valinnainen merkkijono Available when: segment = filter
filters_custom_parameter_value[index] Valinnainen merkkijono Available when: segment = filter
filters_subscribed_on_url Valinnainen merkkijono Available when: segment = filter
filters_cities Valinnainen merkkijono Available when: segment = filter
filters_countries[] Valinnainen merkkijono Available when: segment = filter
filters_continents[] Valinnainen merkkijono Available when: segment = filter
filters_device_type[] Valinnainen merkkijono Available when: segment = filter
filters_languages[] Valinnainen merkkijono Available when: segment = filter
filters_operating_systems[] Valinnainen merkkijono Available when: segment = filter
filters_browsers[] Valinnainen merkkijono Available when: segment = filter
curl --request POST \
--url 'https://webpushke.com/api/segments' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example name' \
--form 'website_id=1' \
--form 'type=custom' \
--form 'subscribers_ids=1,2,3,4,5' \
{ "data": { "id": 1 } }
POST https://webpushke.com/api/segments/{segment_id}
Parametrit Yksityiskohdat Kuvaus
website_id Valinnainen Kokonaisluku -
name Valinnainen merkkijono -
type Valinnainen merkkijono Allowed values: custom , filter
subscribers_ids Valinnainen merkkijono Available when: segment = custom
filters_custom_parameter_key[index] Valinnainen merkkijono Available when: segment = filter
filters_custom_parameter_value[index] Valinnainen merkkijono Available when: segment = filter
filters_custom_parameter_value[index] Valinnainen merkkijono Available when: segment = filter
filters_subscribed_on_url Valinnainen merkkijono Available when: segment = filter
filters_cities Valinnainen merkkijono Available when: segment = filter
filters_countries[] Valinnainen merkkijono Available when: segment = filter
filters_continents[] Valinnainen merkkijono Available when: segment = filter
filters_device_type[] Valinnainen merkkijono Available when: segment = filter
filters_languages[] Valinnainen merkkijono Available when: segment = filter
filters_operating_systems[] Valinnainen merkkijono Available when: segment = filter
filters_browsers[] Valinnainen merkkijono Available when: segment = filter
curl --request POST \
--url 'https://webpushke.com/api/segments/{segment_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example name' \
--form 'website_id=1' \
--form 'type=custom' \
--form 'subscribers_ids=1,2,3,4,5' \
{ "data": { "id": 1 } }
DELETE https://webpushke.com/api/segments/{segment_id}
curl --request DELETE \
--url 'https://webpushke.com/api/segments/{segment_id}' \
--header 'Authorization: Bearer {api_key}' \