← API Index
/api/system/setconfig
Sets one configuration value. The value is type-checked and validated like on the admin settings pages, the change shows up in the setup history. Requires the settings permission (UPDATE_SETTINGS_ACTION_ACCESS). Send it as POST: a value in the query string ends up in request logs.
Parameters
| Name |
Description |
Type |
| name |
config name (required), see /api/admin/config/groups. For a setting with language or country variants, the suffix _al1/_al2 (alternative language 1/2) or _ac1/_ac2 (alternative country 1/2) addresses the variant |
string |
| value |
the new value (required, may be empty). Booleans: true/false, on/off or 1/0 |
string |
| oo-rf |
optionally define the response-format for this call. One of: compact (default) | compacts | full | fulls | json | md | html | js | openapi | yaml |
String |
| oo-auth |
optionally force the API to check against the role (instead of silently not returning data). For guests or public access, the default is -1. 0 (regular customer) and above define the role for which the current session is expected to be authorized. |
int |
Error Responses
| HTTP Status |
Error Code |
Description |
| 401 |
not_authorized |
Caller lacks the settings permission (UPDATE_SETTINGS_ACTION_ACCESS) |
| 403 |
not_writable |
The setting is read-only, or reserved for the platform operator, or not available on this system |
| 400 |
parameter_error |
Detail as parameter_error:field:reason. name: missing, unknown, not_localized (suffix on a setting without such variants). value: missing. Otherwise field is the config name and reason says why the value was refused; the value was not saved, except for a theme (SCSS) that was saved but does not compile |
Response Types
| Type |
Version |
Description |
| ConfigResult |
1 |
Result of setting a configuration value |
OpenAPI
See setconfig.yaml