Update Space
curl --request PATCH \
--url https://api.sublay.io/api/v6/:projectId/api/v7/spaces/:spaceId \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"readingPermission": "<string>",
"postingPermission": "<string>",
"visibility": "<string>",
"metadata": {}
}
'import requests
url = "https://api.sublay.io/api/v6/:projectId/api/v7/spaces/:spaceId"
payload = {
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"readingPermission": "<string>",
"postingPermission": "<string>",
"visibility": "<string>",
"metadata": {}
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
slug: '<string>',
description: '<string>',
readingPermission: '<string>',
postingPermission: '<string>',
visibility: '<string>',
metadata: {}
})
};
fetch('https://api.sublay.io/api/v6/:projectId/api/v7/spaces/:spaceId', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sublay.io/api/v6/:projectId/api/v7/spaces/:spaceId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'slug' => '<string>',
'description' => '<string>',
'readingPermission' => '<string>',
'postingPermission' => '<string>',
'visibility' => '<string>',
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sublay.io/api/v6/:projectId/api/v7/spaces/:spaceId"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"description\": \"<string>\",\n \"readingPermission\": \"<string>\",\n \"postingPermission\": \"<string>\",\n \"visibility\": \"<string>\",\n \"metadata\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.sublay.io/api/v6/:projectId/api/v7/spaces/:spaceId")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"description\": \"<string>\",\n \"readingPermission\": \"<string>\",\n \"postingPermission\": \"<string>\",\n \"visibility\": \"<string>\",\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sublay.io/api/v6/:projectId/api/v7/spaces/:spaceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"description\": \"<string>\",\n \"readingPermission\": \"<string>\",\n \"postingPermission\": \"<string>\",\n \"visibility\": \"<string>\",\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_bodySpace Endpoints
Update Space
Update a space’s settings, name, description, or images
PATCH
/
:projectId
/
api
/
v7
/
spaces
/
:spaceId
Update Space
curl --request PATCH \
--url https://api.sublay.io/api/v6/:projectId/api/v7/spaces/:spaceId \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"readingPermission": "<string>",
"postingPermission": "<string>",
"visibility": "<string>",
"metadata": {}
}
'import requests
url = "https://api.sublay.io/api/v6/:projectId/api/v7/spaces/:spaceId"
payload = {
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"readingPermission": "<string>",
"postingPermission": "<string>",
"visibility": "<string>",
"metadata": {}
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
slug: '<string>',
description: '<string>',
readingPermission: '<string>',
postingPermission: '<string>',
visibility: '<string>',
metadata: {}
})
};
fetch('https://api.sublay.io/api/v6/:projectId/api/v7/spaces/:spaceId', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sublay.io/api/v6/:projectId/api/v7/spaces/:spaceId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'slug' => '<string>',
'description' => '<string>',
'readingPermission' => '<string>',
'postingPermission' => '<string>',
'visibility' => '<string>',
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sublay.io/api/v6/:projectId/api/v7/spaces/:spaceId"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"description\": \"<string>\",\n \"readingPermission\": \"<string>\",\n \"postingPermission\": \"<string>\",\n \"visibility\": \"<string>\",\n \"metadata\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.sublay.io/api/v6/:projectId/api/v7/spaces/:spaceId")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"description\": \"<string>\",\n \"readingPermission\": \"<string>\",\n \"postingPermission\": \"<string>\",\n \"visibility\": \"<string>\",\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sublay.io/api/v6/:projectId/api/v7/spaces/:spaceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"description\": \"<string>\",\n \"readingPermission\": \"<string>\",\n \"postingPermission\": \"<string>\",\n \"visibility\": \"<string>\",\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_bodyUpdates a space. Only the space’s admin can update it. Supports multipart form data for avatar/banner image uploads.
See also: useUpdateSpace
Path Parameters
UUID of the space to update.
Body Parameters
All fields are optional. Only provided fields are updated.Updated display name. 3–100 characters.
Updated URL slug. Pass empty to clear.
Updated description.
"anyone" or "members"."anyone", "members", or "admins"."public", "unlisted", or "private". Controls listing/discoverability, independent of readingPermission. Changes take effect immediately and are freely reversible. See Space visibility.Updated metadata object.
New avatar image. Requires
avatarFile.options when provided.New banner image. Requires
bannerFile.options when provided.Response
Returns the updated SpaceDetailed object.Error Responses
Not Found — 404
Not Found — 404
{ "error": "Space not found.", "code": "space/not-found" }
Forbidden — 403
Forbidden — 403
Caller is not an admin of the space.
⌘I

