Update Email Preferences

PUT /v1/user/email-preferences

Opt your user in to or out of marketing email. Account, security and billing email is not affected either way.

  • true opts you in and also takes your address off the suppression list, so marketing email resumes even if you had unsubscribed through an email link.
  • false opts you out. Your address is not added to the suppression list; opting in again later is enough to resume.

Read the current state with Email Preferences.

Request body

marketing_consent boolean Req
true to receive marketing email, false to stop it.

Response (200 OK)

marketing_consent boolean
The value now stored.

Errors

400 Bad Request
marketing_consent (boolean) is required — the field is missing, not a boolean, or the body isn't valid JSON.
401 Unauthorized
Missing or invalid auth.
415 Unsupported Media Type
The Content-Type: application/json header is missing.
500 Internal Server Error
Failed to update preferences.
Request
curl -X PUT "https://api.ngris.com/v1/user/email-preferences" \ -H "X-API-KEY: <your_api_key>" \ -H "Content-Type: application/json" \ -d '{ "marketing_consent": false }'
Response — 200 OK
{ "marketing_consent": false }