PATCH /api/v1/customers/{customerId}
Corrects a customer. Fields absent from the body keep their value.
| Role in the organization | This endpoint |
|---|---|
owner | Allowed |
admin | Allowed |
member | Allowed |
| Field | Type | Required | Description |
|---|---|---|---|
name | string | no | |
email | string | no | Unique inside the organization; null clears it |
phone | string | no | |
notes | string | no |
curl -X PATCH -H "x-api-key: $VILLASLOT_API_KEY" -H "content-type: application/json" \
-d '{"phone":"+62 812 3456 7890"}' \
"https://villaslot.app/api/v1/customers/8d3e…"200 OK — the updated customer.422 Unprocessable Entity — a malformed email, or an email already used by another customer
of the organization.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.