PATCH /api/v1/properties/{propertyId}
Renames a villa. Nothing else moves: the photo, the archive state and the nightly rate are separate gestures, on purpose — renaming must not silently clear a photo.
| Role in the organization | This endpoint |
|---|---|
owner | Allowed |
admin | Allowed |
member | Refused — 403 |
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | 1 to 120 characters |
curl -X PATCH -H "x-api-key: $VILLASLOT_API_KEY" -H "content-type: application/json" \
-d '{"name":"Villa Suar — Beachfront"}' \
"https://villaslot.app/api/v1/properties/1f0a…"200 OK — the updated villa.403 Forbidden — the key bearer is a member.422 Unprocessable Entity — the name is missing or too long.401 Unauthorized — missing or invalid key, or a key whose bearer left the organization.404 Not Found — unknown id, or an id belonging to another organization. The two are
deliberately indistinguishable.429 Too Many Requests — over 120 requests in a minute for this key.