POST /api/v1/properties
Creates a villa in the organization of the key. An organizationId in the body is ignored: the
scope of a key is not negotiable.
A fresh villa is not bookable yet — it has no opening hours and no rate grid. Set both before trying to book it.
| Role in the organization | This endpoint |
|---|---|
owner | Allowed |
admin | Allowed |
member | Refused — 403 |
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | 1 to 120 characters |
photoUrl | string | no | An already-hosted image URL. To upload a file, use the photo endpoint |
{"name": "Villa Amerta"}curl -X POST -H "x-api-key: $VILLASLOT_API_KEY" -H "content-type: application/json" \
-d '{"name":"Villa Amerta"}' \
"https://villaslot.app/api/v1/properties"201 Created — the created villa, status: "active".403 Forbidden — the key bearer is a member, not an admin.409 Conflict — the plan limit for villas is reached; the body carries the limit, the usage
and the plan name. Nothing was created.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.