Segments

GET https://pushpilot.de/api/segments/
curl --request GET \
--url 'https://pushpilot.de/api/segments/' \
--header 'Authorization: Bearer {api_key}' \
Parameters Details Description
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,
            "user_id": 1,
            "website_id": 1,
            "name": "Example",
            "settings": {
                "subscribers_ids": [1,2,3,4,5]
            },
            "type": "custom",
            "total_subscribers": 5,
            "last_datetime": null,
            "datetime": "2025-09-17 16:04:33",
        }
    ],
    "meta": {
        "page": 1,
        "results_per_page": 25,
        "total": 1,
        "total_pages": 1
    },
    "links": {
        "first": "https://pushpilot.de/api/segments?page=1",
        "last": "https://pushpilot.de/api/segments?page=1",
        "next": null,
        "prev": null,
        "self": "https://pushpilot.de/api/segments?page=1"
    }
}
GET https://pushpilot.de/api/segments/{segment_id}
curl --request GET \
--url 'https://pushpilot.de/api/segments/{segment_id}' \
--header 'Authorization: Bearer {api_key}' \
{
    "data": {
        "id": 1,
        "user_id": 1,
        "website_id": 1,
        "name": "Example",
        "settings": {
            "subscribers_ids": [1,2,3,4,5]
        },
        "type": "filter",
        "total_subscribers": 5,
        "last_datetime": null,
        "datetime": "2025-09-17 16:04:33",
    }
}
POST https://pushpilot.de/api/segments
Parameters Details Description
website_id Required Integer -
name Required String -
type Optional String Allowed values: custom , filter
subscribers_ids Optional String Available when: segment = custom
filters_custom_parameter_key[index] Optional String Available when: segment = filter
filters_custom_parameter_condition[index] Optional String Allowed values: exact, not_exact, contains, not_contains, starts_with, not_starts_with, ends_with, not_ends_with, bigger_than, lower_than Available when: segment = filter
filters_custom_parameter_value[index] Optional String Available when: segment = filter
filters_subscribed_on_url Optional String Available when: segment = filter
filters_cities Optional String Available when: segment = filter
filters_countries[] Optional String Available when: segment = filter
filters_continents[] Optional String Available when: segment = filter
filters_device_type[] Optional String Available when: segment = filter
filters_languages[] Optional String Available when: segment = filter
filters_operating_systems[] Optional String Available when: segment = filter
filters_browsers[] Optional String Available when: segment = filter
curl --request POST \
--url 'https://pushpilot.de/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://pushpilot.de/api/segments/{segment_id}
Parameters Details Description
website_id Optional Integer -
name Optional String -
type Optional String Allowed values: custom , filter
subscribers_ids Optional String Available when: segment = custom
filters_custom_parameter_key[index] Optional String Available when: segment = filter
filters_custom_parameter_condition[index] Optional String Allowed values: exact, not_exact, contains, not_contains, starts_with, not_starts_with, ends_with, not_ends_with, bigger_than, lower_than Available when: segment = filter
filters_custom_parameter_value[index] Optional String Available when: segment = filter
filters_subscribed_on_url Optional String Available when: segment = filter
filters_cities Optional String Available when: segment = filter
filters_countries[] Optional String Available when: segment = filter
filters_continents[] Optional String Available when: segment = filter
filters_device_type[] Optional String Available when: segment = filter
filters_languages[] Optional String Available when: segment = filter
filters_operating_systems[] Optional String Available when: segment = filter
filters_browsers[] Optional String Available when: segment = filter
curl --request POST \
--url 'https://pushpilot.de/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://pushpilot.de/api/segments/{segment_id}
curl --request DELETE \
--url 'https://pushpilot.de/api/segments/{segment_id}' \
--header 'Authorization: Bearer {api_key}' \