# Set a company setting

Source: https://api-docs.magicdoor.com/api-reference/settings/set-company-setting

Writes the company-level value for one settings type, creating it or replacing it outright. Overrides already stored on portfolios, properties, units and leases are left alone and continue to win over this value. Requires the `settings:write` permission.

`POST https://services.magicdoor.com/settings/company-portal/settings/{settingsType}/company`

**Authentication:** bearer token in the `Authorization` header, as `Bearer <token>`.

## Path parameters

- `settingsType` (enum<string>, required) — Which family of settings to act on. Matched case-insensitively against the registered settings types. One of: `achpaymentprocessing`, `agentschat`, `associationviolation`, `autopayincentives`, `chat`, `chatai`, `chatailease`, `chataileaserenewal`, `chataileaserentersinsurance`, `chataimaintenancerequests`, `chataitranslation`, `communications`, `company`, `contribution`, `depositpayment`, `distribution`, `email`, `emailnotification`, `latefees`, `leasechartofaccount`, `leaseinvoice`, `leaserenewal`, `leaserentersinsurance`, `maintenancerequest`, `maintenancerequestrunbook`, `managementfee`, `outgoingpayments`, `property`, `rentalapplication`, `rentalapplicationbilling`, `rentalapplicationchartofaccount`, `rentalapplicationgeneral`, `rentalapplicationpayment`, `rentalapplicationpaymentaccount`, `rentalapplicationquestionnaire`, `rentalapplicationscreening`, `rentpayment`, `rentpaymentfailurefee`, `rentpaymentnotification`, `rentpaymentprocessingfees`, `syndication`, `tenantautopayfailednotification`, `tenantpaymentreminder`, `text`, `workorder`. Example: `property`.

## Body

Content type: `application/json`

- `settings` (object, required) — The complete settings object for the chosen `settingsType`. Every property of that type must be supplied — this is a whole-object replacement, not a patch, and anything left out falls back to the type's built-in default. Snowflake ids inside the object are sent as decimal strings.

```json
{
  "settings": {
    "reserve": 350,
    "ownerApprovalLimit": 500,
    "vendorApprovalLimit": 250
  }
}
```

## Example request

```bash
curl --request POST \
  --url 'https://services.magicdoor.com/settings/company-portal/settings/property/company' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "settings": {
    "reserve": 350,
    "ownerApprovalLimit": 500,
    "vendorApprovalLimit": 250
  }
}'
```

## Responses

### 200 — The stored company-level row.

- `…settings properties` (object) — The properties of the chosen settings type, spread across the top level of the response. The example below is the `property` settings type.
- `level` (enum<string>) — The kind of entity this stored row is attached to. One of: `company`, `portfolio`, `property`, `unit`, `lease`.
- `levelId` (string) — The id of the entity this stored row is attached to. At company level this is the company's own id.
- `groupId` (string) — Identifies rows written together by a single multi-target override call. Absent on rows written on their own.

```json
{
  "reserve": 350,
  "ownerApprovalLimit": 500,
  "vendorApprovalLimit": 250,
  "level": "company",
  "levelId": "1830472847398404096"
}
```

### 400 — The body could not be read as the chosen settings type, or a settings type with its own validator rejected the values.

### 401 — The access token is missing, expired, or invalid.

### 403 — The caller does not hold the `settings:write` permission.

### 404 — No settings type is registered under the `settingsType` in the URL.

```json
{
  "type": "https://httpstatuses.com/404",
  "title": "Not Found",
  "status": 404,
  "detail": "Unknown settings type: propertysettings",
  "instance": "/company-portal/settings/propertysettings/company",
  "traceId": "0HN7GK9C2M4PQ"
}
```

> **Warning:**
>
> The body replaces the stored value in full. Send every property of the settings type, not just the ones you are changing — omitted properties fall back to the type's built-in default rather than keeping their current value.
