curl --request PUT \
--url "https://api-prod.usefini.com/v2/guardrail-policies/22222222-2222-4222-8222-222222222222/public" \
--header "Authorization: Bearer $FINI_API_KEY" \
--header "Content-Type: application/json" \
--data '{"enabled": false}'
const response = await fetch("https://api-prod.usefini.com/v2/guardrail-policies/22222222-2222-4222-8222-222222222222/public", {
method: "PUT",
headers: { Authorization: `Bearer ${process.env.FINI_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({"enabled": false}),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());
import os
import requests
response = requests.put(
"https://api-prod.usefini.com/v2/guardrail-policies/22222222-2222-4222-8222-222222222222/public",
headers={"Authorization": f"Bearer {os.environ['FINI_API_KEY']}"},
json={'enabled': False},
timeout=30,
)
response.raise_for_status()
print(response.json())
{
"id": "22222222-2222-4222-8222-222222222222",
"companyId": "33333333-3333-4333-8333-333333333333",
"botId": "11111111-1111-4111-8111-111111111111",
"checkType": "banned_terms",
"config": {
"terms": [
"guaranteed approval"
]
},
"enabled": false,
"sources": [
"widget"
],
"createdAt": "2026-10-01T08:00:00.000Z",
"updatedAt": "2026-10-01T08:30:00.000Z"
}
Guardrails
Update guardrail policy
Update guardrail policy through the workspace-scoped public API.
PUT
/
v2
/
guardrail-policies
/
{id}
/
public
curl --request PUT \
--url "https://api-prod.usefini.com/v2/guardrail-policies/22222222-2222-4222-8222-222222222222/public" \
--header "Authorization: Bearer $FINI_API_KEY" \
--header "Content-Type: application/json" \
--data '{"enabled": false}'
const response = await fetch("https://api-prod.usefini.com/v2/guardrail-policies/22222222-2222-4222-8222-222222222222/public", {
method: "PUT",
headers: { Authorization: `Bearer ${process.env.FINI_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({"enabled": false}),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());
import os
import requests
response = requests.put(
"https://api-prod.usefini.com/v2/guardrail-policies/22222222-2222-4222-8222-222222222222/public",
headers={"Authorization": f"Bearer {os.environ['FINI_API_KEY']}"},
json={'enabled': False},
timeout=30,
)
response.raise_for_status()
print(response.json())
{
"id": "22222222-2222-4222-8222-222222222222",
"companyId": "33333333-3333-4333-8333-333333333333",
"botId": "11111111-1111-4111-8111-111111111111",
"checkType": "banned_terms",
"config": {
"terms": [
"guaranteed approval"
]
},
"enabled": false,
"sources": [
"widget"
],
"createdAt": "2026-10-01T08:00:00.000Z",
"updatedAt": "2026-10-01T08:30:00.000Z"
}
Updates only supplied fields. A supplied
config replaces the definition rather than merging individual keys and must match the existing check type. Agent and check type cannot be changed. No supplied changes returns the existing policy.
See the Guardrails overview for shared schemas and runtime limitations.
Complete check-specific configuration. See configuration schemas.
Response
Check-specific definition. See the configuration schemas.
curl --request PUT \
--url "https://api-prod.usefini.com/v2/guardrail-policies/22222222-2222-4222-8222-222222222222/public" \
--header "Authorization: Bearer $FINI_API_KEY" \
--header "Content-Type: application/json" \
--data '{"enabled": false}'
const response = await fetch("https://api-prod.usefini.com/v2/guardrail-policies/22222222-2222-4222-8222-222222222222/public", {
method: "PUT",
headers: { Authorization: `Bearer ${process.env.FINI_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({"enabled": false}),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());
import os
import requests
response = requests.put(
"https://api-prod.usefini.com/v2/guardrail-policies/22222222-2222-4222-8222-222222222222/public",
headers={"Authorization": f"Bearer {os.environ['FINI_API_KEY']}"},
json={'enabled': False},
timeout=30,
)
response.raise_for_status()
print(response.json())
{
"id": "22222222-2222-4222-8222-222222222222",
"companyId": "33333333-3333-4333-8333-333333333333",
"botId": "11111111-1111-4111-8111-111111111111",
"checkType": "banned_terms",
"config": {
"terms": [
"guaranteed approval"
]
},
"enabled": false,
"sources": [
"widget"
],
"createdAt": "2026-10-01T08:00:00.000Z",
"updatedAt": "2026-10-01T08:30:00.000Z"
}
Was this page helpful?

