Skip to content

Updates a space record and its settings, and returns a redirect URL when the change altered its slug.

The payload is nested under data. A blank title is rejected and a slug already taken by another space is rejected. Turning on topic_required requires the space to end up with at least one topic, whether from the payload or from what is already attached. Sending a media field empty clears that image. topic_ids, when present, replaces the topic set and is trimmed to the configured maximum. Any meta_settings block is dispatched to per-provider hooks rather than stored directly.

Endpoint

  • Method: PUT

  • Path: /spaces/{spaceSlug}/by-slug

  • Edition: Core

  • Controller: SpaceController@patchBySlug

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

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

  • Requires community-admin access or the admin role in this space.

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.

PUT Update Space By Slug

PUT
/spaces/{spaceSlug}/by-slug

Updates a space record and its settings, and returns a redirect URL when the change altered its slug.

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

Authorizations

ApplicationPasswords

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

Type
API Key (header: Authorization)

Parameters

Path Parameters

spaceSlug*

SpaceSlug extracted from the URL path.

Type
string
Required

Request Body

application/json
JSON
{
  
"data": {
  
  
"title": "string",
  
  
"settings": {
  
  
  
"topic_required": "string"
  
  
},
  
  
"topic_ids": [
  
  
  
"string"
  
  
]
  
},
  
"meta_settings": [
  
  
"string"
  
]
}

Responses

Successful response

application/json
JSON
{
  
"message": "string",
  
"redirect_url": "string"
}

Playground

Authorization
Variables
Key
Value
Body

Samples

Powered by VitePress OpenAPI

FluentCommunity developer documentation