Messaging & Notifications
An index of outbound guest communications: campaigns, trigger and service messages, notification channels.
This is an index page for outbound guest communications: campaigns, trigger messages and templates. In a typical integration a partner usually doesn’t need to send messages manually — most guest notifications (booking confirmation, reminder, status change) fire automatically in response to booking events, following the rules configured in the restaurant.
If you do need to work with campaigns or templates directly, the main endpoint groups are below, with examples. All requests require a Bearer token (see Authentication).
Inbound messages, real-time delivery statuses and the communication channels themselves (SMS, WhatsApp, Telegram, Email) are a separate Chat API service on a different host. It is not part of this documentation. Only the outbound campaigns, triggers and templates of the Host Panel API are described here.
Campaigns (Mailing)
Creating and sending campaigns to a guest segment. Base path:
/api/restaurants/{restaurantId}/mailings.
| Method | Path | Purpose |
|---|---|---|
GET | /mailings | List of campaigns (parameters Page, PageSize, MailingStatus) |
POST | /mailings | Create a campaign (body AddMailingContract) |
POST | /mailings/{mailingId}/start | Start a campaign |
GET | /mailings/segments | Segment size and recipient preview |
A campaign specifies channels (e.g. email, sms, whatsApp), segment (an audience
filter: visits, tags, average check, etc.) and per-channel content (smsText, whatsAppText,
pushTitle/pushText, emailTemplate). Once created, a campaign can be tested
(/test), started (/start) or canceled (/cancel).
curl https://api.hostmeapp.com/api/restaurants/123/mailings \ -H "Authorization: Bearer $TOKEN" \ --data-urlencode "Page=1" \ --data-urlencode "PageSize=20" \ -GTriggers (MailingTrigger)
Trigger campaigns are sent automatically on an event (e.g. after a visit or on a
particular booking status). Base path:
/api/restaurants/{restaurantId}/mailings/triggers.
| Method | Path | Purpose |
|---|---|---|
GET | /mailings/triggers | All trigger campaigns |
POST | /mailings/triggers | Create a trigger campaign with content in one request |
POST | /mailings/{mailingId}/trigger | Configure the firing condition (body TriggerFilter) |
POST | /mailings/triggers/{triggerMailingId}/activate | Activate the trigger |
The firing condition (TriggerFilter) is defined by the fields triggerType, dateMode, days,
bookingStatuses, tags, delayMinutes, sendTimeLocal — i.e. it is tied to booking
statuses, guest tags and the send delay/time.
Message templates (MessageTemplates)
Text templates by channel and language. Base path:
/api/msg/restaurants/{restaurantId}/templates.
| Method | Path | Purpose |
|---|---|---|
GET | /templates/folders | List of template folders |
GET | /templates/names | Template names (parameter folder) |
GET | /templates | Get a template (parameters name, lng) |
PUT | /templates | Save a template |
A template (MessageTemplateContract) contains name, displayName, subject, header,
content, footer, smsText, waText, pushTitle, language and a type (templateType).
curl https://api.hostmeapp.com/api/msg/restaurants/123/templates \ -H "Authorization: Bearer $TOKEN" \ --data-urlencode "name=reservation_confirmed" \ --data-urlencode "lng=ru" \ -GPossible errors — ProblemDetails, codes 400/401/403/404. General rules — see
Conventions and Errors.