# Add a building, wing, floor or area, optionally inside another

`POST /lodging/areas` · Rivier · bookings

Add a building, wing, floor or area, optionally inside another.

- Scope: bookings:admin
- Mcp: rivier_lodging_area_create
- Sdk: bookings.area.create
- Cli: bookings area create

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "propertyId": {
      "type": "string",
      "format": "uuid"
    },
    "parentId": {
      "anyOf": [
        {
          "type": "string",
          "format": "uuid"
        },
        {
          "type": "null"
        }
      ]
    },
    "kind": {
      "type": "string",
      "enum": [
        "building",
        "wing",
        "floor",
        "area"
      ]
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "level": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": -10,
          "maximum": 200
        },
        {
          "type": "null"
        }
      ]
    },
    "content": {
      "type": "object",
      "additionalProperties": {
        "type": "object",
        "additionalProperties": {
          "type": "string",
          "maxLength": 8000
        },
        "propertyNames": {
          "pattern": "^[A-Za-z]{1,32}$"
        }
      },
      "propertyNames": {
        "pattern": "^[a-z]{2,3}(-[A-Za-z0-9]{2,8})?$"
      },
      "default": {}
    },
    "position": {
      "type": "integer",
      "minimum": 0,
      "maximum": 10000,
      "default": 0
    }
  },
  "required": [
    "propertyId",
    "kind",
    "name"
  ],
  "additionalProperties": false
}
```

## Responses

- `201`: 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 POST 'https://api.rivier.ai/lodging/areas' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "propertyId": "string",
  "kind": "building",
  "name": "string"
}'
```
