Zum Inhalt springen

Message templates

Reusable templates for emails and text messages

The message template object

Attributes

iduuid

Unique identifier

organization_iduuid
organizations.id

Identifier of the organization this message template is defined in

created_atread-onlytimestamp with time zone

Creation timestamp

updated_atread-onlytimestamp with time zone

Last modification timestamp

attachmentsArray<MessageAttachment>

Attachments to include in the email

bodyMultiLanguageString

Localized body of the message

ftsread-onlytsvector

Full text search index

include_booking_detailsboolean

Whether to include booking details in the message

include_booking_linkboolean

Whether to include a link to the guest page in the message

include_ical_databoolean

Whether to include an iCal attachment in the email

include_product_imageboolean

Whether to include an image of the unit in the email

include_transactionsboolean

Whether to include the booking's transactions in the message

momentMessageMoment | null

Moment at which the message is sent

past_schedule_behaviorMessagePastScheduleBehavior

What happens when a message is created with a moment in the past

statusMessageTemplateStatus

Whether messages are scheduled for pending and confirmed events, or for confirmed events only

subjectMultiLanguageString

Localized subject of the email

timetime without time zone | null

Time of day at which the message is sent

triggerMessageTrigger | null

Trigger of the message template

typeMessageType

Type 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(*).

organizations(*)object | null
organizations

The organization referenced by organization_id.

messages(*)array
messages

The messages referencing this message template through messages.message_template_id.

product_message_templates(*)array
product_message_templates

The product message templates referencing this message template through product_message_templates.message_template_id.

The message template object
JSON
{
  "id": "00000000-0000-0000-0000-000000000000",
  "organization_id": "00000000-0000-0000-0000-000000000000",
  "created_at": "2026-10-30T22:26:24.060Z",
  "updated_at": "2026-10-30T22:26:24.060Z",
  "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"
}
Including related resources
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>
organizations.id

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

200

A list of message templates with the selected columns

206

Partial Content

400

The request is malformed, for example an unknown column or an invalid filter.

401

The API key is missing or invalid.

Error responses have a JSON body with a code, message, details and hint. See the introduction for more on errors.
GET /message_templates
curl -X GET "https://api.bookingmood.com/v1/message_templates?select=*&limit=10" \
  -H "Authorization: Bearer YOUR_API_KEY"
Example response
JSON
[
  {
    "id": "00000000-0000-0000-0000-000000000000",
    "organization_id": "00000000-0000-0000-0000-000000000000",
    "created_at": "2026-10-30T22:26:24.060Z",
    "updated_at": "2026-10-30T22:26:24.060Z",
    "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

201

The newly created message templates with the selected columns

400

The request is malformed, for example an unknown column, an invalid filter or an invalid body.

401

The API key is missing or invalid.

403

The API key has no permission for this change, for example when writing rows of another organization.

409

The change conflicts with existing data, for example a duplicate key or a reference to a row that does not exist.

Error responses have a JSON body with a code, message, details and hint. See the introduction for more on errors.
POST /message_templates
curl -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"
  }'
Example response
JSON
[
  {
    "id": "00000000-0000-0000-0000-000000000000",
    "organization_id": "00000000-0000-0000-0000-000000000000",
    "created_at": "2026-10-30T22:26:24.060Z",
    "updated_at": "2026-10-30T22:26:24.060Z",
    "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>
organizations.id

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

200

The deleted message templates with the selected columns. Returns 204 without a body when sending the header Prefer: return=minimal.

400

The request is malformed, for example an unknown column or an invalid filter.

401

The API key is missing or invalid.

403

The API key has no permission for this change, for example when writing rows of another organization.

Error responses have a JSON body with a code, message, details and hint. See the introduction for more on errors.
DELETE /message_templates
curl -X DELETE "https://api.bookingmood.com/v1/message_templates?id=eq.00000000-0000-0000-0000-000000000000" \
  -H "Authorization: Bearer YOUR_API_KEY"
Example response
JSON
[
  {
    "id": "00000000-0000-0000-0000-000000000000",
    "organization_id": "00000000-0000-0000-0000-000000000000",
    "created_at": "2026-10-30T22:26:24.060Z",
    "updated_at": "2026-10-30T22:26:24.060Z",
    "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>
organizations.id

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

200

The updated message templates with the selected columns. Returns 204 without a body when sending the header Prefer: return=minimal.

400

The request is malformed, for example an unknown column, an invalid filter or an invalid body.

401

The API key is missing or invalid.

403

The API key has no permission for this change, for example when writing rows of another organization.

409

The change conflicts with existing data, for example a duplicate key or a reference to a row that does not exist.

Error responses have a JSON body with a code, message, details and hint. See the introduction for more on errors.
PATCH /message_templates
curl -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"
      }
    ]
  }'
Example response
JSON
[
  {
    "id": "00000000-0000-0000-0000-000000000000",
    "organization_id": "00000000-0000-0000-0000-000000000000",
    "created_at": "2026-10-30T22:26:24.060Z",
    "updated_at": "2026-10-30T22:26:24.060Z",
    "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"
  }
]

Übernehmen Sie die Kontrolle über Ihre Buchungen. Bauen Sie Ihr eigenes Unternehmen auf.

Schließen Sie sich den über 1200 unabhängigen Anbietern von Ferienunterkünften an, die Bookingmood nutzen, um ihre Direktbuchungen zu steigern und engere Beziehungen zu ihren Gästen aufzubauen.

Starten Sie Ihren kostenlosen 14-Tage-Test