Replace the Organization agent defaults
PATCH /v1/organization/agent-defaults
| Property | Value |
|---|---|
| Operation | update_organization_agent_defaults |
| Group | Organization |
| Scope | agents:write |
| Route class | control |
| Idempotency | No Idempotency-Key |
| Audit | Audited organization.agent_defaults.update (mutation) |
| Released in | 1.6.0 |
| Phase 0 host | Served (the hosted api pins 1.65.0) |
Publishes the next version of the Organization layer at the version If-Match names and writes the Audit event organization.agent_defaults.update. Bounds and locks need the owner. From 1.24.0 turning the AI disclosure off (safety.disclosure.required false) is an elevated change: the api accepts it only from the owner in a console session, never from an API key, and only with disclosure_attestation (disclosure_attestation_required); the Audit event then records the attestation, the Member and that the disclosure went off. Turning it back on needs no attestation and is audited the same way.
Request
Set VOCAL_API to the base URL of your API and VOCAL_API_KEY to an API key with the agents:write scope (Authentication and keys). Replace each placeholder, such as agt_... or <name>, with your own value.
curl -X PATCH "$VOCAL_API/v1/organization/agent-defaults" \
-H "Authorization: Bearer $VOCAL_API_KEY" \
-H 'If-Match: "1"' \
-H "Content-Type: application/json" \
-d '{
"values": {}
}'const response = await fetch(`${process.env.VOCAL_API}/v1/organization/agent-defaults`, {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.VOCAL_API_KEY}`,
'If-Match': '"1"',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"values": {}
}),
});
console.log(response.status, await response.text());import os
import requests
response = requests.patch(
f"{os.environ['VOCAL_API']}/v1/organization/agent-defaults",
headers={
"Authorization": f"Bearer {os.environ['VOCAL_API_KEY']}",
"If-Match": '"1"',
},
json={
"values": {},
},
)
print(response.status_code, response.text)Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
if-match | header | string | yes | The revision the change was made against, quoted as the ETag returns it, or * to overwrite. |
Request body
Content type application/json, required: OrganizationAgentDefaultsUpdateRequest.
| Field | Type | Required | Description |
|---|---|---|---|
bounds | array of OrganizationSettingBoundInput | no | At most 100 bounds, one per leaf path (1.18.0). An Agent version or a per-Call override outside one is refused with setting_out_of_bounds naming the organization layer. Present, it replaces every bound and needs the owner role; absent, the current bounds are kept. |
disclosure_attestation | DisclosureAttestationInput | no | The owner's attestation (1.24.0), required when values set safety.disclosure.required to false while the version in force requires the disclosure, and refused with disclosure_attestation_required without it. Only the owner in a console session may send it or turn the disclosure off; an update that keeps the disclosure off needs none, and one beside values that leave the disclosure on is refused with setting_conflict. The Audit event organization.agent_defaults.update records the attestation and the Member. |
locks | array of SettingPath | no | At most 100 leaf paths the Organization locks (1.18.0): its value wins, and an Agent version or a per-Call override that sets the path is refused with setting_locked naming the organization layer. A platform lock on the path applies first. Present, it replaces every lock and needs the owner role; absent, the current locks are kept. |
values | AgentSettingsInput | yes | Replaces the whole Organization layer; omit a path to leave it to the platform. |
Responses
| Status | Content type | Shape | Error codes |
|---|---|---|---|
200 | application/json | OrganizationAgentDefaults | |
400 | application/json | ErrorEnvelope | invalid_request |
401 | application/json | ErrorEnvelope | unauthenticated |
403 | application/json | ErrorEnvelope | forbidden, org_suspended |
412 | application/json | ErrorEnvelope | revision_mismatch |
422 | application/json | ErrorEnvelope | validation_failed |
428 | application/json | ErrorEnvelope | precondition_required |
429 | application/json | ErrorEnvelope | rate_limited |
500 | application/json | ErrorEnvelope | internal_error |
Fields of the 200 answer
The shape is OrganizationAgentDefaults.
| Field | Type | Required | Description |
|---|---|---|---|
bounds | array of OrganizationSettingBound | no | At most 100 bounds, one per leaf path (1.18.0). An Agent version or a per-Call override outside one is refused with setting_out_of_bounds naming the organization layer. The api always sends it; absent means none. |
disclosure_attestation | DisclosureAttestation or null | no | The attestation in force when this version's values turn the AI disclosure off (1.24.0), carried from version to version while it stays off; null while the disclosure is on. An api before 1.24.0 omits it, and a reader treats its absence as null. |
effective | EffectiveSettings | yes | The Organization values over the platform defaults, for the same pack. |
locks | array of SettingPath | no | At most 100 leaf paths the Organization locks (1.18.0): its value wins, and an Agent version or a per-Call override that sets the path is refused with setting_locked naming the organization layer. A platform lock on the path applies first. The api always sends it; absent means none. |
object | "organization_agent_defaults" | yes | |
platform_defaults | EffectiveSettings | yes | The platform layer for the Organization's default language pack (en). |
updated_at | Timestamp or null | yes | |
updated_by | ActorRef or null | yes | |
values | AgentSettings | yes | The paths the Organization sets. |
version | integer | yes | Counts replacements; 0 before the first. Returned as the ETag. |