Skip to main content
Events are the core signal system in MailGlyph. They let you describe what happened for a contact (for example user.signup, purchase, or email.bounce) and use that signal to automate actions.

Event sources

MailGlyph supports two event sources:
Internal events are system-generated and cannot be manually tracked through /v1/track.

System events reference

Use this table as the canonical list of built-in events you can trigger workflows with.

Email events

Contact events

Segment membership events

Segment events use a slugified segment name, for example segment.vip-users.entry.

How event ingestion works

When you call /v1/track, MailGlyph:
  1. Validates the incoming event payload (email and event are required)
  2. Creates or updates the matching contact
  3. Stores the event with its name, optional data, and timestamp
  4. Makes the event available to workflows, segments, and event query endpoints
If the workspace is at its active contact limit, MailGlyph can still create the recipient as a pending contact so event flow continues.

Event payload model

Custom events accept:

Event data types

The data object is JSON. JSON does not have a native date type, so date values should be sent as ISO 8601 strings. MailGlyph infers custom field types from received values when those fields are used in builders such as segments and workflow conditions: Use UTC date-time strings with a Z timezone suffix for date fields:
In PHP, you can produce this value with gmdate('Y-m-d\TH:i:s\Z').
If the same custom data key receives mixed types across events or contacts, MailGlyph may treat that field as a string.
Tracked events are queryable via:
  • List events (GET /events) with optional eventName filter and limit
  • List event names (GET /events/names) for unique names in your workspace
For per-event payload fields (for example bounceType, isFirstOpen, link, reason), see Webhooks.

How events are used in MailGlyph

Workflow triggers

Workflows start when a trigger event is received. You can trigger on custom events (from /v1/track) or internal events (like email.bounce or contact.unsubscribed). See Workflows. You can reference event data in workflow steps using event variables (for example {{event.subject}} or {{event.from}}).

Segment conditions

Dynamic segments can filter on event-based conditions, including:
  • Custom events (for example event.signed_up, event.purchased)
  • Email activity events (for example opens, clicks, bounces)

Webhook forwarding

A workflow can forward any trigger event to your own API with a Webhook step. This is how MailGlyph provides real-time outbound event delivery for both internal and custom events. See Webhooks.

Authentication model

  • Use the public API key for /v1/track
  • Use the secret API key for listing/querying events (/events, /events/names)
See API Keys for key management details.