/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

(string) 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) the new value (required, may be empty). Booleans: true/false, on/off or 1/0
(String) optionally define the response-format for this call. One of: compact (default) | compacts | full | fulls | json | md | html | js | openapi | yaml
(int) 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.

Error Responses

HTTP StatusError CodeDescription
401not_authorizedCaller lacks the settings permission (UPDATE_SETTINGS_ACTION_ACCESS)
403not_writableThe setting is read-only, or reserved for the platform operator, or not available on this system
400parameter_errorDetail 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