Messages on a plan
The individual emails and texts. All three endpoints require settings:write.
The fields are identical to a program message โ same channels, audiences, anchors and offsets โ because it is the same engine. Session-based anchors (each_session, session_number) only mean anything on a program's plan.
Add a messageโ
POST /v1/message-plans/{id}/messages
Bodyโ
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | Short internal label; the customer never sees it |
channel | string | yes | email or sms |
audience | string | no | participants, booking_contact or both |
anchor | string | no | What the timing is measured against |
offset_value | integer | no | 0โ365. 0 means straight away |
offset_unit | string | no | minutes, hours, days, weeks |
offset_direction | string | no | before or after |
send_at_local_time | string | no | HH:MM. Day- and week-grained sends land on this clock time |
fixed_at | datetime | no | With anchor=fixed_date |
subject | string | no | Email only |
email_blocks | array | no | The visual editor's blocks |
sms_body | string | no | Text only, max 640 |
enabled | boolean | no | false pauses it without removing it |
before_confirmation | boolean | no | true sends it the moment they book, just before the booking confirmation. Its timing is set to straight away after they book; giving it any other timing sets this back to false. Ignored on a program's plan |
position | integer | no | Order in the plan; defaults to the end |
curl -X POST "https://app.equipdash.com/api/v1/message-plans/8/messages" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Bring it back on time",
"channel": "email",
"audience": "booking_contact",
"offset_value": 1,
"offset_unit": "days",
"offset_direction": "before",
"subject": "Your return is due {{end_date}}"
}'
Returns 201 with the message, including a plain-English timing.summary.
Merge tagsโ
Usable in subject, sms_body and text blocks. On a program's plan the program tags apply instead (see Program Messages).
{{first_name}} {{last_name}} {{booking_reference}} {{what_they_booked}} {{start_date}} {{start_time}} {{end_date}} {{end_time}} {{location}} {{balance_due}} {{supplier_name}} {{supplier_phone}}
A tag that does not exist is refused with 422, and nothing is saved. The message names the tag and, when one is close, the tag that was probably meant:
{
"error": {
"code": "validation_error",
"message": "The given data was invalid.",
"details": [
{
"field": "tags",
"message": "{{experience_name}} is not a tag you can use here - did you mean {{what_they_booked}}?"
}
]
}
}
The same check runs on PATCH, for the fields you send.
Before the booking confirmationโ
A message with before_confirmation: true goes out as part of the automatic confirmation send, first, so the customer reads it before the confirmation. It still goes out when the shop has switched the automatic confirmation off. Sending the confirmation by hand (POST /v1/bookings/{id}/send-confirmation) never sends it again.
curl -X POST "https://app.equipdash.com/api/v1/message-plans/8/messages" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "What to bring",
"channel": "email",
"anchor": "enrollment",
"before_confirmation": true,
"subject": "Before your booking is confirmed"
}'
Change a messageโ
PATCH /v1/message-plans/{id}/messages/{messageId}
Send only the fields you are changing. Anything already sent stays exactly as it was; only future sends pick up the change.
curl -X PATCH "https://app.equipdash.com/api/v1/message-plans/8/messages/51" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "offset_value": 2, "enabled": false }'
Remove a messageโ
DELETE /v1/message-plans/{id}/messages/{messageId}
Returns 204. Sends that have not gone out yet are dropped; the ones that have are history and stay readable on the booking that received them.
curl -X DELETE "https://app.equipdash.com/api/v1/message-plans/8/messages/51" \
-H "Authorization: Bearer YOUR_API_KEY"
Duplicates are handled for youโ
If two plans that apply to one booking carry the same message โ same name, same channel โ the customer receives it once. You do not need to de-duplicate before writing a plan.