# Update Custom Company Settings

## Overview

This endpoint can be used to update the existing custom company settings of a specific company.

To consume the endpoint, you must:

- Be an authenticated user.

For information on how you can authenticate, see [Authentication](https://developer.sellercloud.com/dev-article/authentication/).

After you authenticate and receive a valid token, you must pass it to service calls.

## Endpoint

An example of this endpoint for XX server is:

- https://XX.api.sellercloud.com/rest/api/Companies/{id}/CustomSettings

For your server, the endpoint will be:

- https://{your_server_id}.api.sellercloud.com/rest/api/Companies/{id}/CustomSettings

## Request

- **Method Type**: HttpPut  
- **Authorization**: Use **Bearer Token** + token received from token authentication  
- **Header info**: **Content-Type: application/json**

## Request Body

The request must include a list of custom company settings. The body parameters define each setting’s name, value, and masking.

|     |     |     |     |     |
| --- | --- | --- | --- | --- |
| **Parameter** | **Parameter Type** | **Data Type** | **Description** | **Required** |
| id | path | integer | ID of the targeted company. | yes |
| SettingName | body | string | Custom company setting name. | yes |
| SettingValue | body | string | Custom company setting value.<br>Set to “null” if no update is needed. | yes |
| MaskValue | body | boolean | Show or hide the setting value.<br>Set to “null” if no update is needed. | yes |

The request body should be formatted as follows:

```
{
  "CustomSettings": [
    {
      "SettingName": "string",
      "SettingValue": "string",
      "MaskValue": true
    }
  ]
}
```

## Response

- If the user is authenticated and the request is successful, the response is **Status Code 200 => OK**
- If the user is not authenticated, the response is **Status Code 401 => Invalid Token**
- In case of an error, the response is **Status Code 500 => Internal Server Error**
- In case of an incorrect request, the response is **Status Code 400 => Bad Request**
