Update organization defaults for service accounts, MCP access, built-in agent mode, and high-risk action policy.
PATCH
/
api
/
headless
/
v1
/
organizations
/
{organizationId}
/
settings
Update organization settings
curl --request PATCH \
--url https://api.forge.ai/api/headless/v1/organizations/{organizationId}/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"serviceAccountsEnabled": true,
"mcpEnabled": true,
"mcpReadOnly": true,
"blockDestructiveMcp": true,
"builtInAgentEnabled": true,
"maxServiceAccountTokenLifetimeSeconds": 2,
"allowedServiceAccountScopes": [
"<string>"
],
"allowedServiceAccountCidrs": [
"<string>"
],
"reason": "<string>",
"idempotencyKey": "<string>",
"confirm": true
}
'import requests
url = "https://api.forge.ai/api/headless/v1/organizations/{organizationId}/settings"
payload = {
"serviceAccountsEnabled": True,
"mcpEnabled": True,
"mcpReadOnly": True,
"blockDestructiveMcp": True,
"builtInAgentEnabled": True,
"maxServiceAccountTokenLifetimeSeconds": 2,
"allowedServiceAccountScopes": ["<string>"],
"allowedServiceAccountCidrs": ["<string>"],
"reason": "<string>",
"idempotencyKey": "<string>",
"confirm": 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({
serviceAccountsEnabled: true,
mcpEnabled: true,
mcpReadOnly: true,
blockDestructiveMcp: true,
builtInAgentEnabled: true,
maxServiceAccountTokenLifetimeSeconds: 2,
allowedServiceAccountScopes: ['<string>'],
allowedServiceAccountCidrs: ['<string>'],
reason: '<string>',
idempotencyKey: '<string>',
confirm: true
})
};
fetch('https://api.forge.ai/api/headless/v1/organizations/{organizationId}/settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.forge.ai/api/headless/v1/organizations/{organizationId}/settings"
payload := strings.NewReader("{\n \"serviceAccountsEnabled\": true,\n \"mcpEnabled\": true,\n \"mcpReadOnly\": true,\n \"blockDestructiveMcp\": true,\n \"builtInAgentEnabled\": true,\n \"maxServiceAccountTokenLifetimeSeconds\": 2,\n \"allowedServiceAccountScopes\": [\n \"<string>\"\n ],\n \"allowedServiceAccountCidrs\": [\n \"<string>\"\n ],\n \"reason\": \"<string>\",\n \"idempotencyKey\": \"<string>\",\n \"confirm\": 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))
}{
"settings": {
"organizationId": "<string>",
"serviceAccountsEnabled": true,
"mcpEnabled": true,
"mcpReadOnly": true,
"blockDestructiveMcp": true,
"builtInAgentEnabled": true,
"maxServiceAccountTokenLifetimeSeconds": 2,
"allowedServiceAccountScopes": [
"<string>"
],
"allowedServiceAccountCidrs": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
Enter a Forge service-account token or delegated OAuth access token. Mintlify adds the Bearer prefix.
Path Parameters
Body
application/json
Required range:
x >= 1Response
Organization headless security settings updated.
Show child attributes
Show child attributes
⌘I
Update organization settings
curl --request PATCH \
--url https://api.forge.ai/api/headless/v1/organizations/{organizationId}/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"serviceAccountsEnabled": true,
"mcpEnabled": true,
"mcpReadOnly": true,
"blockDestructiveMcp": true,
"builtInAgentEnabled": true,
"maxServiceAccountTokenLifetimeSeconds": 2,
"allowedServiceAccountScopes": [
"<string>"
],
"allowedServiceAccountCidrs": [
"<string>"
],
"reason": "<string>",
"idempotencyKey": "<string>",
"confirm": true
}
'import requests
url = "https://api.forge.ai/api/headless/v1/organizations/{organizationId}/settings"
payload = {
"serviceAccountsEnabled": True,
"mcpEnabled": True,
"mcpReadOnly": True,
"blockDestructiveMcp": True,
"builtInAgentEnabled": True,
"maxServiceAccountTokenLifetimeSeconds": 2,
"allowedServiceAccountScopes": ["<string>"],
"allowedServiceAccountCidrs": ["<string>"],
"reason": "<string>",
"idempotencyKey": "<string>",
"confirm": 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({
serviceAccountsEnabled: true,
mcpEnabled: true,
mcpReadOnly: true,
blockDestructiveMcp: true,
builtInAgentEnabled: true,
maxServiceAccountTokenLifetimeSeconds: 2,
allowedServiceAccountScopes: ['<string>'],
allowedServiceAccountCidrs: ['<string>'],
reason: '<string>',
idempotencyKey: '<string>',
confirm: true
})
};
fetch('https://api.forge.ai/api/headless/v1/organizations/{organizationId}/settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.forge.ai/api/headless/v1/organizations/{organizationId}/settings"
payload := strings.NewReader("{\n \"serviceAccountsEnabled\": true,\n \"mcpEnabled\": true,\n \"mcpReadOnly\": true,\n \"blockDestructiveMcp\": true,\n \"builtInAgentEnabled\": true,\n \"maxServiceAccountTokenLifetimeSeconds\": 2,\n \"allowedServiceAccountScopes\": [\n \"<string>\"\n ],\n \"allowedServiceAccountCidrs\": [\n \"<string>\"\n ],\n \"reason\": \"<string>\",\n \"idempotencyKey\": \"<string>\",\n \"confirm\": 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))
}{
"settings": {
"organizationId": "<string>",
"serviceAccountsEnabled": true,
"mcpEnabled": true,
"mcpReadOnly": true,
"blockDestructiveMcp": true,
"builtInAgentEnabled": true,
"maxServiceAccountTokenLifetimeSeconds": 2,
"allowedServiceAccountScopes": [
"<string>"
],
"allowedServiceAccountCidrs": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}