All URIs are relative to https://developers.hostinger.com, except if the operation defines another base path.
| Method | HTTP request | Description |
|---|---|---|
| countProfileSegmentContactsV1() | GET /api/reach/v1/profiles/{profileUuid}/segmentation/segments/{segmentUuid}/count | Count profile segment contacts |
| createANewContactSegmentV1() | POST /api/reach/v1/segmentation/segments | Create a new contact segment |
| createAProfileSegmentV1() | POST /api/reach/v1/profiles/{profileUuid}/segmentation/segments | Create a profile segment |
| deleteAProfileSegmentV1() | DELETE /api/reach/v1/profiles/{profileUuid}/segmentation/segments/{segmentUuid} | Delete a profile segment |
| getProfileSegmentDetailsV1() | GET /api/reach/v1/profiles/{profileUuid}/segmentation/segments/{segmentUuid} | Get profile segment details |
| getSegmentDetailsV1() | GET /api/reach/v1/segmentation/segments/{segmentUuid} | Get segment details |
| listProfileSegmentContactsV1() | GET /api/reach/v1/profiles/{profileUuid}/segmentation/segments/{segmentUuid}/contacts | List profile segment contacts |
| listProfileSegmentsV1() | GET /api/reach/v1/profiles/{profileUuid}/segmentation/segments | List profile segments |
| listSegmentContactsV1() | GET /api/reach/v1/segmentation/segments/{segmentUuid}/contacts | List segment contacts |
| listSegmentsV1() | GET /api/reach/v1/segmentation/segments | List segments |
| updateAProfileSegmentV1() | PUT /api/reach/v1/profiles/{profileUuid}/segmentation/segments/{segmentUuid} | Update a profile segment |
countProfileSegmentContactsV1($profileUuid, $segmentUuid): \Hostinger\Model\ReachV1ContactsSegmentsSegmentContactsCountResourceCount profile segment contacts
Count the contacts currently matching a segment without listing them. Cheaper than paging through the segment contacts endpoint when only the size is needed.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: apiToken
$config = Hostinger\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Hostinger\Api\ReachSegmentsApi(config: $config);
$profileUuid = 550e8400-e09b-41d4-a716-400055000000; // string | Profile uuid parameter
$segmentUuid = 550e8400-e09b-41d4-a716-400055000000; // string | Segment uuid parameter
try {
$result = $apiInstance->countProfileSegmentContactsV1($profileUuid, $segmentUuid);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ReachSegmentsApi->countProfileSegmentContactsV1: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| profileUuid | string | Profile uuid parameter | |
| segmentUuid | string | Segment uuid parameter |
\Hostinger\Model\ReachV1ContactsSegmentsSegmentContactsCountResource
[Back to top] [Back to API list] [Back to Model list] [Back to README]
createANewContactSegmentV1($reachV1ContactsSegmentsStoreRequest): \Hostinger\Model\ReachV1ContactsSegmentsSegmentResourceCreate a new contact segment
Create a new contact segment. This endpoint allows creating a new contact segment that can be used to organize contacts. The segment can be configured with specific criteria like email, name, subscription status, etc. Deprecated. This endpoint cannot target a profile, so it always falls back to the client's default profile and cannot create segments in any other profile. Use POST /api/reach/v1/profiles/{profileUuid}/segmentation/segments instead.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: apiToken
$config = Hostinger\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Hostinger\Api\ReachSegmentsApi(config: $config);
$reachV1ContactsSegmentsStoreRequest = new \Hostinger\Model\ReachV1ContactsSegmentsStoreRequest(); // \Hostinger\Model\ReachV1ContactsSegmentsStoreRequest
try {
$result = $apiInstance->createANewContactSegmentV1($reachV1ContactsSegmentsStoreRequest);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ReachSegmentsApi->createANewContactSegmentV1: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| reachV1ContactsSegmentsStoreRequest | \Hostinger\Model\ReachV1ContactsSegmentsStoreRequest |
\Hostinger\Model\ReachV1ContactsSegmentsSegmentResource
[Back to top] [Back to API list] [Back to Model list] [Back to README]
createAProfileSegmentV1($profileUuid, $reachV1ContactsSegmentsProfileStoreRequest): \Hostinger\Model\ReachV1ContactsSegmentsSegmentResourceCreate a profile segment
Create a segment in a profile. A segment is a saved set of conditions rather than a fixed list, so its membership changes as contacts change. Creating one does not modify any contact.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: apiToken
$config = Hostinger\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Hostinger\Api\ReachSegmentsApi(config: $config);
$profileUuid = 550e8400-e09b-41d4-a716-400055000000; // string | Profile uuid parameter
$reachV1ContactsSegmentsProfileStoreRequest = new \Hostinger\Model\ReachV1ContactsSegmentsProfileStoreRequest(); // \Hostinger\Model\ReachV1ContactsSegmentsProfileStoreRequest
try {
$result = $apiInstance->createAProfileSegmentV1($profileUuid, $reachV1ContactsSegmentsProfileStoreRequest);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ReachSegmentsApi->createAProfileSegmentV1: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| profileUuid | string | Profile uuid parameter | |
| reachV1ContactsSegmentsProfileStoreRequest | \Hostinger\Model\ReachV1ContactsSegmentsProfileStoreRequest |
\Hostinger\Model\ReachV1ContactsSegmentsSegmentResource
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteAProfileSegmentV1($profileUuid, $segmentUuid): \Hostinger\Model\CommonSuccessEmptyResourceDelete a profile segment
Delete a segment. Only the segment definition is removed. The contacts that matched it are left untouched.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: apiToken
$config = Hostinger\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Hostinger\Api\ReachSegmentsApi(config: $config);
$profileUuid = 550e8400-e09b-41d4-a716-400055000000; // string | Profile uuid parameter
$segmentUuid = 550e8400-e09b-41d4-a716-400055000000; // string | Segment uuid parameter
try {
$result = $apiInstance->deleteAProfileSegmentV1($profileUuid, $segmentUuid);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ReachSegmentsApi->deleteAProfileSegmentV1: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| profileUuid | string | Profile uuid parameter | |
| segmentUuid | string | Segment uuid parameter |
\Hostinger\Model\CommonSuccessEmptyResource
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getProfileSegmentDetailsV1($profileUuid, $segmentUuid): \Hostinger\Model\ReachV1ContactsSegmentsSegmentResourceGet profile segment details
Get a single segment of a profile, including the conditions that define it. To retrieve the contacts currently matching those conditions, use the segment contacts endpoint instead.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: apiToken
$config = Hostinger\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Hostinger\Api\ReachSegmentsApi(config: $config);
$profileUuid = 550e8400-e09b-41d4-a716-400055000000; // string | Profile uuid parameter
$segmentUuid = 550e8400-e09b-41d4-a716-400055000000; // string | Segment uuid parameter
try {
$result = $apiInstance->getProfileSegmentDetailsV1($profileUuid, $segmentUuid);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ReachSegmentsApi->getProfileSegmentDetailsV1: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| profileUuid | string | Profile uuid parameter | |
| segmentUuid | string | Segment uuid parameter |
\Hostinger\Model\ReachV1ContactsSegmentsSegmentResource
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getSegmentDetailsV1($segmentUuid): \Hostinger\Model\ReachV1ContactsSegmentsSegmentResourceGet segment details
Get details of a specific segment. This endpoint retrieves information about a single segment identified by UUID. Segments are used to organize and group contacts based on specific criteria. Deprecated. This endpoint cannot target a profile, so it always falls back to the client's default profile and cannot read segments of any other profile. Use GET /api/reach/v1/profiles/{profileUuid}/segmentation/segments/{segmentUuid} instead.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: apiToken
$config = Hostinger\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Hostinger\Api\ReachSegmentsApi(config: $config);
$segmentUuid = 550e8400-e09b-41d4-a716-400055000000; // string | Segment uuid parameter
try {
$result = $apiInstance->getSegmentDetailsV1($segmentUuid);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ReachSegmentsApi->getSegmentDetailsV1: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| segmentUuid | string | Segment uuid parameter |
\Hostinger\Model\ReachV1ContactsSegmentsSegmentResource
[Back to top] [Back to API list] [Back to Model list] [Back to README]
listProfileSegmentContactsV1($profileUuid, $segmentUuid, $page, $perPage): \Hostinger\Model\ReachListProfileSegmentContactsV1200ResponseList profile segment contacts
Retrieve contacts associated with a specific segment for a given profile. This endpoint allows you to fetch and filter contacts that belong to a particular segment, identified by its UUID, scoped to a specific profile.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: apiToken
$config = Hostinger\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Hostinger\Api\ReachSegmentsApi(config: $config);
$profileUuid = 550e8400-e09b-41d4-a716-400055000000; // string | Profile uuid parameter
$segmentUuid = 550e8400-e09b-41d4-a716-400055000000; // string | Segment uuid parameter
$page = 1; // int | Page number
$perPage = 25; // int | Number of items per page
try {
$result = $apiInstance->listProfileSegmentContactsV1($profileUuid, $segmentUuid, $page, $perPage);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ReachSegmentsApi->listProfileSegmentContactsV1: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| profileUuid | string | Profile uuid parameter | |
| segmentUuid | string | Segment uuid parameter | |
| page | int | Page number | [optional] |
| perPage | int | Number of items per page | [optional] [default to 25] |
\Hostinger\Model\ReachListProfileSegmentContactsV1200Response
[Back to top] [Back to API list] [Back to Model list] [Back to README]
listProfileSegmentsV1($profileUuid, $countType, $page, $perPage): \Hostinger\Model\ReachListProfileSegmentsV1200ResponseList profile segments
Get a paginated list of the segments defined in a profile. Each entry carries the number of contacts currently matching it, which is recalculated on read rather than stored. Use count_type to count either every matching contact or only the subscribed ones.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: apiToken
$config = Hostinger\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Hostinger\Api\ReachSegmentsApi(config: $config);
$profileUuid = 550e8400-e09b-41d4-a716-400055000000; // string | Profile uuid parameter
$countType = all; // string | Which matching contacts to count for each segment
$page = 1; // int | Page number
$perPage = 25; // int | Number of items per page
try {
$result = $apiInstance->listProfileSegmentsV1($profileUuid, $countType, $page, $perPage);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ReachSegmentsApi->listProfileSegmentsV1: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| profileUuid | string | Profile uuid parameter | |
| countType | string | Which matching contacts to count for each segment | [optional] [default to 'all'] |
| page | int | Page number | [optional] |
| perPage | int | Number of items per page | [optional] [default to 25] |
\Hostinger\Model\ReachListProfileSegmentsV1200Response
[Back to top] [Back to API list] [Back to Model list] [Back to README]
listSegmentContactsV1($segmentUuid, $page, $perPage): \Hostinger\Model\ReachListProfileSegmentContactsV1200ResponseList segment contacts
Retrieve contacts associated with a specific segment. This endpoint allows you to fetch and filter contacts that belong to a particular segment, identified by its UUID. Deprecated. This endpoint cannot target a profile, so it always falls back to the client's default profile and cannot read segments of any other profile. Use GET /api/reach/v1/profiles/{profileUuid}/segmentation/segments/{segmentUuid}/contacts instead.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: apiToken
$config = Hostinger\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Hostinger\Api\ReachSegmentsApi(config: $config);
$segmentUuid = 550e8400-e09b-41d4-a716-400055000000; // string | Segment uuid parameter
$page = 1; // int | Page number
$perPage = 25; // int | Number of items per page
try {
$result = $apiInstance->listSegmentContactsV1($segmentUuid, $page, $perPage);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ReachSegmentsApi->listSegmentContactsV1: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| segmentUuid | string | Segment uuid parameter | |
| page | int | Page number | [optional] |
| perPage | int | Number of items per page | [optional] [default to 25] |
\Hostinger\Model\ReachListProfileSegmentContactsV1200Response
[Back to top] [Back to API list] [Back to Model list] [Back to README]
listSegmentsV1(): \Hostinger\Model\ReachV1ContactsSegmentsContactSegmentResource[]List segments
Get a list of all contact segments. This endpoint returns a list of contact segments that can be used to organize contacts. Deprecated. This endpoint cannot target a profile, so it always falls back to the client's default profile and cannot list the segments of any other profile. Use GET /api/reach/v1/profiles/{profileUuid}/segmentation/segments instead.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: apiToken
$config = Hostinger\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Hostinger\Api\ReachSegmentsApi(config: $config);
try {
$result = $apiInstance->listSegmentsV1();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ReachSegmentsApi->listSegmentsV1: ', $e->getMessage(), PHP_EOL;
}This endpoint does not need any parameter.
\Hostinger\Model\ReachV1ContactsSegmentsContactSegmentResource[]
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateAProfileSegmentV1($profileUuid, $segmentUuid, $reachV1ContactsSegmentsProfileUpdateRequest): \Hostinger\Model\ReachV1ContactsSegmentsSegmentResourceUpdate a profile segment
Rename a segment and/or replace the conditions that define it. name is always required. Omit conditions to rename without touching the conditions; supply them and they replace the existing set entirely rather than being merged into it. Contacts are never modified, but which of them match the segment can change immediately.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: apiToken
$config = Hostinger\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Hostinger\Api\ReachSegmentsApi(config: $config);
$profileUuid = 550e8400-e09b-41d4-a716-400055000000; // string | Profile uuid parameter
$segmentUuid = 550e8400-e09b-41d4-a716-400055000000; // string | Segment uuid parameter
$reachV1ContactsSegmentsProfileUpdateRequest = new \Hostinger\Model\ReachV1ContactsSegmentsProfileUpdateRequest(); // \Hostinger\Model\ReachV1ContactsSegmentsProfileUpdateRequest
try {
$result = $apiInstance->updateAProfileSegmentV1($profileUuid, $segmentUuid, $reachV1ContactsSegmentsProfileUpdateRequest);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ReachSegmentsApi->updateAProfileSegmentV1: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| profileUuid | string | Profile uuid parameter | |
| segmentUuid | string | Segment uuid parameter | |
| reachV1ContactsSegmentsProfileUpdateRequest | \Hostinger\Model\ReachV1ContactsSegmentsProfileUpdateRequest |
\Hostinger\Model\ReachV1ContactsSegmentsSegmentResource
[Back to top] [Back to API list] [Back to Model list] [Back to README]