## Overview

This endpoint can be used to add a new custom company setting to 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: **HttpPost**  
- Authorization: Use **Bearer Token** + token received from token authentication  
- Header info: **Content-Type: application/json**

## Request Body

One custom company setting has to be provided in the request. The body parameters are used to define the 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. Set to “null” if no update is needed. | no       |
| MaskValue    | body            | boolean   | Show or hide the setting value. Set to “null” if no update is needed | no       |

The request body should be formatted as follows:

```json
{
  "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**
