Creates a rule. A new rule has no actions: add them with POST /v1/rules/{id}/actions, for example a webhook. Create it with isPaused: true if you want to add its actions before it starts running.
Triggers
eventruns the rule each timeeventNamehappens for you. Common events:message:sent,message:received,opened,clicked,downloaded,replied,unsubscribe:created,meetinginvites:confirmed,meetinginvites:canceled,sequencerecipients:added,sequencerecipients:exited,call:started,call:completed,poll:voted,qa:submit,reminder:triggered,mixmaxtasks:created,mixmaxtasks:completed.call:recording-availableis managed under Settings > API and is refused here.recurringruns the rule on a schedule given as an RFC 5545rrule, such asFREQ=WEEKLY;BYDAY=MO;BYHOUR=9.webhookruns the rule each time something posts JSON tohttps://gateway.mixmax.com/ir/USERID/{webhookId}, whereUSERIDis your_idandwebhookIdis an id you choose.transformsmaps the posted body into the fields the filter and actions see.salesforceDateIntervalruns the rule some days before or after a date field on Salesforce records. It is easiest to set up in the Mixmax app.
The easiest way to see the exact event names and fields is to build a rule in the Mixmax app under Rules and read it back with GET /v1/rules.
Filter
filter decides which events run the rule. It is a JSON-encoded string, not an object. Mixmax checks it against each event's fields when the event happens; it never queries a database. It uses MongoDB's query syntax: field equality, $eq, $ne, $in, $nin, $gt, $gte, $lt, $lte, $exists, $regex with $options, $and, $or and $not. Leave it out to run the rule on every event. Passing an object instead of a string fails with 400.
Mixmax adds these operators:
$timeOfDaymatches a date between two whole hours in a timezone, for example{"sent": {"$timeOfDay": {"timezone": "America/Los_Angeles", "start": 9, "end": 17}}}.endcan be earlier thanstartto wrap past midnight.$dayOfWeekmatches a date on certain days of the week, for example{"sent": {"$dayOfWeek": {"timezone": "America/Los_Angeles", "days": [1, 2, 3, 4, 5]}}}, where 0 is Sunday.$withinTimeRangematches a date withindays,hoursorminutesof now. Negative values look into the past. Add"inverse": trueto match dates outside the range.$anyRecipientmatches against theto,ccandbccaddresses at once, for example{"$anyRecipient": {"$regex": "@example\\.com$", "$options": "i"}}.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
403trigger.eventName is call:recording-available, which is managed under Settings > API.
