Terminal
Terminal/Skill
Lets your agent manage Hostinger Reach email marketing contacts, segments, contact groups and sender profiles.
By Hostinger
Works with
npx skills add hostinger/hostinger-agent-skills --skill reachThe Reach API provides email marketing capabilities — managing contacts, creating segments for targeted campaigns, and working with sender profiles.
Contacts are email recipients in your marketing system. Each contact has basic information (name, email, surname) and a subscription status. If double opt-in is enabled, new contacts start with a pending status and receive a confirmation email.
Segments group contacts based on specific criteria (email, name, subscription status, engagement metrics, etc.). Segments support complex filtering with operators like equals, contains, gte, lte, opened, clicked, etc.
Sender profiles represent the email identity used to send campaigns. Each profile has basic information and is associated with your account.
Groups are a way to organize contacts (deprecated in favor of segments).
Contacts can have different subscription statuses that determine whether they receive emails. Status can be used as a filter when listing contacts.
# Create a new contact (direct)
curl -X POST "https://developers.hostinger.com/api/reach/v1/contacts" \
-H "Authorization: Bearer $HOSTINGER_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"email": "john@example.com",
"name": "John",
"surname": "Doe",
"phone": "+15551234567",
"note": "Met at conference"
}'
# Create a new contact (scoped to a specific sender profile)
curl -X POST "https://developers.hostinger.com/api/reach/v1/profiles/{profileUuid}/contacts" \
-H "Authorization: Bearer $HOSTINGER_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"email": "john@example.com",
"name": "John",
"surname": "Doe"
}'
# List contacts (paginated)
curl -X GET "https://developers.hostinger.com/api/reach/v1/contacts?page=1" \
-H "Authorization: Bearer $HOSTINGER_API_TOKEN"
# Filter contacts by subscription status
curl -X GET "https://developers.hostinger.com/api/reach/v1/contacts?subscription_status=active" \
-H "Authorization: Bearer $HOSTINGER_API_TOKEN"
# List contact groups
curl -X GET "https://developers.hostinger.com/api/reach/v1/contacts/groups" \
-H "Authorization: Bearer $HOSTINGER_API_TOKEN"
# Delete a contact
curl -X DELETE "https://developers.hostinger.com/api/reach/v1/contacts/{uuid}" \
-H "Authorization: Bearer $HOSTINGER_API_TOKEN"
Python SDK:
from hostinger_api import Hostinger
client = Hostinger(api_token="YOUR_API_TOKEN")
# List contacts
contacts = client.reach.contacts.list(page=1)
for contact in contacts:
print(f"{contact.name} <{contact.email}>")
TypeScript SDK:
import { Hostinger } from "hostinger-api-sdk";
const client = new Hostinger({ apiToken: "YOUR_API_TOKEN" });
const contacts = await client.reach.contacts.list({ page: 1 });
for (const contact of contacts) {
console.log(`${contact.name} <${contact.email}>`);
}
PHP SDK:
use Hostinger\Api\HostingerApi;
$client = new HostingerApi('YOUR_API_TOKEN');
$contacts = $client->reach->contacts->list(['page' => 1]);
foreach ($contacts as $contact) {
echo "{$contact->name} <{$contact->email}>\n";
}
# List all segments
curl -X GET "https://developers.hostinger.com/api/reach/v1/segmentation/segments" \
-H "Authorization: Bearer $HOSTINGER_API_TOKEN"
# Create a segment (e.g., engaged subscribers who opened emails)
curl -X POST "https://developers.hostinger.com/api/reach/v1/segmentation/segments" \
-H "Authorization: Bearer $HOSTINGER_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Engaged Subscribers",
"logic": "and",
"conditions": [
{
"field": "subscription_status",
"operator": "equals",
"value": "active"
},
{
"field": "email_engagement",
"operator": "opened"
}
]
}'
# Get segment details
curl -X GET "https://developers.hostinger.com/api/reach/v1/segmentation/segments/{segmentUuid}" \
-H "Authorization: Bearer $HOSTINGER_API_TOKEN"
# List contacts in a segment (paginated)
curl -X GET "https://developers.hostinger.com/api/reach/v1/segmentation/segments/{segmentUuid}/contacts?page=1&per_page=50" \
-H "Authorization: Bearer $HOSTINGER_API_TOKEN"
# List all sender profiles
curl -X GET "https://developers.hostinger.com/api/reach/v1/profiles" \
-H "Authorization: Bearer $HOSTINGER_API_TOKEN"
| Method | Endpoint | Description |
|---|---|---|
GET | /api/reach/v1/contacts | List contacts (paginated, filterable) |
POST | /api/reach/v1/contacts | Create a contact (direct) |
POST | /api/reach/v1/profiles/{profileUuid}/contacts | Create a contact scoped to a sender profile |
GET | /api/reach/v1/contacts/groups | List contact groups |
DELETE | /api/reach/v1/contacts/{uuid} | Delete a contact |
| Method | Endpoint | Description |
|---|---|---|
GET | /api/reach/v1/segmentation/segments | List all segments |
POST | /api/reach/v1/segmentation/segments | Create a new segment |
GET | /api/reach/v1/segmentation/segments/{segmentUuid} | Get segment details |
GET | /api/reach/v1/segmentation/segments/{segmentUuid}/contacts | List segment contacts |
| Method | Endpoint | Description |
|---|---|---|
GET | /api/reach/v1/profiles | List sender profiles |
| Parameter | Description |
|---|---|
page | Page number |
group_uuid | Filter by group UUID |
subscription_status | Filter by subscription status |
| Operator | Description |
|---|---|
equals / not_equals | Exact match |
contains / not_contains | Partial match |
gte / lte | Greater/less than or equal |
exists | Field has a value |
within_last_days / not_within_last_days | Date range |
older_than_days | Older than N days |
opened / not_opened | Email open engagement |
clicked / not_clicked | Email click engagement |
bounced / not_bounced | Bounce status |
delivered / not_delivered | Delivery status |
unsubscribed / not_unsubscribed | Unsubscribe status |
POST /contacts endpoint for general contact creation; use POST /profiles/{profileUuid}/contacts when the contact must be tied to a specific sender profileand logic for narrow, precise targetingor logic for broader audience reachopened, clicked) with time-based operators for re-engagement campaignslogic field (and/or) matches your intent