curl --request PATCH \
--url https://api.edenai.run/v3/manage/organization/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"zero_data_retention": true,
"allowed_regions": [],
"rbac_enabled": true,
"default_guardrail_id": 123,
"sso_required": true
}
'import requests
url = "https://api.edenai.run/v3/manage/organization/"
payload = {
"name": "<string>",
"zero_data_retention": True,
"allowed_regions": [],
"rbac_enabled": True,
"default_guardrail_id": 123,
"sso_required": 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({
name: '<string>',
zero_data_retention: true,
allowed_regions: [],
rbac_enabled: true,
default_guardrail_id: 123,
sso_required: true
})
};
fetch('https://api.edenai.run/v3/manage/organization/', 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.edenai.run/v3/manage/organization/",
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>',
'zero_data_retention' => true,
'allowed_regions' => [
],
'rbac_enabled' => true,
'default_guardrail_id' => 123,
'sso_required' => 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://api.edenai.run/v3/manage/organization/"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"zero_data_retention\": true,\n \"allowed_regions\": [],\n \"rbac_enabled\": true,\n \"default_guardrail_id\": 123,\n \"sso_required\": 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://api.edenai.run/v3/manage/organization/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"zero_data_retention\": true,\n \"allowed_regions\": [],\n \"rbac_enabled\": true,\n \"default_guardrail_id\": 123,\n \"sso_required\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.edenai.run/v3/manage/organization/")
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 \"zero_data_retention\": true,\n \"allowed_regions\": [],\n \"rbac_enabled\": true,\n \"default_guardrail_id\": 123,\n \"sso_required\": true\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"name": "<string>",
"rbac_enabled": true,
"default_guardrail": {
"id": 123,
"name": "<string>",
"is_active": true
},
"zero_data_retention": true,
"allowed_regions": [
"eu"
],
"sso_enabled": true,
"sso_required": true,
"scim_enabled": true,
"audit_logs_enabled": true
}Update the organization's settings
Changes the organization’s name, role-based access control, default guardrail, zero data retention, allowed regions or SSO requirement. Only the fields you send are changed. Every change except the default guardrail is recorded in your audit log, as it is from the dashboard. The request is applied whole or not at all: an invalid field (400) changes nothing. Single sign-on itself and directory sync are set up from the dashboard. Requires the manage:write scope.
curl --request PATCH \
--url https://api.edenai.run/v3/manage/organization/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"zero_data_retention": true,
"allowed_regions": [],
"rbac_enabled": true,
"default_guardrail_id": 123,
"sso_required": true
}
'import requests
url = "https://api.edenai.run/v3/manage/organization/"
payload = {
"name": "<string>",
"zero_data_retention": True,
"allowed_regions": [],
"rbac_enabled": True,
"default_guardrail_id": 123,
"sso_required": 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({
name: '<string>',
zero_data_retention: true,
allowed_regions: [],
rbac_enabled: true,
default_guardrail_id: 123,
sso_required: true
})
};
fetch('https://api.edenai.run/v3/manage/organization/', 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.edenai.run/v3/manage/organization/",
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>',
'zero_data_retention' => true,
'allowed_regions' => [
],
'rbac_enabled' => true,
'default_guardrail_id' => 123,
'sso_required' => 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://api.edenai.run/v3/manage/organization/"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"zero_data_retention\": true,\n \"allowed_regions\": [],\n \"rbac_enabled\": true,\n \"default_guardrail_id\": 123,\n \"sso_required\": 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://api.edenai.run/v3/manage/organization/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"zero_data_retention\": true,\n \"allowed_regions\": [],\n \"rbac_enabled\": true,\n \"default_guardrail_id\": 123,\n \"sso_required\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.edenai.run/v3/manage/organization/")
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 \"zero_data_retention\": true,\n \"allowed_regions\": [],\n \"rbac_enabled\": true,\n \"default_guardrail_id\": 123,\n \"sso_required\": true\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"name": "<string>",
"rbac_enabled": true,
"default_guardrail": {
"id": 123,
"name": "<string>",
"is_active": true
},
"zero_data_retention": true,
"allowed_regions": [
"eu"
],
"sso_enabled": true,
"sso_required": true,
"scim_enabled": true,
"audit_logs_enabled": true
}Authorizations
Body
Settings to change; only the fields you send are changed.
name: up to 200 characters, no line breaks or invisible characters. rbac_enabled: turning
it on gives every member without a role the Member role; turning it off keeps the roles but
stops enforcing them. default_guardrail_id: one of the organization's guardrails, or null for
none. zero_data_retention: turning it on also turns request saving and the response cache off
for every member. allowed_regions: eu, us and/or ap, empty for any. sso_required
needs single sign-on to be set up first.
Response
The organization's settings.
rbac_enabled: whether roles decide what members may do. default_guardrail applies to every
member and key unless a closer guardrail (key, member, role) sets the same limit; it may be
paused (is_active: false). zero_data_retention: Eden AI stores no request content and
routes only to providers that retain none. allowed_regions: the regions requests may be
processed in, empty for any. sso_enabled and scim_enabled say whether single sign-on and
directory sync are set up (from the dashboard); sso_required refuses any other sign-in.
audit_logs_enabled says whether changes are recorded in your audit log.