preferences.update
PATCH/preferences
Changes the default reading language or email choices; fields left out keep their value. Returns every choice after the change. Needs a key.
Parameters
| Parameter | In | Description |
|---|---|---|
locale | body | Optional. Default reading language: vi or en. |
notifyPackUpdates | body | Optional. true to get an email when a file pack or skill you bought or downloaded has a new version. |
notifyBilling | body | Optional. true to get an email seven days before subscriber access ends. |
notifyNewsletter | body | Optional. true to get the new-article newsletter. When it is turned on is recorded. |
newsletterSource | body | Optional. Page where the reader turned the newsletter on: welcome or profile. Agents usually leave it out. |
Request
curl -X PATCH "https://api.modernengineer.dev/preferences" \
-H "Authorization: Bearer $SE_KEY" \
-H "Content-Type: application/json" \
-d '{"notifyNewsletter":true}'Response
{
"locale": "vi",
"notifyPackUpdates": true,
"notifyBilling": true,
"notifyNewsletter": true
}Errors
| Status | Error | When |
|---|---|---|
| 401 | unauthenticated | The API key is missing or invalid. Comes with a WWW-Authenticate header. |
| 400 | invalid_input | A field has the wrong type or value, for example a locale other than vi or en. |