Update Company Configurations API
Company APIs
Update Company Configurations API
Update one or more organization configuration settings
Update Company Configurations API
Authentication
All requests require an API key in the request headers. Headers:Request
Content-Type:application/json
Update one or more settings by sending their key and new value. The available keys, their input type, and the allowed options are returned by the Company Configurations API.
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
settings | array | Yes | List of settings to update. Must contain at least one item |
settings[].key | string | Yes | Identifier of the setting to update (from the Company Configurations API) |
settings[].value | object | Yes | New value, wrapped in an object: { "value": <newValue> }. The inner value type must match the setting’s type (see below) |
Value Format
Thevalue must be an object whose inner value field matches the setting type:
Setting type | Inner value type | Example |
|---|---|---|
TOGGLE | boolean | { "value": true } |
NUMBER | number | { "value": 30 } |
SELECT | string (one of the setting’s options) | { "value": "MULTI" } |
TEXT | string | { "value": "Custom text" } |
MULTISELECT | array of strings (each from the setting’s options) | { "value": ["cost-centre", "department"] } |
Code Examples
Success Response
HTTP Status:200 OK
Valid settings are applied even if some entries in the request fail validation. Settings that fail validation are skipped and reported in misConfigurations — always inspect this array to confirm every setting was applied.
Response Fields:
| Field | Type | Description |
|---|---|---|
ok | boolean | Indicates whether the request was processed |
data | object | Contains the update result |
data.context | object | Update result metadata |
data.context.patchedCount | number | Number of settings that were successfully updated |
data.context.misConfigurations | array | Settings that failed validation and were skipped |
data.context.misConfigurations[].key | string | Key of the skipped setting |
data.context.misConfigurations[].value | object | The rejected value |
data.context.misConfigurations[].message | string | Reason the value was rejected |
data.context.misConfigurations[].options | array | Allowed option values for the setting, when applicable |
Response Example
Response Example (with a skipped setting)
Error Responses
Setting Not Editable / Update Rejected
When a requested setting is read-only, or a value-specific rule fails (for example, an invalid active-currency change), the update is rejected as a whole. This is returned with an HTTP200 OK status, ok: false, and an errorData object — no settings are updated in this case.
HTTP Status: 200 OK
Validation Error
Returned when the request body is malformed — for example,settings is missing or empty, or an item is missing key or value.
HTTP Status: 400 Bad Request
Access Denied
HTTP Status:403 Forbidden
Authentication Errors
HTTP Status:401 Unauthorized
Permission Errors
HTTP Status:403 Forbidden
Internal Error
HTTP Status:500 Internal Server Error
Best Practices
- Always wrap the new value in an object:
{ "value": <newValue> }— sending a bare value will fail validation - Fetch the Company Configurations API first to get valid
keyvalues, the expectedtype, and the allowedoptions - Check
data.context.misConfigurationsafter each call — valid settings are still applied even when other entries are skipped, so a200 OKwithok: truedoes not guarantee every setting changed - Treat a
200 OKresponse withok: falseand anerrorDataobject as a full rejection — no settings were updated - Access is limited to users with organization update permission and an admin or bookkeeper role