curl --request PATCH \
--url https://scribe.skeptrune.com/api/org \
--header 'Content-Type: application/json' \
--cookie scribe_session= \
--data '
{
"name": "Acme Inc."
}
'import requests
url = "https://scribe.skeptrune.com/api/org"
payload = { "name": "Acme Inc." }
headers = {
"cookie": "scribe_session=",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {cookie: 'scribe_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Acme Inc.'})
};
fetch('https://scribe.skeptrune.com/api/org', 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://scribe.skeptrune.com/api/org",
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' => 'Acme Inc.'
]),
CURLOPT_COOKIE => "scribe_session=",
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://scribe.skeptrune.com/api/org"
payload := strings.NewReader("{\n \"name\": \"Acme Inc.\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("cookie", "scribe_session=")
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://scribe.skeptrune.com/api/org")
.header("cookie", "scribe_session=")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Acme Inc.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://scribe.skeptrune.com/api/org")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["cookie"] = 'scribe_session='
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Acme Inc.\"\n}"
response = http.request(request)
puts response.read_body{
"id": "org_4kBnQpR7sT2vWxYz01ab",
"name": "Acme Inc.",
"slug": "acme",
"iconUrl": "/api/uploads/orgs/org_4kBnQpR7sT2vWxYz01ab/icon",
"memberCount": 12,
"createdAt": 1752624000000,
"updatedAt": 1752624000000
}{
"error": {
"code": "not_found",
"message": "No such document."
}
}{
"error": {
"code": "not_found",
"message": "No such document."
}
}{
"error": {
"code": "not_found",
"message": "No such document."
}
}{
"error": {
"code": "not_found",
"message": "No such document."
}
}Update the organization
Renames the organization and re-derives its URL-safe slug from the new name (uniquified with a numeric suffix when taken by another organization), so organization URLs change after a rename. Requires a user session with the admin role or higher — organization settings cannot be changed with an API key.
curl --request PATCH \
--url https://scribe.skeptrune.com/api/org \
--header 'Content-Type: application/json' \
--cookie scribe_session= \
--data '
{
"name": "Acme Inc."
}
'import requests
url = "https://scribe.skeptrune.com/api/org"
payload = { "name": "Acme Inc." }
headers = {
"cookie": "scribe_session=",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {cookie: 'scribe_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Acme Inc.'})
};
fetch('https://scribe.skeptrune.com/api/org', 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://scribe.skeptrune.com/api/org",
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' => 'Acme Inc.'
]),
CURLOPT_COOKIE => "scribe_session=",
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://scribe.skeptrune.com/api/org"
payload := strings.NewReader("{\n \"name\": \"Acme Inc.\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("cookie", "scribe_session=")
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://scribe.skeptrune.com/api/org")
.header("cookie", "scribe_session=")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Acme Inc.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://scribe.skeptrune.com/api/org")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["cookie"] = 'scribe_session='
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Acme Inc.\"\n}"
response = http.request(request)
puts response.read_body{
"id": "org_4kBnQpR7sT2vWxYz01ab",
"name": "Acme Inc.",
"slug": "acme",
"iconUrl": "/api/uploads/orgs/org_4kBnQpR7sT2vWxYz01ab/icon",
"memberCount": 12,
"createdAt": 1752624000000,
"updatedAt": 1752624000000
}{
"error": {
"code": "not_found",
"message": "No such document."
}
}{
"error": {
"code": "not_found",
"message": "No such document."
}
}{
"error": {
"code": "not_found",
"message": "No such document."
}
}{
"error": {
"code": "not_found",
"message": "No such document."
}
}Authorizations
Browser session cookie set by the WorkOS sign-in flow.
Body
Payload carrying the new organization name.
Organization fields to update.
New organization name.
1 - 200"Acme Inc."
Response
The updated organization.
An organization (workspace) including its member count.
Organization id.
"org_4kBnQpR7sT2vWxYz01ab"
Organization name.
"Acme Inc."
URL-safe organization slug.
"acme"
URL of the organization icon, or null when none is set.
"/api/uploads/orgs/org_4kBnQpR7sT2vWxYz01ab/icon"
Number of members in the organization.
12
When the organization was created (epoch milliseconds).
1752624000000
When the organization was last updated (epoch milliseconds).
1752624000000