package example
import (
context "context"
management "github.com/auth0/go-auth0/management/management"
client "github.com/auth0/go-auth0/management/management/client"
option "github.com/auth0/go-auth0/management/management/option"
)
func do() {
client := client.NewClient(
option.WithToken(
"<token>",
),
)
request := &management.UpdateOrganizationRequestContent{}
client.Organizations.Update(
context.TODO(),
"id",
request,
)
}import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.organizations.update("id", {});
}
main();import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.organizations.update("id", {});
}
main();curl --request PATCH \
--url https://{tenantDomain}/api/v2/organizations/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"display_name": "Acme Users",
"name": "organization-1",
"branding": {
"logo_url": "<string>"
},
"metadata": {},
"token_quota": {
"client_credentials": {
"enforce": true,
"per_day": 1073741824,
"per_hour": 1073741824
}
}
}
'import requests
url = "https://{tenantDomain}/api/v2/organizations/{id}"
payload = {
"display_name": "Acme Users",
"name": "organization-1",
"branding": { "logo_url": "<string>" },
"metadata": {},
"token_quota": { "client_credentials": {
"enforce": True,
"per_day": 1073741824,
"per_hour": 1073741824
} }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenantDomain}/api/v2/organizations/{id}",
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([
'display_name' => 'Acme Users',
'name' => 'organization-1',
'branding' => [
'logo_url' => '<string>'
],
'metadata' => [
],
'token_quota' => [
'client_credentials' => [
'enforce' => true,
'per_day' => 1073741824,
'per_hour' => 1073741824
]
]
]),
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;
}HttpResponse<String> response = Unirest.patch("https://{tenantDomain}/api/v2/organizations/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"display_name\": \"Acme Users\",\n \"name\": \"organization-1\",\n \"branding\": {\n \"logo_url\": \"<string>\"\n },\n \"metadata\": {},\n \"token_quota\": {\n \"client_credentials\": {\n \"enforce\": true,\n \"per_day\": 1073741824,\n \"per_hour\": 1073741824\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}/api/v2/organizations/{id}")
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 \"display_name\": \"Acme Users\",\n \"name\": \"organization-1\",\n \"branding\": {\n \"logo_url\": \"<string>\"\n },\n \"metadata\": {},\n \"token_quota\": {\n \"client_credentials\": {\n \"enforce\": true,\n \"per_day\": 1073741824,\n \"per_hour\": 1073741824\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "organization-1",
"display_name": "Acme Users",
"branding": {
"logo_url": "<string>",
"colors": {
"primary": "<string>",
"page_background": "<string>"
}
},
"metadata": {},
"token_quota": {
"client_credentials": {
"enforce": true,
"per_day": 1073741824,
"per_hour": 1073741824
}
}
}Modify an Organization
Update the details of a specific Organization, such as name and display name, branding options, and metadata.
package example
import (
context "context"
management "github.com/auth0/go-auth0/management/management"
client "github.com/auth0/go-auth0/management/management/client"
option "github.com/auth0/go-auth0/management/management/option"
)
func do() {
client := client.NewClient(
option.WithToken(
"<token>",
),
)
request := &management.UpdateOrganizationRequestContent{}
client.Organizations.Update(
context.TODO(),
"id",
request,
)
}import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.organizations.update("id", {});
}
main();import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.organizations.update("id", {});
}
main();curl --request PATCH \
--url https://{tenantDomain}/api/v2/organizations/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"display_name": "Acme Users",
"name": "organization-1",
"branding": {
"logo_url": "<string>"
},
"metadata": {},
"token_quota": {
"client_credentials": {
"enforce": true,
"per_day": 1073741824,
"per_hour": 1073741824
}
}
}
'import requests
url = "https://{tenantDomain}/api/v2/organizations/{id}"
payload = {
"display_name": "Acme Users",
"name": "organization-1",
"branding": { "logo_url": "<string>" },
"metadata": {},
"token_quota": { "client_credentials": {
"enforce": True,
"per_day": 1073741824,
"per_hour": 1073741824
} }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenantDomain}/api/v2/organizations/{id}",
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([
'display_name' => 'Acme Users',
'name' => 'organization-1',
'branding' => [
'logo_url' => '<string>'
],
'metadata' => [
],
'token_quota' => [
'client_credentials' => [
'enforce' => true,
'per_day' => 1073741824,
'per_hour' => 1073741824
]
]
]),
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;
}HttpResponse<String> response = Unirest.patch("https://{tenantDomain}/api/v2/organizations/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"display_name\": \"Acme Users\",\n \"name\": \"organization-1\",\n \"branding\": {\n \"logo_url\": \"<string>\"\n },\n \"metadata\": {},\n \"token_quota\": {\n \"client_credentials\": {\n \"enforce\": true,\n \"per_day\": 1073741824,\n \"per_hour\": 1073741824\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}/api/v2/organizations/{id}")
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 \"display_name\": \"Acme Users\",\n \"name\": \"organization-1\",\n \"branding\": {\n \"logo_url\": \"<string>\"\n },\n \"metadata\": {},\n \"token_quota\": {\n \"client_credentials\": {\n \"enforce\": true,\n \"per_day\": 1073741824,\n \"per_hour\": 1073741824\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "organization-1",
"display_name": "Acme Users",
"branding": {
"logo_url": "<string>",
"colors": {
"primary": "<string>",
"page_background": "<string>"
}
},
"metadata": {},
"token_quota": {
"client_credentials": {
"enforce": true,
"per_day": 1073741824,
"per_hour": 1073741824
}
}
}Autorisations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Paramètres de chemin
ID of the organization to update.
Corps
Friendly name of this organization.
1 - 255The name of this organization.
1 - 50Theme defines how to style the login pages.
Show child attributes
Show child attributes
Metadata associated with the organization, in the form of an object with string values (max 255 chars). Maximum of 25 metadata properties allowed.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Réponse
Organization successfully updated.
Organization identifier.
50The name of this organization.
1 - 50Friendly name of this organization.
1 - 255Theme defines how to style the login pages.
Show child attributes
Show child attributes
Metadata associated with the organization, in the form of an object with string values (max 255 chars). Maximum of 25 metadata properties allowed.
Show child attributes
Show child attributes
Show child attributes
Show child attributes