Update organization
/organization/{id}
Requires the `org:manage` permission and an active Gold or Black subscription. **`settings` is REPLACED wholesale, not merged**: whatever object you send becomes the entire settings object, so any key you omit is deleted. Read the current organization first and send the merged result. `name` is a normal field update, and omitting a field leaves it untouched. `slug`, `plan` and `region` cannot be changed here.
Path Parameters
Organization id (org_…).
Request Body
Replaces the stored settings object entirely. Omitted keys are lost.
Response Body
Whether the CALLER may delete this organization — the org:delete permission, which only the Org Owner role holds, and never for the platform root organization. Server-computed: branch on this rather than inspecting roles. Always false where the response has no member context to compute it from — the org switcher list GET /organization (one member-context lookup per row would be a per-row round trip), the staff console, and the invite-accept response. It never overstates: trust it when true, and read GET /user/me or GET /organization/{id} (both of which compute it) when you need it for a list row.
Whether the CALLER may cancel a scheduled deletion: the org:manage permission, and only while purge_after is still ahead. Server-computed, like can_delete, and false for the same reasons — no member context (the org switcher list, the staff console) — plus once the window has closed. Read purge_after to tell "too late" from "not yours to undo".
Set when a deletion has been scheduled (DELETE /organization/{id}). The organization is read-only until purge_after. Null otherwise.
Organization id (org_…) — the value for X-Organization-Id.
Public URL of the logo image, or null.
The stored plan: gold, black, or none when locked. This is not the same as the effective entitlement — read GET /organization/{id}/entitlements before gating a feature on it.
When a scheduled deletion becomes permanent — 30 days after deletion_scheduled_at. Null unless scheduled.
Data location fixed at creation: us/eu pin a hard jurisdiction, apac is a placement hint.
Free-form org settings. PATCH /organization/{id} REPLACES this object wholesale.
Immutable after creation.
When staff granted an indefinite trial, or null. Unlocked with no end date: no countdown, no expiry email, billing still reachable.
curl -X PATCH 'https://api.elaichi.ai/organization/<id>' \
-H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"name":"your_name","settings":{}}'const body = {
"name": "your_name",
"settings": {}
};
const response = await fetch('https://api.elaichi.ai/organization/<id>', {
method: 'PATCH',
headers: {
'Authorization': 'Bearer ' + process.env.ELAICHI_API_TOKEN,
'Content-Type': 'application/json',
},
body: JSON.stringify(body),
});
const data = await response.json();
console.log(data);import os
import requests
url = "https://api.elaichi.ai/organization/<id>"
headers = {
"Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
"Content-Type": "application/json",
}
payload = {
"name": "your_name",
"settings": {}
}
response = requests.patch(url, headers=headers, json=payload)
print(response.json())