POST /api/v1/properties/{propertyId}/archive
Archives a villa. There is no delete in this product: archiving is a state change, and past bookings stay attached to the villa.
An archived villa disappears from the booking paths — it is no longer offered, and a booking
attempt on it is refused with PROPERTY_NOT_BOOKABLE.
Idempotent: archiving an already archived villa answers 200 and changes nothing.
| Role in the organization | This endpoint |
|---|---|
owner | Allowed |
admin | Allowed |
member | Refused — 403 |
None.
curl -X POST -H "x-api-key: $VILLASLOT_API_KEY" \
"https://villaslot.app/api/v1/properties/1f0a…/archive"200 OK — the villa, status: "archived".403 Forbidden — the key bearer is a member.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.Irreversible over the API. Restoring a villa is done from the app. An agent does not archive a villa without an explicit human go-ahead for that exact gesture.