Guides
How automations work
You sync, Meisa reacts
An automation is a trigger plus optional conditions plus actions. Your team builds them in the dashboard — you don't create them via the API. But every automation runs as a side effect of the API calls you already make.
So a plan upgrade in your app becomes one line of integration code — an upsert — and Meisa does the rest:
# After a successful upgrade, just sync the new state:
POST /contacts/upsert/
{ "email": "[email protected]", "custom_fields": { "plan": "pro" } }
# Meisa detects plan changed free -> pro and runs your automation:
# - remove tag "free-plan", add tag "paying-customer"
# - enroll in the "welcome-pro" sequence
# No extra API calls from you.Triggers your API calls can fire
| Trigger | Fires when |
|---|---|
contact_created | The first upsert of a new contact. |
contact_updated | An upsert that changes fields (the changed fields, including custom_fields.*, are available to conditions). |
tag_added | A tag is added (via tag_names on upsert, or add_tag). |
tag_removed | A tag is removed. |
custom_event | You POST to /events/track/ with a matching event_name. |
sequence_enrolled | A contact is enrolled in a sequence. |
Automations can also act on conditions over the contact (segment-style rules on fields and tags). Actions include adding/removing tags, updating a custom field, enrolling or removing from a sequence, and sending a notification.
Mapping your needs to the API
| When you want to… | …your app does this |
|---|---|
| Send a one-time code / receipt / password reset | POST /emails/trigger/ with a trigger_key |
| Start onboarding on signup | Upsert the user; an automation enrolls them |
| Tag/segment by plan, churn, or upgrade | Upsert the changed field; an automation tags them |
| React to an in-product action | POST /events/track/ with an event_name |
| Avoid emailing unsubscribed/bounced users | Poll /contacts/api/unsubscribed-emails/ and suppress locally |
| Send a marketing announcement to a segment | Do it in the dashboard — not via this API |
Example automations
| When | Then |
|---|---|
| plan changes from free to any paid value | Add tag paying-customer, remove free-plan, enroll in welcome-pro |
| plan changes to churned | Add tag churned, enroll in win-back sequence |
| custom event feature_activated is tracked | Send a power-user tips email |
| onboarding_completed becomes true | Remove from onboarding sequence, add tag activated |
The takeaway for your integration
Sync the fields and events your automations key off of, and you're done. You don't reimplement lifecycle logic in your app — you keep Meisa fed with accurate state and let your team own the rules.