Segmenti
GET https://invionotifiche.it/api/segments/
curl --request GET \
--url 'https://invionotifiche.it/api/segments/' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://invionotifiche.it/api/segments/' \
--header 'Authorization: Bearer {api_key}' \
| Parametri | Dettagli | Descrizione |
|---|---|---|
| page | Opzionale Intero | Il numero di pagina da cui vuoi i risultati. Predefinito a 1. |
| results_per_page | Opzionale Intero | Quanti risultati vuoi per pagina. I valori consentiti sono: 10 , 25 , 50 , 100 , 250 , 500 , 1000. Il valore predefinito è 25. |
{
"data": [
{
"id": 1,
"user_id": 1,
"name": "Example",
"settings": {
"contacts_ids": [1,2,3,4,5]
},
"type": "custom",
"total_contacts": 5,
"last_datetime": null,
"datetime": "2026-01-21 21:10:26",
}
],
"meta": {
"page": 1,
"results_per_page": 25,
"total": 1,
"total_pages": 1
},
"links": {
"first": "https://invionotifiche.it/api/segments?page=1",
"last": "https://invionotifiche.it/api/segments?page=1",
"next": null,
"prev": null,
"self": "https://invionotifiche.it/api/segments?page=1"
}
}
GET https://invionotifiche.it/api/segments/{segment_id}
curl --request GET \
--url 'https://invionotifiche.it/api/segments/{segment_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://invionotifiche.it/api/segments/{segment_id}' \
--header 'Authorization: Bearer {api_key}' \
{
"data": {
"id": 1,
"user_id": 1,
"name": "Example",
"settings": {
"contacts_ids": [1,2,3,4,5]
},
"type": "filter",
"total_contacts": 5,
"last_datetime": null,
"datetime": "2026-01-21 21:10:26",
}
}
POST https://invionotifiche.it/api/segments
| Parametri | Dettagli | Descrizione |
|---|---|---|
| name | Richiesto Stringa | - |
| type | Opzionale Stringa | Valori consentiti: bulk , custom , filter |
| phone_numbers | Opzionale Stringa | Disponibile quando: segment = bulk |
| contacts_ids | Opzionale Stringa | Disponibile quando: segment = custom |
| filters_custom_parameter_key[index] | Opzionale Stringa | Disponibile quando: segment = filter |
| filters_custom_parameter_condition[index] | Opzionale Stringa |
Valori consentiti: exact, not_exact, contains, not_contains, starts_with, not_starts_with, ends_with, not_ends_with, bigger_than, lower_than Disponibile quando: segment = filter |
| filters_custom_parameter_value[index] | Opzionale Stringa | Disponibile quando: segment = filter |
| filters_countries[] | Opzionale Stringa | Disponibile quando: segment = filter |
| filters_continents[] | Opzionale Stringa | Disponibile quando: segment = filter |
curl --request POST \
--url 'https://invionotifiche.it/api/segments' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example name' \
--form 'type=custom' \
--form 'contacts_ids=1,2,3,4,5' \
--url 'https://invionotifiche.it/api/segments' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example name' \
--form 'type=custom' \
--form 'contacts_ids=1,2,3,4,5' \
{
"data": {
"id": 1
}
}
POST https://invionotifiche.it/api/segments/{segment_id}
| Parametri | Dettagli | Descrizione |
|---|---|---|
| name | Opzionale Stringa | - |
| type | Opzionale Stringa | Valori consentiti: bulk , custom , filter |
| phone_numbers | Opzionale Stringa | Disponibile quando: segment = bulk |
| contacts_ids | Opzionale Stringa | Disponibile quando: segment = custom |
| filters_custom_parameter_key[index] | Opzionale Stringa | Disponibile quando: segment = filter |
| filters_custom_parameter_condition[index] | Opzionale Stringa |
Valori consentiti: exact, not_exact, contains, not_contains, starts_with, not_starts_with, ends_with, not_ends_with, bigger_than, lower_than Disponibile quando: segment = filter |
| filters_custom_parameter_value[index] | Opzionale Stringa | Disponibile quando: segment = filter |
| filters_countries[] | Opzionale Stringa | Disponibile quando: segment = filter |
| filters_continents[] | Opzionale Stringa | Disponibile quando: segment = filter |
curl --request POST \
--url 'https://invionotifiche.it/api/segments/{segment_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example name' \
--form 'type=custom' \
--form 'contacts_ids=1,2,3,4,5' \
--url 'https://invionotifiche.it/api/segments/{segment_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example name' \
--form 'type=custom' \
--form 'contacts_ids=1,2,3,4,5' \
{
"data": {
"id": 1
}
}
DELETE https://invionotifiche.it/api/segments/{segment_id}
curl --request DELETE \
--url 'https://invionotifiche.it/api/segments/{segment_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://invionotifiche.it/api/segments/{segment_id}' \
--header 'Authorization: Bearer {api_key}' \