# Save what the property knows about a guest (found by email or phone)

`PUT /lodging/guests` · Rivier · bookings

Save what the property knows about a guest (found by email or phone): bed, floor, quiet, diet, accessibility, arrival time, notes. No identity documents are kept.

- Scope: bookings:write
- Sdk: bookings.guest.save
- Cli: bookings guest save

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "email": {
      "type": "string",
      "format": "email",
      "maxLength": 254
    },
    "phone": {
      "type": "string",
      "pattern": "^\\+?[0-9 ()-]{6,20}$"
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "nationality": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[A-Za-z]{2}$"
        },
        {
          "type": "null"
        }
      ]
    },
    "language": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 2,
          "maxLength": 12
        },
        {
          "type": "null"
        }
      ]
    },
    "preferences": {
      "type": "object",
      "properties": {
        "bed": {
          "type": "string",
          "maxLength": 60
        },
        "floor": {
          "type": "string",
          "enum": [
            "low",
            "high",
            "any"
          ]
        },
        "quiet": {
          "type": "boolean"
        },
        "diet": {
          "type": "array",
          "items": {
            "type": "string",
            "maxLength": 60
          },
          "maxItems": 10
        },
        "accessibility": {
          "type": "array",
          "items": {
            "type": "string",
            "maxLength": 80
          },
          "maxItems": 10
        },
        "arrivalTime": {
          "type": "string",
          "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
        }
      },
      "additionalProperties": false,
      "default": {}
    },
    "notes": {
      "type": "string",
      "maxLength": 2000,
      "default": ""
    }
  },
  "required": [
    "name"
  ],
  "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/guests' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string"
}'
```
