Update organization settings
curl --request POST \
--url https://www.asteragents.com/api/orgSettings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"settings": {
"asterAgent": true,
"defaultAgentId": 123,
"spendCaps": {
"daily": 123,
"weekly": 123,
"monthly": 123
},
"sidebarPinnedAppIds": [
123
],
"sidebarLinks": [
{
"label": "<string>",
"url": "<string>",
"icon": "<string>"
}
],
"feedbackModal": {
"customHtml": "<string>"
}
}
}
'import requests
url = "https://www.asteragents.com/api/orgSettings"
payload = { "settings": {
"asterAgent": True,
"defaultAgentId": 123,
"spendCaps": {
"daily": 123,
"weekly": 123,
"monthly": 123
},
"sidebarPinnedAppIds": [123],
"sidebarLinks": [
{
"label": "<string>",
"url": "<string>",
"icon": "<string>"
}
],
"feedbackModal": { "customHtml": "<string>" }
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
settings: {
asterAgent: true,
defaultAgentId: 123,
spendCaps: {daily: 123, weekly: 123, monthly: 123},
sidebarPinnedAppIds: [123],
sidebarLinks: [{label: '<string>', url: '<string>', icon: '<string>'}],
feedbackModal: {customHtml: '<string>'}
}
})
};
fetch('https://www.asteragents.com/api/orgSettings', 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://www.asteragents.com/api/orgSettings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'settings' => [
'asterAgent' => true,
'defaultAgentId' => 123,
'spendCaps' => [
'daily' => 123,
'weekly' => 123,
'monthly' => 123
],
'sidebarPinnedAppIds' => [
123
],
'sidebarLinks' => [
[
'label' => '<string>',
'url' => '<string>',
'icon' => '<string>'
]
],
'feedbackModal' => [
'customHtml' => '<string>'
]
]
]),
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://www.asteragents.com/api/orgSettings"
payload := strings.NewReader("{\n \"settings\": {\n \"asterAgent\": true,\n \"defaultAgentId\": 123,\n \"spendCaps\": {\n \"daily\": 123,\n \"weekly\": 123,\n \"monthly\": 123\n },\n \"sidebarPinnedAppIds\": [\n 123\n ],\n \"sidebarLinks\": [\n {\n \"label\": \"<string>\",\n \"url\": \"<string>\",\n \"icon\": \"<string>\"\n }\n ],\n \"feedbackModal\": {\n \"customHtml\": \"<string>\"\n }\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://www.asteragents.com/api/orgSettings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"settings\": {\n \"asterAgent\": true,\n \"defaultAgentId\": 123,\n \"spendCaps\": {\n \"daily\": 123,\n \"weekly\": 123,\n \"monthly\": 123\n },\n \"sidebarPinnedAppIds\": [\n 123\n ],\n \"sidebarLinks\": [\n {\n \"label\": \"<string>\",\n \"url\": \"<string>\",\n \"icon\": \"<string>\"\n }\n ],\n \"feedbackModal\": {\n \"customHtml\": \"<string>\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.asteragents.com/api/orgSettings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"settings\": {\n \"asterAgent\": true,\n \"defaultAgentId\": 123,\n \"spendCaps\": {\n \"daily\": 123,\n \"weekly\": 123,\n \"monthly\": 123\n },\n \"sidebarPinnedAppIds\": [\n 123\n ],\n \"sidebarLinks\": [\n {\n \"label\": \"<string>\",\n \"url\": \"<string>\",\n \"icon\": \"<string>\"\n }\n ],\n \"feedbackModal\": {\n \"customHtml\": \"<string>\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"message": "Settings updated successfully"
}{
"error": "Bad Request",
"details": [
{}
]
}{
"error": "Bad Request",
"details": [
{}
]
}{
"error": "Internal Server Error"
}Organization Settings API
Update organization settings
Merges the keys you send into the organization’s settings; keys you leave out are unchanged.
Requires Control Hub access. asterAgent, spendCaps, sidebarLinks and sidebarPinnedAppIds can only be changed by an org admin.
To turn off Aster (the built-in agent that helps people find the right agent, app or page) when provisioning an organization:
{ "settings": { "asterAgent": false } }
POST
/
orgSettings
Update organization settings
curl --request POST \
--url https://www.asteragents.com/api/orgSettings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"settings": {
"asterAgent": true,
"defaultAgentId": 123,
"spendCaps": {
"daily": 123,
"weekly": 123,
"monthly": 123
},
"sidebarPinnedAppIds": [
123
],
"sidebarLinks": [
{
"label": "<string>",
"url": "<string>",
"icon": "<string>"
}
],
"feedbackModal": {
"customHtml": "<string>"
}
}
}
'import requests
url = "https://www.asteragents.com/api/orgSettings"
payload = { "settings": {
"asterAgent": True,
"defaultAgentId": 123,
"spendCaps": {
"daily": 123,
"weekly": 123,
"monthly": 123
},
"sidebarPinnedAppIds": [123],
"sidebarLinks": [
{
"label": "<string>",
"url": "<string>",
"icon": "<string>"
}
],
"feedbackModal": { "customHtml": "<string>" }
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
settings: {
asterAgent: true,
defaultAgentId: 123,
spendCaps: {daily: 123, weekly: 123, monthly: 123},
sidebarPinnedAppIds: [123],
sidebarLinks: [{label: '<string>', url: '<string>', icon: '<string>'}],
feedbackModal: {customHtml: '<string>'}
}
})
};
fetch('https://www.asteragents.com/api/orgSettings', 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://www.asteragents.com/api/orgSettings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'settings' => [
'asterAgent' => true,
'defaultAgentId' => 123,
'spendCaps' => [
'daily' => 123,
'weekly' => 123,
'monthly' => 123
],
'sidebarPinnedAppIds' => [
123
],
'sidebarLinks' => [
[
'label' => '<string>',
'url' => '<string>',
'icon' => '<string>'
]
],
'feedbackModal' => [
'customHtml' => '<string>'
]
]
]),
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://www.asteragents.com/api/orgSettings"
payload := strings.NewReader("{\n \"settings\": {\n \"asterAgent\": true,\n \"defaultAgentId\": 123,\n \"spendCaps\": {\n \"daily\": 123,\n \"weekly\": 123,\n \"monthly\": 123\n },\n \"sidebarPinnedAppIds\": [\n 123\n ],\n \"sidebarLinks\": [\n {\n \"label\": \"<string>\",\n \"url\": \"<string>\",\n \"icon\": \"<string>\"\n }\n ],\n \"feedbackModal\": {\n \"customHtml\": \"<string>\"\n }\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://www.asteragents.com/api/orgSettings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"settings\": {\n \"asterAgent\": true,\n \"defaultAgentId\": 123,\n \"spendCaps\": {\n \"daily\": 123,\n \"weekly\": 123,\n \"monthly\": 123\n },\n \"sidebarPinnedAppIds\": [\n 123\n ],\n \"sidebarLinks\": [\n {\n \"label\": \"<string>\",\n \"url\": \"<string>\",\n \"icon\": \"<string>\"\n }\n ],\n \"feedbackModal\": {\n \"customHtml\": \"<string>\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.asteragents.com/api/orgSettings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"settings\": {\n \"asterAgent\": true,\n \"defaultAgentId\": 123,\n \"spendCaps\": {\n \"daily\": 123,\n \"weekly\": 123,\n \"monthly\": 123\n },\n \"sidebarPinnedAppIds\": [\n 123\n ],\n \"sidebarLinks\": [\n {\n \"label\": \"<string>\",\n \"url\": \"<string>\",\n \"icon\": \"<string>\"\n }\n ],\n \"feedbackModal\": {\n \"customHtml\": \"<string>\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"message": "Settings updated successfully"
}{
"error": "Bad Request",
"details": [
{}
]
}{
"error": "Bad Request",
"details": [
{}
]
}{
"error": "Internal Server Error"
}