Edit settings
Contents
Update one or more site settings. Only fields included in the request body are changed; omitted fields keep their current value.
Requires the API Token and an Authentication Token. See Authentication.
HTTP Request
PUT /api/settings
Parameters
| Key | Type | Description |
|---|---|---|
token (required) |
string | API Token. |
authentication (required) |
string | User Authentication Token. |
| (any settings field) | various | Any field defined in Site::$dbFields, e.g. title, slogan, description, language, theme, homepage, uriBlog. |
See Get settings for the full list of fields the Bludit instance currently supports.
Response
HTTP Code: 200
Content-Type: application/json
Body:
{
"status": "0",
"message": "Settings edited."
}
Errors
| Code | Reason |
|---|---|
400 |
Validation failure (e.g. invalid customFields JSON). |
401 |
Missing or invalid authentication token. |
CURL command example
data.json:
{
"token": "<api-token>",
"authentication": "<auth-token>",
"title": "My new site title",
"slogan": "Concise and on-brand"
}
$ curl -X PUT \
-H "Content-Type: application/json" \
-d @data.json \
"https://www.example.com/api/settings"