Change who can change a relationship's links
curl --request PATCH \
--url https://api.journeybee.io/v1/schema/relationships/{key} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expected_revision": 123
}
'import requests
url = "https://api.journeybee.io/v1/schema/relationships/{key}"
payload = { "expected_revision": 123 }
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({expected_revision: 123})
};
fetch('https://api.journeybee.io/v1/schema/relationships/{key}', 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.journeybee.io/v1/schema/relationships/{key}",
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([
'expected_revision' => 123
]),
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.journeybee.io/v1/schema/relationships/{key}"
payload := strings.NewReader("{\n \"expected_revision\": 123\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.journeybee.io/v1/schema/relationships/{key}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"expected_revision\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.journeybee.io/v1/schema/relationships/{key}")
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 \"expected_revision\": 123\n}"
response = http.request(request)
puts response.read_body{
"key": "<string>",
"uuid": "<string>",
"label": "<string>",
"inverse_label": "<string>",
"permission": "team_manage",
"partner_visibility": "private",
"revision": 123
}Schema
Change who can change a relationship's links
Sets who can change a relationship’s links (permission: team_manage for users with the admin or partnerships role, or read_only) and whether partners see them (partner_visibility: shared shows a partner a link only between records they can already see, read-only; private shows none). Changing either keeps every link. The body echoes the relationship’s revision as expected_revision (a preview without one returns it as based_on_revision); a stale one returns 409 and nothing is saved. Needs a company admin. A Buzz agent can only run this as an approved proposal. Repeating a request with the same Idempotency-Key does not save again and returns the relationship as it is now.
PATCH
/
schema
/
relationships
/
{key}
Change who can change a relationship's links
curl --request PATCH \
--url https://api.journeybee.io/v1/schema/relationships/{key} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expected_revision": 123
}
'import requests
url = "https://api.journeybee.io/v1/schema/relationships/{key}"
payload = { "expected_revision": 123 }
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({expected_revision: 123})
};
fetch('https://api.journeybee.io/v1/schema/relationships/{key}', 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.journeybee.io/v1/schema/relationships/{key}",
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([
'expected_revision' => 123
]),
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.journeybee.io/v1/schema/relationships/{key}"
payload := strings.NewReader("{\n \"expected_revision\": 123\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.journeybee.io/v1/schema/relationships/{key}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"expected_revision\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.journeybee.io/v1/schema/relationships/{key}")
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 \"expected_revision\": 123\n}"
response = http.request(request)
puts response.read_body{
"key": "<string>",
"uuid": "<string>",
"label": "<string>",
"inverse_label": "<string>",
"permission": "team_manage",
"partner_visibility": "private",
"revision": 123
}Authorizations
Body
application/json
- Option 1
- Option 2
Response
200 - application/json
Default Response