Update organization (owner only)
curl --request PUT \
--url https://api.example.com/organizations/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Acme Corporation",
"logo": "https://example.com/logo.png"
}
'import requests
url = "https://api.example.com/organizations/{id}"
payload = {
"name": "Acme Corporation",
"logo": "https://example.com/logo.png"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Acme Corporation', logo: 'https://example.com/logo.png'})
};
fetch('https://api.example.com/organizations/{id}', 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.example.com/organizations/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Acme Corporation',
'logo' => 'https://example.com/logo.png'
]),
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.example.com/organizations/{id}"
payload := strings.NewReader("{\n \"name\": \"Acme Corporation\",\n \"logo\": \"https://example.com/logo.png\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.example.com/organizations/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Acme Corporation\",\n \"logo\": \"https://example.com/logo.png\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/organizations/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Acme Corporation\",\n \"logo\": \"https://example.com/logo.png\"\n}"
response = http.request(request)
puts response.read_bodyOrganizations
Update Organization
⚠️ SECURITY: Only the organization OWNER can update organization details. Admins and members cannot perform this action.
PUT
/
organizations
/
{id}
Update organization (owner only)
curl --request PUT \
--url https://api.example.com/organizations/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Acme Corporation",
"logo": "https://example.com/logo.png"
}
'import requests
url = "https://api.example.com/organizations/{id}"
payload = {
"name": "Acme Corporation",
"logo": "https://example.com/logo.png"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Acme Corporation', logo: 'https://example.com/logo.png'})
};
fetch('https://api.example.com/organizations/{id}', 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.example.com/organizations/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Acme Corporation',
'logo' => 'https://example.com/logo.png'
]),
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.example.com/organizations/{id}"
payload := strings.NewReader("{\n \"name\": \"Acme Corporation\",\n \"logo\": \"https://example.com/logo.png\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.example.com/organizations/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Acme Corporation\",\n \"logo\": \"https://example.com/logo.png\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/organizations/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Acme Corporation\",\n \"logo\": \"https://example.com/logo.png\"\n}"
response = http.request(request)
puts response.read_bodyUpdates organization details.
Authentication
This endpoint requires authentication via Bearer token:- Authorization:
Bearer <token>
⚠️ Security
Only the organization OWNER can update organization details. Admins and members cannot perform this action. This is enforced at the business logic layer.Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Organization UUID |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | Organization name (3-100 characters) |
logo | string | No | URL to organization logo image |
Updatable Fields
- Organization name: Can be changed anytime
- Logo URL: Can be updated or removed
Example Request
curl -X PUT https://api.timbrix.mx/organizations/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer <your_token>" \
-H "Content-Type: application/json" \
-d '{
"name": "Acme Corporation",
"logo": "https://example.com/new-logo.png"
}'
import { Timbrix } from "@timbrix/sdk"
const client = new Timbrix({ bearerToken: "<your_token>" })
const organization = await client.organizations.update(
"550e8400-e29b-41d4-a716-446655440000",
{
name: "Acme Corporation",
logo: "https://example.com/new-logo.png",
}
)
console.log(organization)
Example Response
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Acme Corporation",
"slug": "acme-corp",
"logo": "https://example.com/new-logo.png",
"plan": "pro",
"ownerId": "123e4567-e89b-12d3-a456-426614174000",
"createdAt": "2025-01-26T10:00:00Z",
"updatedAt": "2025-12-26T15:30:00Z"
}
Common Errors
403 Forbidden
Only the owner can update organization details.{
"statusCode": 403,
"message": "Access denied. Only the organization owner can update organization details"
}
404 Not Found
The organization with the specified ID does not exist.{
"statusCode": 404,
"message": "Organization not found"
}
400 Bad Request
Invalid input data (e.g., name too short).{
"statusCode": 400,
"message": ["name must be at least 3 characters long"]
}
Best Practices
- Update organization name to reflect rebranding
- Use high-quality logos (recommended: 512x512px, PNG or SVG)
- Keep logo file size under 2MB
- Consider notifying team members of significant changes
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
Response
Organization updated successfully by the owner.