Message templates
Reusable templates for emails and text messages
The message template object
Attributes
iduuidUnique identifier
organization_iduuidIdentifier of the organization this message template is defined in
created_atread-onlytimestamp with time zoneCreation timestamp
updated_atread-onlytimestamp with time zoneLast modification timestamp
attachmentsArray<MessageAttachment>Attachments to include in the email
bodyMultiLanguageStringLocalized body of the message
ftsread-onlytsvectorFull text search index
include_booking_detailsbooleanWhether to include booking details in the message
include_booking_linkbooleanWhether to include a link to the guest page in the message
include_ical_databooleanWhether to include an iCal attachment in the email
include_product_imagebooleanWhether to include an image of the unit in the email
include_transactionsbooleanWhether to include the booking's transactions in the message
momentMessageMoment | nullMoment at which the message is sent
past_schedule_behaviorMessagePastScheduleBehaviorWhat happens when a message is created with a moment in the past
statusMessageTemplateStatusWhether messages are scheduled for pending and confirmed events, or for confirmed events only
subjectMultiLanguageStringLocalized subject of the email
timetime without time zone | nullTime of day at which the message is sent
triggerMessageTrigger | nullTrigger of the message template
typeMessageTypeType of the message: email or sms
Related resources
Embed related resources in the response with the select parameter, for example select=*,organizations(*). Resources related through more than one column need the column as a hint, like table!column(*).
messages(*)arrayThe messages referencing this message template through messages.message_template_id.
product_message_templates(*)arrayThe product message templates referencing this message template through product_message_templates.message_template_id.
{
"id": "00000000-0000-0000-0000-000000000000",
"organization_id": "00000000-0000-0000-0000-000000000000",
"created_at": "2026-10-30T22:27:57.861Z",
"updated_at": "2026-10-30T22:27:57.861Z",
"attachments": [
{
"filename": "file",
"url": "https://example.com",
"type": "application/pdf"
}
],
"body": {},
"include_booking_details": false,
"include_booking_link": true,
"include_ical_data": false,
"include_product_image": false,
"include_transactions": false,
"moment": {
"offset": 1,
"type": "check-in"
},
"past_schedule_behavior": "send",
"status": "CONFIRMED",
"subject": {},
"time": null,
"trigger": "all-payments-completed",
"type": "email"
}curl -X GET "https://api.bookingmood.com/v1/message_templates?limit=10&select=*,organizations(*),messages(*)" \
-H "Authorization: Bearer YOUR_API_KEY"List message templates
Filters
idFilter<uuid>Unique identifier
organization_idFilter<uuid>Identifier of the organization this message template is defined in
created_atFilter<timestamp with time zone>Creation timestamp
updated_atFilter<timestamp with time zone>Last modification timestamp
attachmentsFilter<Array<MessageAttachment>>Attachments to include in the email
bodyFilter<MultiLanguageString>Localized body of the message
ftsFilter<tsvector>Full text search index
include_booking_detailsFilter<boolean>Whether to include booking details in the message
include_booking_linkFilter<boolean>Whether to include a link to the guest page in the message
include_ical_dataFilter<boolean>Whether to include an iCal attachment in the email
include_product_imageFilter<boolean>Whether to include an image of the unit in the email
include_transactionsFilter<boolean>Whether to include the booking's transactions in the message
momentFilter<MessageMoment | null>Moment at which the message is sent
past_schedule_behaviorFilter<MessagePastScheduleBehavior>What happens when a message is created with a moment in the past
statusFilter<MessageTemplateStatus>Whether messages are scheduled for pending and confirmed events, or for confirmed events only
subjectFilter<MultiLanguageString>Localized subject of the email
timeFilter<time without time zone | null>Time of day at which the message is sent
triggerFilter<MessageTrigger | null>Trigger of the message template
typeFilter<MessageType>Type of the message: email or sms
Responses
200A list of message templates with the selected columns
206Partial Content
400The request is malformed, for example an unknown column or an invalid filter.
401The API key is missing or invalid.
code, message, details and hint. See the introduction for more on errors.GET /message_templatescurl -X GET "https://api.bookingmood.com/v1/message_templates?select=*&limit=10" \
-H "Authorization: Bearer YOUR_API_KEY"[
{
"id": "00000000-0000-0000-0000-000000000000",
"organization_id": "00000000-0000-0000-0000-000000000000",
"created_at": "2026-10-30T22:27:57.861Z",
"updated_at": "2026-10-30T22:27:57.861Z",
"attachments": [
{
"filename": "file",
"url": "https://example.com",
"type": "application/pdf"
}
],
"body": {},
"include_booking_details": false,
"include_booking_link": true,
"include_ical_data": false,
"include_product_image": false,
"include_transactions": false,
"moment": {
"offset": 1,
"type": "check-in"
},
"past_schedule_behavior": "send",
"status": "CONFIRMED",
"subject": {},
"time": null,
"trigger": "all-payments-completed",
"type": "email"
}
]Create message templates
Body
Partial<MessageTemplate> | Array<Partial<MessageTemplate>>Read-only attributes are set by the database and can't be written.
Responses
201The newly created message templates with the selected columns
400The request is malformed, for example an unknown column, an invalid filter or an invalid body.
401The API key is missing or invalid.
403The API key has no permission for this change, for example when writing rows of another organization.
409The change conflicts with existing data, for example a duplicate key or a reference to a row that does not exist.
code, message, details and hint. See the introduction for more on errors.POST /message_templatescurl -X POST "https://api.bookingmood.com/v1/message_templates" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"attachments": [
{
"filename": "file",
"url": "https://example.com",
"type": "application/pdf"
}
],
"body": {},
"include_booking_details": false,
"include_booking_link": true,
"include_ical_data": false,
"include_product_image": false,
"include_transactions": false,
"organization_id": "00000000-0000-0000-0000-000000000000",
"past_schedule_behavior": "send",
"status": "CONFIRMED",
"subject": {},
"type": "email"
}'[
{
"id": "00000000-0000-0000-0000-000000000000",
"organization_id": "00000000-0000-0000-0000-000000000000",
"created_at": "2026-10-30T22:27:57.861Z",
"updated_at": "2026-10-30T22:27:57.861Z",
"attachments": [
{
"filename": "file",
"url": "https://example.com",
"type": "application/pdf"
}
],
"body": {},
"include_booking_details": false,
"include_booking_link": true,
"include_ical_data": false,
"include_product_image": false,
"include_transactions": false,
"moment": {
"offset": 1,
"type": "check-in"
},
"past_schedule_behavior": "send",
"status": "CONFIRMED",
"subject": {},
"time": null,
"trigger": "all-payments-completed",
"type": "email"
}
]Delete message templates
Filters
Without filters, this request deletes all message templates you have access to. Always filter on at least one column, e.g. id=eq.{id}.
idFilter<uuid>Unique identifier
organization_idFilter<uuid>Identifier of the organization this message template is defined in
created_atFilter<timestamp with time zone>Creation timestamp
updated_atFilter<timestamp with time zone>Last modification timestamp
attachmentsFilter<Array<MessageAttachment>>Attachments to include in the email
bodyFilter<MultiLanguageString>Localized body of the message
ftsFilter<tsvector>Full text search index
include_booking_detailsFilter<boolean>Whether to include booking details in the message
include_booking_linkFilter<boolean>Whether to include a link to the guest page in the message
include_ical_dataFilter<boolean>Whether to include an iCal attachment in the email
include_product_imageFilter<boolean>Whether to include an image of the unit in the email
include_transactionsFilter<boolean>Whether to include the booking's transactions in the message
momentFilter<MessageMoment | null>Moment at which the message is sent
past_schedule_behaviorFilter<MessagePastScheduleBehavior>What happens when a message is created with a moment in the past
statusFilter<MessageTemplateStatus>Whether messages are scheduled for pending and confirmed events, or for confirmed events only
subjectFilter<MultiLanguageString>Localized subject of the email
timeFilter<time without time zone | null>Time of day at which the message is sent
triggerFilter<MessageTrigger | null>Trigger of the message template
typeFilter<MessageType>Type of the message: email or sms
Responses
200The deleted message templates with the selected columns. Returns 204 without a body when sending the header Prefer: return=minimal.
400The request is malformed, for example an unknown column or an invalid filter.
401The API key is missing or invalid.
403The API key has no permission for this change, for example when writing rows of another organization.
code, message, details and hint. See the introduction for more on errors.DELETE /message_templatescurl -X DELETE "https://api.bookingmood.com/v1/message_templates?id=eq.00000000-0000-0000-0000-000000000000" \
-H "Authorization: Bearer YOUR_API_KEY"[
{
"id": "00000000-0000-0000-0000-000000000000",
"organization_id": "00000000-0000-0000-0000-000000000000",
"created_at": "2026-10-30T22:27:57.861Z",
"updated_at": "2026-10-30T22:27:57.861Z",
"attachments": [
{
"filename": "file",
"url": "https://example.com",
"type": "application/pdf"
}
],
"body": {},
"include_booking_details": false,
"include_booking_link": true,
"include_ical_data": false,
"include_product_image": false,
"include_transactions": false,
"moment": {
"offset": 1,
"type": "check-in"
},
"past_schedule_behavior": "send",
"status": "CONFIRMED",
"subject": {},
"time": null,
"trigger": "all-payments-completed",
"type": "email"
}
]Update message templates
Filters
Without filters, this request updates all message templates you have access to. Always filter on at least one column, e.g. id=eq.{id}.
idFilter<uuid>Unique identifier
organization_idFilter<uuid>Identifier of the organization this message template is defined in
created_atFilter<timestamp with time zone>Creation timestamp
updated_atFilter<timestamp with time zone>Last modification timestamp
attachmentsFilter<Array<MessageAttachment>>Attachments to include in the email
bodyFilter<MultiLanguageString>Localized body of the message
ftsFilter<tsvector>Full text search index
include_booking_detailsFilter<boolean>Whether to include booking details in the message
include_booking_linkFilter<boolean>Whether to include a link to the guest page in the message
include_ical_dataFilter<boolean>Whether to include an iCal attachment in the email
include_product_imageFilter<boolean>Whether to include an image of the unit in the email
include_transactionsFilter<boolean>Whether to include the booking's transactions in the message
momentFilter<MessageMoment | null>Moment at which the message is sent
past_schedule_behaviorFilter<MessagePastScheduleBehavior>What happens when a message is created with a moment in the past
statusFilter<MessageTemplateStatus>Whether messages are scheduled for pending and confirmed events, or for confirmed events only
subjectFilter<MultiLanguageString>Localized subject of the email
timeFilter<time without time zone | null>Time of day at which the message is sent
triggerFilter<MessageTrigger | null>Trigger of the message template
typeFilter<MessageType>Type of the message: email or sms
Body
Partial<MessageTemplate>Read-only attributes are set by the database and can't be written.
Responses
200The updated message templates with the selected columns. Returns 204 without a body when sending the header Prefer: return=minimal.
400The request is malformed, for example an unknown column, an invalid filter or an invalid body.
401The API key is missing or invalid.
403The API key has no permission for this change, for example when writing rows of another organization.
409The change conflicts with existing data, for example a duplicate key or a reference to a row that does not exist.
code, message, details and hint. See the introduction for more on errors.PATCH /message_templatescurl -X PATCH "https://api.bookingmood.com/v1/message_templates?id=eq.00000000-0000-0000-0000-000000000000" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"attachments": [
{
"filename": "file",
"url": "https://example.com",
"type": "application/pdf"
}
]
}'[
{
"id": "00000000-0000-0000-0000-000000000000",
"organization_id": "00000000-0000-0000-0000-000000000000",
"created_at": "2026-10-30T22:27:57.861Z",
"updated_at": "2026-10-30T22:27:57.861Z",
"attachments": [
{
"filename": "file",
"url": "https://example.com",
"type": "application/pdf"
}
],
"body": {},
"include_booking_details": false,
"include_booking_link": true,
"include_ical_data": false,
"include_product_image": false,
"include_transactions": false,
"moment": {
"offset": 1,
"type": "check-in"
},
"past_schedule_behavior": "send",
"status": "CONFIRMED",
"subject": {},
"time": null,
"trigger": "all-payments-completed",
"type": "email"
}
]