Update Organization
curl --request PATCH \
--url https://api.bunship.com/api/v1/organizations/{orgId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": {},
"logoUrl": {},
"settings": {
"settings.branding": {},
"settings.features": {},
"settings.billing": {}
}
}
'import requests
url = "https://api.bunship.com/api/v1/organizations/{orgId}"
payload = {
"name": "<string>",
"description": {},
"logoUrl": {},
"settings": {
"settings.branding": {},
"settings.features": {},
"settings.billing": {}
}
}
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({
name: '<string>',
description: {},
logoUrl: {},
settings: {'settings.branding': {}, 'settings.features': {}, 'settings.billing': {}}
})
};
fetch('https://api.bunship.com/api/v1/organizations/{orgId}', 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.bunship.com/api/v1/organizations/{orgId}",
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' => '<string>',
'description' => [
],
'logoUrl' => [
],
'settings' => [
'settings.branding' => [
],
'settings.features' => [
],
'settings.billing' => [
]
]
]),
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.bunship.com/api/v1/organizations/{orgId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": {},\n \"logoUrl\": {},\n \"settings\": {\n \"settings.branding\": {},\n \"settings.features\": {},\n \"settings.billing\": {}\n }\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.bunship.com/api/v1/organizations/{orgId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": {},\n \"logoUrl\": {},\n \"settings\": {\n \"settings.branding\": {},\n \"settings.features\": {},\n \"settings.billing\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bunship.com/api/v1/organizations/{orgId}")
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 \"name\": \"<string>\",\n \"description\": {},\n \"logoUrl\": {},\n \"settings\": {\n \"settings.branding\": {},\n \"settings.features\": {},\n \"settings.billing\": {}\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "org_cld2abc123def456",
"name": "Acme Corporation",
"slug": "acme-corp",
"description": "Building the future of widgets since 2024",
"logoUrl": "https://cdn.bunship.com/logos/acme-v2.png",
"settings": {
"branding": {
"primaryColor": "#4338CA",
"accentColor": "#818CF8"
},
"features": {
"webhooks": true,
"apiAccess": true
}
},
"createdBy": "usr_cld2abc123def456",
"createdAt": "2024-01-15T10:00:00Z",
"updatedAt": "2024-01-21T09:00:00Z"
}
Organizations
Update Organization
Update organization details
PATCH
/
api
/
v1
/
organizations
/
{orgId}
Update Organization
curl --request PATCH \
--url https://api.bunship.com/api/v1/organizations/{orgId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": {},
"logoUrl": {},
"settings": {
"settings.branding": {},
"settings.features": {},
"settings.billing": {}
}
}
'import requests
url = "https://api.bunship.com/api/v1/organizations/{orgId}"
payload = {
"name": "<string>",
"description": {},
"logoUrl": {},
"settings": {
"settings.branding": {},
"settings.features": {},
"settings.billing": {}
}
}
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({
name: '<string>',
description: {},
logoUrl: {},
settings: {'settings.branding': {}, 'settings.features': {}, 'settings.billing': {}}
})
};
fetch('https://api.bunship.com/api/v1/organizations/{orgId}', 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.bunship.com/api/v1/organizations/{orgId}",
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' => '<string>',
'description' => [
],
'logoUrl' => [
],
'settings' => [
'settings.branding' => [
],
'settings.features' => [
],
'settings.billing' => [
]
]
]),
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.bunship.com/api/v1/organizations/{orgId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": {},\n \"logoUrl\": {},\n \"settings\": {\n \"settings.branding\": {},\n \"settings.features\": {},\n \"settings.billing\": {}\n }\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.bunship.com/api/v1/organizations/{orgId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": {},\n \"logoUrl\": {},\n \"settings\": {\n \"settings.branding\": {},\n \"settings.features\": {},\n \"settings.billing\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bunship.com/api/v1/organizations/{orgId}")
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 \"name\": \"<string>\",\n \"description\": {},\n \"logoUrl\": {},\n \"settings\": {\n \"settings.branding\": {},\n \"settings.features\": {},\n \"settings.billing\": {}\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "org_cld2abc123def456",
"name": "Acme Corporation",
"slug": "acme-corp",
"description": "Building the future of widgets since 2024",
"logoUrl": "https://cdn.bunship.com/logos/acme-v2.png",
"settings": {
"branding": {
"primaryColor": "#4338CA",
"accentColor": "#818CF8"
},
"features": {
"webhooks": true,
"apiAccess": true
}
},
"createdBy": "usr_cld2abc123def456",
"createdAt": "2024-01-15T10:00:00Z",
"updatedAt": "2024-01-21T09:00:00Z"
}
Updates an organization’s details. Only included fields are modified. Settings are merged with existing values. Requires the
org:update permission (available to owners and admins).
Auth
Requires a valid Bearer token with
org:update permission.Path Parameters
Organization identifier.
Request Body
All fields are optional. Include only the fields you want to change.Updated organization name. Between 1 and 100 characters.
Updated description. Maximum 500 characters. Set to
null to remove.Updated logo URL. Must be a valid URI. Set to
null to remove.Partial settings object. Merged with existing settings.
Response
Returns the full updated organization object. See Get Organization for the complete response schema.{
"id": "org_cld2abc123def456",
"name": "Acme Corporation",
"slug": "acme-corp",
"description": "Building the future of widgets since 2024",
"logoUrl": "https://cdn.bunship.com/logos/acme-v2.png",
"settings": {
"branding": {
"primaryColor": "#4338CA",
"accentColor": "#818CF8"
},
"features": {
"webhooks": true,
"apiAccess": true
}
},
"createdBy": "usr_cld2abc123def456",
"createdAt": "2024-01-15T10:00:00Z",
"updatedAt": "2024-01-21T09:00:00Z"
}
Errors
| Status | Code | Description |
|---|---|---|
400 | VALIDATION_ERROR | Invalid field value |
401 | AUTHENTICATION_ERROR | Missing or invalid Bearer token |
403 | AUTHORIZATION_ERROR | Insufficient permissions (org:update required) |
404 | NOT_FOUND | Organization not found |
Example
curl -X PATCH https://api.bunship.com/api/v1/organizations/org_cld2abc123def456 \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \
-H "Content-Type: application/json" \
-d '{
"name": "Acme Corporation",
"settings": {
"branding": {
"primaryColor": "#4338CA"
}
}
}'
⌘I

