Skip to content

Stores the email notification preferences for a member, translating the per-space choices into the underlying subscription rows.

Global toggles are sent as yes or no under user_globals. message_email_frequency accepts disabled, hourly, daily or weekly; anything else leaves the stored value untouched. Under space_prefs, all_member_posts enables notifications for both member and admin posts while admin_only_posts enables only the admin one.

Endpoint

  • Method: POST

  • Path: /profile/{username}/notification-preferences

  • Edition: Core

  • Controller: ProfileController@saveNotificationPreferance

  • Route source: fluent-community/app/Http/Routes/api.php:96

  • Controller source: fluent-community/app/Http/Controllers/ProfileController.php

  • Requires the profile owner or a community moderator.

Live sample

The request and response below were recorded against a running FluentCommunity install and then anonymised — member names, emails, avatars and post content are fictional, and long collections are trimmed to a few entries.

POST Save Notification Preferences

POST
/profile/{username}/notification-preferences

Stores the email notification preferences for a member, translating the per-space choices into the underlying subscription rows.

Controller: ProfileController@saveNotificationPreferance
Route source: fluent-community/app/Http/Routes/api.php:96

Authorizations

ApplicationPasswords

WordPress Application Passwords — use Basic auth with username:application_password.

Type
API Key (header: Authorization)

Parameters

Path Parameters

username*

Username extracted from the URL path.

Type
string
Required

Request Body

application/json
JSON
{
  
"user_globals": {
  
  
"message_email_frequency": "string"
  
},
  
"space_prefs": [
  
  
"string"
  
]
}

Responses

Successful response

application/json
JSON
{
  
"message": "string",
  
"prefs": {
  
  
"email_notification": 0
  
}
}

Playground

Authorization
Variables
Key
Value
Body

Samples

Powered by VitePress OpenAPI

FluentCommunity developer documentation