> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fssportal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Client

> Update an existing client

## Endpoint

```
POST /api/v1/client/update
```

<Note>This endpoint requires authentication</Note>

## Headers

<ParamField header="X-API-Token" type="string" required>
  Your API access token. You can also set this globally in the API playground.
</ParamField>

<ParamField header="platform" type="string" required>
  The platform making the request: `WEB`, `IOS`, or `ANDROID`.
</ParamField>

## Request Body

<ParamField body="client_id" type="integer" required>
  The unique identifier of the client to update.
</ParamField>

<ParamField body="name" type="string" required>
  name
</ParamField>

<ParamField body="surname" type="string" required>
  surname
</ParamField>

<ParamField body="email" type="string" required>
  email
</ParamField>

<ParamField body="location" type="string">
  location
</ParamField>

<ParamField body="phone" type="string">
  phone
</ParamField>

<ParamField body="address" type="string">
  address
</ParamField>

<ParamField body="city" type="string">
  city
</ParamField>

<ParamField body="state" type="string">
  state
</ParamField>

<ParamField body="zip_code" type="string">
  zip code
</ParamField>

<ParamField body="billing_address" type="string">
  billing address
</ParamField>

<ParamField body="billing_city" type="string">
  billing city
</ParamField>

<ParamField body="billing_state" type="string">
  billing state
</ParamField>

<ParamField body="billing_zip_code" type="string">
  billing zip code
</ParamField>

<ParamField body="phone_no" type="string">
  phone no
</ParamField>

<ParamField body="lead_source_name" type="string">
  lead source name
</ParamField>

<ParamField body="quote_no" type="string">
  quote no
</ParamField>

<ParamField body="lead_source_id" type="integer">
  lead source id
</ParamField>

<ParamField body="project_name" type="string">
  project name
</ParamField>

<ParamField body="end_client_known" type="boolean">
  end client known
</ParamField>

## Response

<ResponseField name="message" type="string">
  message
</ResponseField>

<ResponseField name="data" type="array">
  data
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --location 'http://fssportal.com/api/v1/client/update' \
  --header 'X-API-Token: YOUR_API_TOKEN' \
  --header 'Content-Type: application/json' \
  --data-raw '{
    "client_id": 1164,
    "name": "John",
    "surname": "Doe",
    "email": "john2@example.com",
    "location": "Rajkot",
    "phone": "1234567890",
    "address": "123 Main St",
    "city": "Rajkot",
    "state": "Gujarat",
    "zip_code": "360006",
    "billing_address": "123 main St",
    "billing_city": "Rajkot",
    "billing_state": "Gujarat",
    "billing_zip_code": "360006",
    "phone_no": "7023927561",
    "lead_source_name": "",
    "quote_no": "Eeeerer",
    "lead_source_id": 17,
    "project_name": "Rajkot",
    "end_client_known": true
  }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('http://fssportal.com/api/v1/client/update', {
    method: 'POST',
    headers: {
      'X-API-Token': 'YOUR_API_TOKEN',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
    "client_id": 1164,
    "name": "John",
    "surname": "Doe",
    "email": "john2@example.com",
    "location": "Rajkot",
    "phone": "1234567890",
    "address": "123 Main St",
    "city": "Rajkot",
    "state": "Gujarat",
    "zip_code": "360006",
    "billing_address": "123 main St",
    "billing_city": "Rajkot",
    "billing_state": "Gujarat",
    "billing_zip_code": "360006",
    "phone_no": "7023927561",
    "lead_source_name": "",
    "quote_no": "Eeeerer",
    "lead_source_id": 17,
    "project_name": "Rajkot",
    "end_client_known": true
  })
  });

  const data = await response.json();
  ```
</RequestExample>

<ResponseExample>
  ```json Success Response theme={null}
  {
    "message": "Client details updated successfully.",
    "data": []
  }
  ```
</ResponseExample>

## Notes

* Authentication is required
