Comms Tools
get_email_stats
Section titled “get_email_stats”Email delivery rollup for an event: email_logs counts by status (queued/sent/delivered/opened/clicked/bounced/failed) plus the most recent campaigns (blasts and fired scheduled sends) with per-campaign sent/failed counts derived from the log. Campaign ids can be used as send_history_campaign_id in preview_email_blast_audience / send_email_blast. Drill into individual recipients with list_email_logs.
Access: Read | Scope: Event
| Parameter | Type | Required | Description |
|---|---|---|---|
event_id |
integer | Yes | ID of the event to operate on (see list_events). Must belong to an organization your key can access. |
list_email_logs
Section titled “list_email_logs”List individual email sends logged for this event (blasts, scheduled sends, registration confirmations, transactional). Filter by status and search by recipient email or subject. Returns recipient, subject, status, error message (for failures) and the sent/delivered/opened/clicked timestamps. Notify fallback emails (sent only to people who did not open the app notification) are never listed per person: notify_fallback holds one line per Notify message with its count (“Fewer than 3” when small) when no search or status filter is set.
Access: Read | Scope: Event
| Parameter | Type | Required | Description |
|---|---|---|---|
event_id |
integer | Yes | ID of the event to operate on (see list_events). Must belong to an organization your key can access. |
status |
string | No | Only return logs with this delivery status. One of: queued, sent, delivered, opened, clicked, bounced, failed. |
search |
string | No | Match against recipient email or subject (substring). |
page |
integer | No | Page number (1-based). Default: 1. |
per_page |
integer | No | Rows per page, max 100. Default: 25. |
preview_email_blast_audience
Section titled “preview_email_blast_audience”Dry-run the audience for an email blast - no email is sent. Resolves the targeting parameters exactly like a real send, including the organization suppression-list filtering (bounced/complained/unsubscribed recipients are dropped), and returns recipient_count (the number a send would actually queue), suppressed_count, and up to 10 sample recipients. ALWAYS call this before send_email_blast: pass the returned recipient_count as its expected_recipient_count, with identical targeting parameters.
Access: Read | Scope: Event
| Parameter | Type | Required | Description |
|---|---|---|---|
event_id |
integer | Yes | ID of the event to operate on (see list_events). Must belong to an organization your key can access. |
targeting_mode |
string | Yes | “all” = every attendee; “specific” = only selected_attendee_ids; “filter” = attendees matching the check-in / registration-date / custom-field filters. One of: all, specific, filter. |
selected_attendee_ids |
array of integer | No | Attendee IDs to target (targeting_mode “specific”). IDs from other events simply never match. |
include_guests |
boolean | No | Also email the group guests (additional people on a group booking) who have their own email address, for targeting_mode “all” or “filter”. Each guest gets their own personalised email. Guests share the booking QR ({{attendee_qr}}) and have no RSVP or survey link, so {{event_rsvp_link}} and {{survey_link}} render empty for them. A guest is left out when their booker is excluded (same status rules), and a guest sharing the booker inbox is skipped when the booker is also emailed. Ignored in “specific” mode: pick guests with selected_guest_ids instead. Default false. |
selected_guest_ids |
array of integer | No | Group guest IDs to target (targeting_mode “specific”; the id of a “guest” row in the preview_email_blast_audience sample). Every id must belong to this event. |
target_checked_in |
boolean | No | Filter mode: include checked-in attendees. Combined with target_not_checked_in: both true (or both false) means no check-in constraint. |
target_not_checked_in |
boolean | No | Filter mode: include attendees who have NOT checked in. |
registration_date_from |
string | No | Filter mode: only attendees registered on/after this date (YYYY-MM-DD). |
registration_date_to |
string | No | Filter mode: only attendees registered on/before this date (YYYY-MM-DD). |
custom_field_filters |
array of object | No | Filter mode: match attendee custom-field answers, e.g. [{“field”:“company”,“value”:“Contoso”}]. All filters must match (AND). |
send_history_mode |
string | No | Compose with any targeting mode: “exclude_sent” skips anyone the referenced campaign was successfully handed off to; “exclude_received” skips only confirmed-delivered/opened/clicked; “only_failed” targets ONLY recipients whose send failed/bounced. Requires send_history_campaign_id (see get_email_stats). One of: none, exclude_sent, exclude_received, only_failed. |
send_history_campaign_id |
integer | No | EmailCampaign id from get_email_stats that send_history_mode matches against. Ids from other events are ignored. |
include_all_statuses |
boolean | No | Default false: rejected / declined guests, failed / refunded / cancelled payments and (manual-payment events) unpaid registrations are left out. true includes everyone. |
validate_mjml
Section titled “validate_mjml”Compile MJML markup server-side and report whether it is valid - nothing is sent or stored. Use this to iterate on a design before passing the same mjml string to send_email_blast / schedule_email_blast. On failure the MJML parse/validation errors are returned with line numbers. <mj-include> is not allowed; max 100 KB.
Access: Read | Scope: None
| Parameter | Type | Required | Description |
|---|---|---|---|
mjml |
string | Yes | A complete MJML document (<mjml><mj-body>…</mj-body></mjml>). |
send_email_blast
Section titled “send_email_blast”SENDS EMAIL to every attendee of this event matching the targeting parameters - potentially the entire attendee list. This is the highest-risk tool on this server: emails are queued immediately and cannot be recalled. You MUST run preview_email_blast_audience first with the same targeting parameters and pass its recipient_count as expected_recipient_count; this tool REFUSES to send (reporting the actual count) if the live audience differs, so a stale preview can never mis-send. Suppressed recipients are excluded automatically. body_paragraphs render as paragraphs in the standard EventHAUS email shell with the event’s email branding; paragraphs, button label/url, subject and preview_text support merge tags substituted per recipient: {{attendee_first_name}}, {{attendee_last_name}}, {{attendee_name}}, {{attendee_email}}, {{event_name}}, {{event_date}}, {{event_time}}, {{event_venue}}, {{event_url}}, {{attendee_qr}} (check-in QR image), {{organization_name}}, plus {{attendee_<custom_field_key>}} for registration custom fields. TWO CONTENT MODES (exactly one): body_paragraphs (+ optional button) renders in the branded EventHAUS shell; OR mjml - a complete MJML document compiled server-side for a fully custom design (validate with validate_mjml first; no branding shell is applied, you control the whole layout; the same merge tags work; the white-label footer and inbox preview text are still appended automatically per recipient, so do not add your own). Sends through the same pipeline as the web Email Blast composer: an EmailCampaign row is created (usable later for send-history targeting) and one queued job per recipient writes to email_logs. Requires confirm=true.
Access: Write | Scope: Event
| Parameter | Type | Required | Description |
|---|---|---|---|
event_id |
integer | Yes | ID of the event to operate on (see list_events). Must belong to an organization your key can access. |
subject |
string | Yes | Email subject (max 255). Merge tags like {{attendee_first_name}} or {{event_name}} are substituted per recipient. |
body_paragraphs |
array of string | No | SIMPLE MODE (exactly one of body_paragraphs / mjml): body text, one string per paragraph (each max 5000 chars). Rendered in the standard EventHAUS email shell with the event’s email branding (header, colours, footer). Basic inline HTML (<strong>, <a href>) and merge tags ({{attendee_first_name}}, {{event_name}}, {{event_url}}, {{attendee_qr}}, {{attendee_<custom_field_key>}}, …) are supported and substituted per recipient. |
mjml |
string | No | DESIGN MODE (exactly one of body_paragraphs / mjml): a complete MJML document (<mjml><mj-body>…</mj-body></mjml>, max 100 KB) compiled server-side - full control over layout, sections, columns, images and buttons; no branding shell is applied. Merge tags work exactly as in simple mode (keep them literal - they substitute per recipient at send time). The white-label footer and preview text are appended automatically, so do not include your own. <mj-include> is not allowed. Validate with validate_mjml before sending. Not combinable with button. |
button |
object | No | Optional call-to-action button rendered after the paragraphs (Outlook-safe VML). |
preview_text |
string | No | Optional inbox preview snippet shown after the subject (max 255). Merge tags supported. |
targeting_mode |
string | Yes | “all” = every attendee; “specific” = only selected_attendee_ids; “filter” = attendees matching the check-in / registration-date / custom-field filters. One of: all, specific, filter. |
selected_attendee_ids |
array of integer | No | Attendee IDs to target (targeting_mode “specific”). IDs from other events simply never match. |
include_guests |
boolean | No | Also email the group guests (additional people on a group booking) who have their own email address, for targeting_mode “all” or “filter”. Each guest gets their own personalised email. Guests share the booking QR ({{attendee_qr}}) and have no RSVP or survey link, so {{event_rsvp_link}} and {{survey_link}} render empty for them. A guest is left out when their booker is excluded (same status rules), and a guest sharing the booker inbox is skipped when the booker is also emailed. Ignored in “specific” mode: pick guests with selected_guest_ids instead. Default false. |
selected_guest_ids |
array of integer | No | Group guest IDs to target (targeting_mode “specific”; the id of a “guest” row in the preview_email_blast_audience sample). Every id must belong to this event. |
target_checked_in |
boolean | No | Filter mode: include checked-in attendees. Combined with target_not_checked_in: both true (or both false) means no check-in constraint. |
target_not_checked_in |
boolean | No | Filter mode: include attendees who have NOT checked in. |
registration_date_from |
string | No | Filter mode: only attendees registered on/after this date (YYYY-MM-DD). |
registration_date_to |
string | No | Filter mode: only attendees registered on/before this date (YYYY-MM-DD). |
custom_field_filters |
array of object | No | Filter mode: match attendee custom-field answers, e.g. [{“field”:“company”,“value”:“Contoso”}]. All filters must match (AND). |
send_history_mode |
string | No | Compose with any targeting mode: “exclude_sent” skips anyone the referenced campaign was successfully handed off to; “exclude_received” skips only confirmed-delivered/opened/clicked; “only_failed” targets ONLY recipients whose send failed/bounced. Requires send_history_campaign_id (see get_email_stats). One of: none, exclude_sent, exclude_received, only_failed. |
send_history_campaign_id |
integer | No | EmailCampaign id from get_email_stats that send_history_mode matches against. Ids from other events are ignored. |
include_all_statuses |
boolean | No | Default false: rejected / declined guests, failed / refunded / cancelled payments and (manual-payment events) unpaid registrations are left out. true includes everyone. |
expected_recipient_count |
integer | Yes | The recipient_count returned by preview_email_blast_audience for these exact targeting parameters. The send is refused if the live audience differs. |
confirm |
boolean | Yes | Must be true. Confirms you intend to email every matching attendee immediately; queued emails cannot be recalled. |
schedule_email_blast
Section titled “schedule_email_blast”SENDS EMAIL at a future time: creates a pending scheduled email blast for this event. The audience is re-resolved when the schedule fires (attendees who register or check in between now and then are included/excluded by the same targeting rules, and the suppression list is re-applied), so no expected_recipient_count handshake is needed - but run preview_email_blast_audience anyway to sanity-check the targeting. Content matches send_email_blast (body_paragraphs + optional button, OR a complete mjml document - same merge tags, validate with validate_mjml first). schedule_type “fixed_date” needs scheduled_date + scheduled_time (event timezone); “relative_to_event” needs days_before_event + send_time. Manage with list_scheduled_emails / cancel_scheduled_email until it starts sending. Requires confirm=true.
Access: Write | Scope: Event
| Parameter | Type | Required | Description |
|---|---|---|---|
event_id |
integer | Yes | ID of the event to operate on (see list_events). Must belong to an organization your key can access. |
name |
string | Yes | Internal name for this scheduled email (shown in the admin list). |
subject |
string | Yes | Email subject (max 255). Merge tags like {{attendee_first_name}} or {{event_name}} are substituted per recipient. |
body_paragraphs |
array of string | No | SIMPLE MODE (exactly one of body_paragraphs / mjml): body text, one string per paragraph (each max 5000 chars). Rendered in the standard EventHAUS email shell with the event’s email branding (header, colours, footer). Basic inline HTML (<strong>, <a href>) and merge tags ({{attendee_first_name}}, {{event_name}}, {{event_url}}, {{attendee_qr}}, {{attendee_<custom_field_key>}}, …) are supported and substituted per recipient. |
mjml |
string | No | DESIGN MODE (exactly one of body_paragraphs / mjml): a complete MJML document (<mjml><mj-body>…</mj-body></mjml>, max 100 KB) compiled server-side - full control over layout, sections, columns, images and buttons; no branding shell is applied. Merge tags work exactly as in simple mode (keep them literal - they substitute per recipient at send time). The white-label footer and preview text are appended automatically, so do not include your own. <mj-include> is not allowed. Validate with validate_mjml before sending. Not combinable with button. |
button |
object | No | Optional call-to-action button rendered after the paragraphs (Outlook-safe VML). |
preview_text |
string | No | Optional inbox preview snippet shown after the subject (max 255). Merge tags supported. |
targeting_mode |
string | Yes | “all” = every attendee; “specific” = only selected_attendee_ids; “filter” = attendees matching the check-in / registration-date / custom-field filters. One of: all, specific, filter. |
selected_attendee_ids |
array of integer | No | Attendee IDs to target (targeting_mode “specific”). IDs from other events simply never match. |
include_guests |
boolean | No | Also email the group guests (additional people on a group booking) who have their own email address, for targeting_mode “all” or “filter”. Each guest gets their own personalised email. Guests share the booking QR ({{attendee_qr}}) and have no RSVP or survey link, so {{event_rsvp_link}} and {{survey_link}} render empty for them. A guest is left out when their booker is excluded (same status rules), and a guest sharing the booker inbox is skipped when the booker is also emailed. Ignored in “specific” mode: pick guests with selected_guest_ids instead. Default false. |
selected_guest_ids |
array of integer | No | Group guest IDs to target (targeting_mode “specific”; the id of a “guest” row in the preview_email_blast_audience sample). Every id must belong to this event. |
target_checked_in |
boolean | No | Filter mode: include checked-in attendees. Combined with target_not_checked_in: both true (or both false) means no check-in constraint. |
target_not_checked_in |
boolean | No | Filter mode: include attendees who have NOT checked in. |
registration_date_from |
string | No | Filter mode: only attendees registered on/after this date (YYYY-MM-DD). |
registration_date_to |
string | No | Filter mode: only attendees registered on/before this date (YYYY-MM-DD). |
custom_field_filters |
array of object | No | Filter mode: match attendee custom-field answers, e.g. [{“field”:“company”,“value”:“Contoso”}]. All filters must match (AND). |
send_history_mode |
string | No | Compose with any targeting mode: “exclude_sent” skips anyone the referenced campaign was successfully handed off to; “exclude_received” skips only confirmed-delivered/opened/clicked; “only_failed” targets ONLY recipients whose send failed/bounced. Requires send_history_campaign_id (see get_email_stats). One of: none, exclude_sent, exclude_received, only_failed. |
send_history_campaign_id |
integer | No | EmailCampaign id from get_email_stats that send_history_mode matches against. Ids from other events are ignored. |
include_all_statuses |
boolean | No | Default false: rejected / declined guests, failed / refunded / cancelled payments and (manual-payment events) unpaid registrations are left out. true includes everyone. |
schedule_type |
string | Yes | “fixed_date” sends at scheduled_date+scheduled_time; “relative_to_event” sends days_before_event days before the event start, at send_time. One of: fixed_date, relative_to_event. |
scheduled_date |
string | No | YYYY-MM-DD, interpreted in the event timezone. Required for fixed_date. |
scheduled_time |
string | No | 24h HH:MM, event timezone. Required for fixed_date. |
days_before_event |
integer | No | Days before the event start (0 to 365). Required for relative_to_event. |
send_time |
string | No | 24h HH:MM, event timezone. Required for relative_to_event. |
confirm |
boolean | Yes | Must be true. Confirms a real email blast will be sent to matching attendees when the schedule fires. |
list_scheduled_emails
Section titled “list_scheduled_emails”List scheduled emails for this event: status (draft/pending (live)/paused/processing/sent/failed/cancelled), kind, name, subject, schedule config (fixed date or relative-to-event, with relative_anchor), and sent/failed counts for fired ones. Rows with can_be_cancelled=true can be cancelled with cancel_scheduled_email.
Access: Read | Scope: Event
| Parameter | Type | Required | Description |
|---|---|---|---|
event_id |
integer | Yes | ID of the event to operate on (see list_events). Must belong to an organization your key can access. |
page |
integer | No | Page number (1-based). Default: 1. |
per_page |
integer | No | Rows per page, max 100. Default: 25. |
cancel_scheduled_email
Section titled “cancel_scheduled_email”Cancel a draft, live (pending) or paused scheduled email for this event so it never sends. Sending (processing), sent, failed and cancelled entries are refused, matching the web UI. Find ids via list_scheduled_emails.
Access: Write | Scope: Event
| Parameter | Type | Required | Description |
|---|---|---|---|
event_id |
integer | Yes | ID of the event to operate on (see list_events). Must belong to an organization your key can access. |
scheduled_email_id |
integer | Yes | ID of the scheduled email (must belong to this event). |
confirm |
boolean | Yes | Must be true. The scheduled email will be permanently cancelled and will not send. |
get_registration_email_settings
Section titled “get_registration_email_settings”Registration (“your pass is ready”) confirmation email settings for this event: subject, whether a custom body is enabled (use_custom), whether it auto-sends on approval (auto_send), reply-to and CC. The email body itself is an MJML document - edit it in the web UI (Event → Registration Email editor); it is not exposed or editable here.
Access: Read | Scope: Event
| Parameter | Type | Required | Description |
|---|---|---|---|
event_id |
integer | Yes | ID of the event to operate on (see list_events). Must belong to an organization your key can access. |
list_message_logs
Section titled “list_message_logs”SMS / WhatsApp / Telegram messages logged for this event (virtual-queue notifications, WhatsApp QR sends, etc.). Recipient phone numbers are masked (first 4 + last 2 characters kept). Returns channel, direction, masked recipient, status, the template name or a message summary, error code for failures, and timestamps. Notify fallback texts are never listed per person: notify_fallback holds one line per Notify message and channel with its count (“Fewer than 3” when small) and cost, when no status filter is set.
Access: Read | Scope: Event
| Parameter | Type | Required | Description |
|---|---|---|---|
event_id |
integer | Yes | ID of the event to operate on (see list_events). Must belong to an organization your key can access. |
channel |
string | No | Only return messages on this channel. One of: sms, whatsapp, telegram. |
status |
string | No | Only return messages with this delivery status. One of: queued, sending, sent, delivered, undelivered, failed. |
page |
integer | No | Page number (1-based). Default: 1. |
per_page |
integer | No | Rows per page, max 100. Default: 25. |
