Flip Inherit Flag
curl --request PATCH \
--url https://api.sublay.io/v7/:projectId/workspaces/:id/inherit-flag \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"inheritsFromParent": true,
"userId": "<string>"
}
'import requests
url = "https://api.sublay.io/v7/:projectId/workspaces/:id/inherit-flag"
payload = {
"inheritsFromParent": True,
"userId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({inheritsFromParent: true, userId: '<string>'})
};
fetch('https://api.sublay.io/v7/:projectId/workspaces/:id/inherit-flag', 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/v7/:projectId/workspaces/:id/inherit-flag",
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([
'inheritsFromParent' => true,
'userId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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/v7/:projectId/workspaces/:id/inherit-flag"
payload := strings.NewReader("{\n \"inheritsFromParent\": true,\n \"userId\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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/v7/:projectId/workspaces/:id/inherit-flag")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"inheritsFromParent\": true,\n \"userId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sublay.io/v7/:projectId/workspaces/:id/inherit-flag")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"inheritsFromParent\": true,\n \"userId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyWorkspace Endpoints
Flip Inherit Flag
Owner-only flip of the reach/inherit flag
Flip Inherit Flag
curl --request PATCH \
--url https://api.sublay.io/v7/:projectId/workspaces/:id/inherit-flag \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"inheritsFromParent": true,
"userId": "<string>"
}
'import requests
url = "https://api.sublay.io/v7/:projectId/workspaces/:id/inherit-flag"
payload = {
"inheritsFromParent": True,
"userId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({inheritsFromParent: true, userId: '<string>'})
};
fetch('https://api.sublay.io/v7/:projectId/workspaces/:id/inherit-flag', 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/v7/:projectId/workspaces/:id/inherit-flag",
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([
'inheritsFromParent' => true,
'userId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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/v7/:projectId/workspaces/:id/inherit-flag"
payload := strings.NewReader("{\n \"inheritsFromParent\": true,\n \"userId\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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/v7/:projectId/workspaces/:id/inherit-flag")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"inheritsFromParent\": true,\n \"userId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sublay.io/v7/:projectId/workspaces/:id/inherit-flag")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"inheritsFromParent\": true,\n \"userId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyFlips the workspace’s
inheritsFromParent flag — the switch controlling whether authority from above reaches into this node. See Reach & the wall/door rule.
- Owner-only in both directions (the workspace’s own owner or an ancestor owner). Not a capability.
- Subject to the enforced-default lock: if the project sets
workspaces.inheritEnforced, the flip is rejected with403 workspace/inherit-enforced.
Path Parameters
string
required
The workspace UUID.
Body Parameters
boolean
required
The new flag value (
true = open/door, false = sealed/wall).string
Service/master keys only — the user to act as (must be own owner or an ancestor owner).
Response
Returns the updated Workspace object.Error Responses
Unauthorized — 403
Unauthorized — 403
{ "error": "Only the owner or an ancestor owner may flip the inherit flag.", "code": "workspace/unauthorized" }
Inherit Enforced — 403
Inherit Enforced — 403
{ "error": "The project enforces its inherit default; the flag cannot be changed.", "code": "workspace/inherit-enforced" }
⌘I

