Account and organizations
Update organization settings
Owners and admins set whether new sandboxes of the organization start private (only their creator can use them) or shared (every member can use those that hold none of their creator’s logins). The default is shared. Existing sandboxes keep their setting; their creators change it with POST /sandboxes/{sandboxId}/share and POST /sandboxes/{sandboxId}/unshare. A fork of a private sandbox is private.
PATCH
/
orgs
/
{org}
Update organization settings
curl --request PATCH \
--url https://boat.dev/api/v1/orgs/{org} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"newSandboxesPrivate": true
}
'import requests
url = "https://boat.dev/api/v1/orgs/{org}"
payload = { "newSandboxesPrivate": True }
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({newSandboxesPrivate: true})
};
fetch('https://boat.dev/api/v1/orgs/{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://boat.dev/api/v1/orgs/{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([
'newSandboxesPrivate' => true
]),
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://boat.dev/api/v1/orgs/{org}"
payload := strings.NewReader("{\n \"newSandboxesPrivate\": true\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://boat.dev/api/v1/orgs/{org}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"newSandboxesPrivate\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://boat.dev/api/v1/orgs/{org}")
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 \"newSandboxesPrivate\": true\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"type": "org.updated",
"success": true,
"newSandboxesPrivate": true
}{
"ok": false,
"type": "sandbox.error",
"status": 400,
"code": "invalid_json",
"message": "Request body must be valid JSON.",
"error": {
"code": "invalid_json",
"message": "Request body must be valid JSON.",
"status": 400
},
"requestId": "req_01HX..."
}{
"ok": false,
"type": "sandbox.error",
"status": 401,
"code": "unauthorized",
"message": "Unauthorized",
"error": {
"code": "unauthorized",
"message": "Unauthorized",
"status": 401
},
"requestId": "req_01HX..."
}{
"ok": false,
"type": "sandbox.error",
"status": 403,
"code": "forbidden",
"message": "Forbidden",
"error": {
"code": "forbidden",
"message": "Forbidden",
"status": 403
},
"requestId": "req_01HX..."
}Authorizations
Boat bearer token in the form boat_.... Service API keys authenticate sandbox operations.
Path Parameters
Organization id or name.
Body
application/json
True = new sandboxes start private. False = they start shared.
⌘I
Update organization settings
curl --request PATCH \
--url https://boat.dev/api/v1/orgs/{org} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"newSandboxesPrivate": true
}
'import requests
url = "https://boat.dev/api/v1/orgs/{org}"
payload = { "newSandboxesPrivate": True }
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({newSandboxesPrivate: true})
};
fetch('https://boat.dev/api/v1/orgs/{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://boat.dev/api/v1/orgs/{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([
'newSandboxesPrivate' => true
]),
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://boat.dev/api/v1/orgs/{org}"
payload := strings.NewReader("{\n \"newSandboxesPrivate\": true\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://boat.dev/api/v1/orgs/{org}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"newSandboxesPrivate\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://boat.dev/api/v1/orgs/{org}")
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 \"newSandboxesPrivate\": true\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"type": "org.updated",
"success": true,
"newSandboxesPrivate": true
}{
"ok": false,
"type": "sandbox.error",
"status": 400,
"code": "invalid_json",
"message": "Request body must be valid JSON.",
"error": {
"code": "invalid_json",
"message": "Request body must be valid JSON.",
"status": 400
},
"requestId": "req_01HX..."
}{
"ok": false,
"type": "sandbox.error",
"status": 401,
"code": "unauthorized",
"message": "Unauthorized",
"error": {
"code": "unauthorized",
"message": "Unauthorized",
"status": 401
},
"requestId": "req_01HX..."
}{
"ok": false,
"type": "sandbox.error",
"status": 403,
"code": "forbidden",
"message": "Forbidden",
"error": {
"code": "forbidden",
"message": "Forbidden",
"status": 403
},
"requestId": "req_01HX..."
}