# Update a client

`POST https://backend.estactics.com/api/clients/update`

Changes the details of a client. Send only the fields you want to change.

Authentication: `Authorization: Bearer YOUR_API_KEY`. Required permission: `clients.MANAGE`.

## Body parameters

- `id` (integer, required): ID of the client to update.
- `firstName` (string): First name.
- `lastName` (string): Last name.
- `email` (string): Email address. Masked or left out when the API key lacks email visibility.
- `phoneCountryCode` (string): Two-letter country code of the phone number, for example CY.
- `phoneDialCode` (integer): International dial code without the plus sign, for example 357.
- `phone` (integer): National phone number, digits only. Masked or left out when the API key lacks phone visibility.
- `gender` (MALE | FEMALE): Gender.
- `language` (string): Preferred language code, for example en.
- `country` (string): Country name.
- `city` (string): City.
- `address` (string): Street address.
- `stageId` (integer): ID of the pipeline stage.
- `doNotContact` (boolean): True when the client must not be contacted.
- `labelIds` (array of integer): IDs of the labels on this client.
- `interestTypes` (array of string): What the client wants to do: BUY or RENT.
- `preferredPropertyTypes` (array of string): Property types the client is interested in.
- `preferredCountry` (string): Country the client wants to buy or rent in.
- `preferredCity` (string): City the client wants to buy or rent in.
- `preferredArea` (string): Area the client wants to buy or rent in.
- `preferredBedrooms` (integer): Number of bedrooms wanted.
- `preferredBathrooms` (integer): Number of bathrooms wanted.
- `purchasePurpose` (INVESTMENT | RESIDENCY | HOLIDAY_HOME | OTHER): Why the client is buying.
- `propertyStageInterests` (array of string): Construction stages the client is interested in.
- `preferredFeatures` (array of string): Property features the client wants.
- `deliveryDeadline` (string): Latest delivery date that suits the client.
- `interestNotes` (string): Free text notes about what the client wants.
- `minBudget` (number): Lowest budget.
- `maxBudget` (number): Highest budget.

## Example request body

```json
{
  "id": 1042,
  "city": "Limassol",
  "preferredBedrooms": 3
}
```

## Example response

```json
{
  "success": true,
  "data": {
    "id": 1042,
    "firstName": "Alex",
    "lastName": "Morgan",
    "city": "Limassol",
    "preferredBedrooms": 3
  }
}
```
