קטעים
GET https://pushconsole.com/api/segments/
curl --request GET \
--url 'https://pushconsole.com/api/segments/' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://pushconsole.com/api/segments/' \
--header 'Authorization: Bearer {api_key}' \
| פרמטרים | פרטים | תיאור |
|---|---|---|
| page | אופציונלי מספר שלם | מספר העמוד שבו אתה מעוניין לקבל תוצאות. ברירת המחדל היא 1. |
| results_per_page | אופציונלי מספר שלם | כמה תוצאות אתה רוצה בכל עמוד. הערכים המותרים הם: 10 , 25 , 50 , 100 , 250 , 500 , 1000. ברירת המחדל היא 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": "2026-01-09 18:45:20",
}
],
"meta": {
"page": 1,
"results_per_page": 25,
"total": 1,
"total_pages": 1
},
"links": {
"first": "https://pushconsole.com/api/segments?page=1",
"last": "https://pushconsole.com/api/segments?page=1",
"next": null,
"prev": null,
"self": "https://pushconsole.com/api/segments?page=1"
}
}
GET https://pushconsole.com/api/segments/{segment_id}
curl --request GET \
--url 'https://pushconsole.com/api/segments/{segment_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://pushconsole.com/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": "2026-01-09 18:45:20",
}
}
POST https://pushconsole.com/api/segments
| פרמטרים | פרטים | תיאור |
|---|---|---|
| website_id | נדרש מספר שלם | - |
| name | נדרש מחרוזת | - |
| type | אופציונלי מחרוזת | ערכים מותרים: custom , filter |
| subscribers_ids | אופציונלי מחרוזת | זמין כאשר: segment = custom |
| filters_custom_parameter_key[index] | אופציונלי מחרוזת | זמין כאשר: segment = filter |
| filters_custom_parameter_condition[index] | אופציונלי מחרוזת |
ערכים מותרים: exact, not_exact, contains, not_contains, starts_with, not_starts_with, ends_with, not_ends_with, bigger_than, lower_than זמין כאשר: segment = filter |
| filters_custom_parameter_value[index] | אופציונלי מחרוזת | זמין כאשר: segment = filter |
| filters_subscribed_on_url | אופציונלי מחרוזת | זמין כאשר: segment = filter |
| filters_cities | אופציונלי מחרוזת | זמין כאשר: segment = filter |
| filters_countries[] | אופציונלי מחרוזת | זמין כאשר: segment = filter |
| filters_continents[] | אופציונלי מחרוזת | זמין כאשר: segment = filter |
| filters_device_type[] | אופציונלי מחרוזת | זמין כאשר: segment = filter |
| filters_languages[] | אופציונלי מחרוזת | זמין כאשר: segment = filter |
| filters_operating_systems[] | אופציונלי מחרוזת | זמין כאשר: segment = filter |
| filters_browsers[] | אופציונלי מחרוזת | זמין כאשר: segment = filter |
curl --request POST \
--url 'https://pushconsole.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' \
--url 'https://pushconsole.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://pushconsole.com/api/segments/{segment_id}
| פרמטרים | פרטים | תיאור |
|---|---|---|
| website_id | אופציונלי מספר שלם | - |
| name | אופציונלי מחרוזת | - |
| type | אופציונלי מחרוזת | ערכים מותרים: custom , filter |
| subscribers_ids | אופציונלי מחרוזת | זמין כאשר: segment = custom |
| filters_custom_parameter_key[index] | אופציונלי מחרוזת | זמין כאשר: segment = filter |
| filters_custom_parameter_condition[index] | אופציונלי מחרוזת |
ערכים מותרים: exact, not_exact, contains, not_contains, starts_with, not_starts_with, ends_with, not_ends_with, bigger_than, lower_than זמין כאשר: segment = filter |
| filters_custom_parameter_value[index] | אופציונלי מחרוזת | זמין כאשר: segment = filter |
| filters_subscribed_on_url | אופציונלי מחרוזת | זמין כאשר: segment = filter |
| filters_cities | אופציונלי מחרוזת | זמין כאשר: segment = filter |
| filters_countries[] | אופציונלי מחרוזת | זמין כאשר: segment = filter |
| filters_continents[] | אופציונלי מחרוזת | זמין כאשר: segment = filter |
| filters_device_type[] | אופציונלי מחרוזת | זמין כאשר: segment = filter |
| filters_languages[] | אופציונלי מחרוזת | זמין כאשר: segment = filter |
| filters_operating_systems[] | אופציונלי מחרוזת | זמין כאשר: segment = filter |
| filters_browsers[] | אופציונלי מחרוזת | זמין כאשר: segment = filter |
curl --request POST \
--url 'https://pushconsole.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' \
--url 'https://pushconsole.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://pushconsole.com/api/segments/{segment_id}
curl --request DELETE \
--url 'https://pushconsole.com/api/segments/{segment_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://pushconsole.com/api/segments/{segment_id}' \
--header 'Authorization: Bearer {api_key}' \