The Discourse API Docs for disable_emails
site setting tells to pass the following payload:
{
"disable_emails": false
}
But trying the following curl
command I receive an error. Can someone tell me what I’m doing wrong?
curl -X PUT -H "Content-Type: application/json" \
-H "Api-Key: $DISCOURSE_API_KEY" -H "Api-Username: $USER" \
--data '{ "disable_emails": false }' \
$DISCOURSE_URI/admin/site_settings/disable_emails
{"errors":["value"]}
This {"errors":["value"]}
is very disturbing. I tried "false"
and 0
instead, with the same result.
I went to using curl
because using the discourse_api
would not work with:
client.site_setting_update(name: 'disable_emails', value: false)
Again, if someone does what’s wrong with my call, please enlighten me!
(Nothing appears in the error log)