# Write a guest message in one language, replacing the built-in words

`PUT /lodging/message-templates` · Rivier · bookings

Write a guest message in one language, replacing the built-in words; braces such as {name} and {checkIn} are filled from the stay.

- Scope: bookings:admin
- Sdk: bookings.messageTemplate.save
- Cli: bookings message template save

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "propertyId": {
      "type": "string",
      "format": "uuid"
    },
    "kind": {
      "type": "string",
      "enum": [
        "pre_arrival",
        "welcome",
        "thanks",
        "cancellation",
        "checkin_info",
        "review_request",
        "payment_due"
      ]
    },
    "locale": {
      "type": "string",
      "enum": [
        "en",
        "de",
        "es",
        "fr",
        "ja",
        "ar",
        "sv",
        "dv"
      ]
    },
    "subject": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "body": {
      "type": "string",
      "minLength": 1,
      "maxLength": 6000
    }
  },
  "required": [
    "propertyId",
    "kind",
    "locale",
    "subject",
    "body"
  ],
  "additionalProperties": false
}
```

## Responses

- `200`: Success
- `400`: The request was malformed
- `401`: No valid credential
- `403`: The credential lacks the scope, origin or address
- `429`: Over the key's rate limit; see Retry-After

## Example

```sh
curl -X PUT 'https://api.rivier.ai/lodging/message-templates' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "propertyId": "string",
  "kind": "pre_arrival",
  "locale": "en",
  "subject": "string",
  "body": "string"
}'
```
