Skip to content

Searches for WordPress users who are not yet members of a space, for the add-member picker.

space_id is required and must reference a real space. The search is limited to 100 candidates. Email addresses are only included for community moderators who also hold the WordPress list_users capability. On multisite the search is restricted to users with capabilities on the current site.

Endpoint

  • Method: GET

  • Path: /spaces/users/search

  • Edition: Core

  • Controller: SpaceController@getOtherUsers

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

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

  • Requires the can_add_member permission in the space named by space_id.

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.

GET Search Space Users

GET
/spaces/users/search

Searches for WordPress users who are not yet members of a space, for the add-member picker.

Controller: SpaceController@getOtherUsers
Route source: fluent-community/app/Http/Routes/api.php:29

Authorizations

ApplicationPasswords

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

Type
API Key (header: Authorization)

Parameters

Query Parameters

space_id*

Space ID read via $request->get() in getOtherUsers(). Space ID validated in getOtherUsers().

Type
string
Required
search

Search read via $request->getSafe() in getOtherUsers().

Type
string

Responses

Successful response

application/json
JSON
{
  
"users": {
  
  
"current_page": 0,
  
  
"data": [
  
  
  
{
  
  
  
  
"ID": 0,
  
  
  
  
"display_name": "string",
  
  
  
  
"photo": "string",
  
  
  
  
"user_email": "string"
  
  
  
}
  
  
],
  
  
"first_page_url": "string",
  
  
"from": 0,
  
  
"last_page": 0,
  
  
"last_page_url": "string",
  
  
"links": [
  
  
  
{
  
  
  
  
"active": true,
  
  
  
  
"label": "string",
  
  
  
  
"url": "string"
  
  
  
}
  
  
],
  
  
"next_page_url": "string",
  
  
"path": "string",
  
  
"per_page": 0,
  
  
"prev_page_url": "string",
  
  
"to": 0,
  
  
"total": 0
  
}
}

Playground

Authorization
Variables
Key
Value

Samples

Powered by VitePress OpenAPI

FluentCommunity developer documentation