Skip to content

Grants or replaces the FluentCommunity role set for one WordPress user, creating their community profile if they do not have one yet.

user_id and a non-empty roles array are required. Granting admin discards every other role in the payload, and course_admin supersedes course_creatror. Existing managers are updated in place; the role set is stored whole, so omitting a role removes it.

Endpoint

  • Method: POST

  • Path: /admin/managers

  • Edition: PRO

  • Controller: ProAdminController@addOrUpdateManager

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

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

  • Requires the FluentCommunity community-admin permission (or a WordPress super admin).

  • Requires FluentCommunity Pro.

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 Admin Manager

POST
/admin/managers

Grants or replaces the FluentCommunity role set for one WordPress user, creating their community profile if they do not have one yet.

Controller: ProAdminController@addOrUpdateManager
Route source: fluent-community-pro/app/Http/Routes/api.php:11

Authorizations

ApplicationPasswords

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

Type
API Key (header: Authorization)

Request Body

application/json
JSON
{
  
"user_id": "string",
  
"roles": [
  
  
"string"
  
]
}

Responses

Successful response

application/json
JSON
{
  
"manager": {
  
  
"ID": 0,
  
  
"community_role": {
  
  
  
"created_at": "string",
  
  
  
"id": 0,
  
  
  
"meta_key": "string",
  
  
  
"object_id": "string",
  
  
  
"object_type": "string",
  
  
  
"updated_at": "string",
  
  
  
"value": [
  
  
  
  
{
  
  
  
  
  
"additionalProperties": "string"
  
  
  
  
}
  
  
  
]
  
  
},
  
  
"display_name": "string",
  
  
"photo": "string",
  
  
"user_email": "string",
  
  
"user_login": "string",
  
  
"user_nicename": "string",
  
  
"user_registered": "string",
  
  
"user_status": "string",
  
  
"user_url": "string"
  
},
  
"message": "string"
}

Playground

Authorization
Body

Samples

Powered by VitePress OpenAPI

FluentCommunity developer documentation