curl --request POST \
--url https://scribe.skeptrune.com/api/orgs \
--header 'Content-Type: application/json' \
--cookie scribe_session= \
--data '
{
"name": "Rocket Co."
}
'import requests
url = "https://scribe.skeptrune.com/api/orgs"
payload = { "name": "Rocket Co." }
headers = {
"cookie": "scribe_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'scribe_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Rocket Co.'})
};
fetch('https://scribe.skeptrune.com/api/orgs', 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/orgs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Rocket Co.'
]),
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/orgs"
payload := strings.NewReader("{\n \"name\": \"Rocket Co.\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://scribe.skeptrune.com/api/orgs")
.header("cookie", "scribe_session=")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Rocket Co.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://scribe.skeptrune.com/api/orgs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = 'scribe_session='
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Rocket Co.\"\n}"
response = http.request(request)
puts response.read_body{
"org": {
"id": "org_4kBnQpR7sT2vWxYz01ab",
"name": "Acme Inc.",
"slug": "acme",
"iconUrl": "/api/uploads/orgs/org_4kBnQpR7sT2vWxYz01ab/icon",
"memberCount": 1,
"createdAt": 1752624000000,
"updatedAt": 1752624000000
},
"role": "owner"
}{
"error": {
"code": "not_found",
"message": "No such document."
}
}{
"error": {
"code": "not_found",
"message": "No such document."
}
}{
"error": {
"code": "not_found",
"message": "No such document."
}
}Create an organization
Creates a new organization with the caller as its sole owner. The URL-safe slug is derived from the name and uniquified with a numeric suffix when taken. The new organization becomes the caller’s default only when they have none. Note the plural path: POST /api/orgs creates organizations, while the singular /api/org routes address the organization the request is scoped to. Requires a user session — API keys are bound to one organization and cannot create more.
curl --request POST \
--url https://scribe.skeptrune.com/api/orgs \
--header 'Content-Type: application/json' \
--cookie scribe_session= \
--data '
{
"name": "Rocket Co."
}
'import requests
url = "https://scribe.skeptrune.com/api/orgs"
payload = { "name": "Rocket Co." }
headers = {
"cookie": "scribe_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'scribe_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Rocket Co.'})
};
fetch('https://scribe.skeptrune.com/api/orgs', 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/orgs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Rocket Co.'
]),
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/orgs"
payload := strings.NewReader("{\n \"name\": \"Rocket Co.\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://scribe.skeptrune.com/api/orgs")
.header("cookie", "scribe_session=")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Rocket Co.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://scribe.skeptrune.com/api/orgs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = 'scribe_session='
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Rocket Co.\"\n}"
response = http.request(request)
puts response.read_body{
"org": {
"id": "org_4kBnQpR7sT2vWxYz01ab",
"name": "Acme Inc.",
"slug": "acme",
"iconUrl": "/api/uploads/orgs/org_4kBnQpR7sT2vWxYz01ab/icon",
"memberCount": 1,
"createdAt": 1752624000000,
"updatedAt": 1752624000000
},
"role": "owner"
}{
"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
Name of the new organization.
Create a new organization.
Name of the new organization. Its URL-safe slug is derived from this name.
1 - 200"Rocket Co."
Response
The created organization and the caller’s role in it.
A freshly created organization together with the creator's role in it.
An organization (workspace) including its member count.
Show child attributes
Show child attributes
{
"id": "org_4kBnQpR7sT2vWxYz01ab",
"name": "Acme Inc.",
"slug": "acme",
"iconUrl": "/api/uploads/orgs/org_4kBnQpR7sT2vWxYz01ab/icon",
"memberCount": 12,
"createdAt": 1752624000000,
"updatedAt": 1752624000000
}
The caller's role in the organization they just created — always 'owner'.
owner, admin, member "member"