> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usefini.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Update Business Rule
> Update a custom or template-based Business Rule.
Updates a Business Rule directly. Business Rules do not create versions.
## Headers
<ParamField header="Authorization" type="string" required>
Bearer token containing your Fini workspace API key. Format: `Bearer fini_...` The key needs `write` scope.
</ParamField>
<ParamField header="Content-Type" type="string" required>
`application/json`
</ParamField>
## Path parameters
<ParamField path="id" type="string" required>
Business Rule ID.
</ParamField>
## Body parameters
<ParamField body="name" type="string">
Updated rule name.
</ParamField>
<ParamField body="description" type="string">
Updated workflow description.
</ParamField>
<ParamField body="source" type="string">
Updated source. The current enum value is `widget`.
</ParamField>
<ParamField body="triggerType" type="string">
Updated trigger. The current enum value is `on_escalation`.
</ParamField>
<ParamField body="flowConfig" type="RuleNodeConfig">
Updated custom rule tree. Template-based rules cannot define this field.
</ParamField>
<ParamField body="inputSchema" type="InputSchemaField[]">
Updated runtime input bindings.
</ParamField>
<ParamField body="botIds" type="string[]">
Updated agent assignments.
</ParamField>
## Response
Returns the updated Business Rule.
<RequestExample>
~~~bash cURL theme={null}
curl --request PATCH \
--url 'https://api-prod.usefini.com/v2/business-rules/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/public' \
--header 'Authorization: Bearer fini_your_api_key' \
--header 'Content-Type: application/json' \
--data '{
"name": "Refund policy",
"description": "Refund-policy conversations to re-check before prompt changes.",
"source": "widget",
"triggerType": "on_escalation",
"inputSchema": [
{
"name": "Conversation URL",
"dataType": "string",
"path": "conversationUrl",
"required": true
}
],
"flowConfig": {
"root": "send-escalation-message",
"nodes": {
"send-escalation-message": {
"id": "send-escalation-message",
"name": "Send escalation message",
"type": "ACTION",
"subtype": "SEND_MESSAGE",
"message": "Thanks, we escalated this to a teammate."
}
}
},
"inputSchema": [
"4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3"
],
"botIds": [
"2a1cf0f0-f35d-46ad-8e61-a15c86b2b312"
]
}'
~~~
~~~javascript Node.js theme={null}
const response = await fetch('https://api-prod.usefini.com/v2/business-rules/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/public', {
method: 'PATCH',
headers: {
Authorization: 'Bearer fini_your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
'name': 'Refund policy',
'description': 'Refund-policy conversations to re-check before prompt changes.',
'source': 'widget',
'triggerType': 'on_escalation',
'inputSchema': [
{
'name': 'Conversation URL',
'dataType': 'string',
'path': 'conversationUrl',
'required': true
}
],
'flowConfig': {
'root': 'send-escalation-message',
'nodes': {
'send-escalation-message': {
'id': 'send-escalation-message',
'name': 'Send escalation message',
'type': 'ACTION',
'subtype': 'SEND_MESSAGE',
'message': 'Thanks, we escalated this to a teammate.'
}
}
},
'inputSchema': [
'4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3'
],
'botIds': [
'2a1cf0f0-f35d-46ad-8e61-a15c86b2b312'
]
}
)
});
const data = await response.json();
~~~
~~~python Python theme={null}
import requests
response = requests.patch(
"https://api-prod.usefini.com/v2/business-rules/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/public",
headers={"Authorization": "Bearer fini_your_api_key", "Content-Type": "application/json"},
json={
"name": "Refund policy",
"description": "Refund-policy conversations to re-check before prompt changes.",
"source": "widget",
"triggerType": "on_escalation",
"inputSchema": [
{
"name": "Conversation URL",
"dataType": "string",
"path": "conversationUrl",
"required": true
}
],
"flowConfig": {
"root": "send-escalation-message",
"nodes": {
"send-escalation-message": {
"id": "send-escalation-message",
"name": "Send escalation message",
"type": "ACTION",
"subtype": "SEND_MESSAGE",
"message": "Thanks, we escalated this to a teammate."
}
}
},
"inputSchema": [
"4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3"
],
"botIds": [
"2a1cf0f0-f35d-46ad-8e61-a15c86b2b312"
]
},
)
data = response.json()
~~~
</RequestExample>
<ResponseExample>
~~~json 200 OK theme={null}
{
"id": "b8b8d87b-2f0c-47f6-8a8a-546da73e0820",
"name": "Refund escalation",
"description": "Route refund requests to the right workflow.",
"type": "business",
"isDraft": false,
"status": "PUBLISHED",
"source": "widget",
"triggerType": "on_escalation",
"defaultBusinessRuleId": null,
"defaultRuleId": null,
"inputSchema": [
{
"name": "Conversation URL",
"dataType": "string",
"path": "conversationUrl",
"required": true
}
],
"botIds": [
"2a1cf0f0-f35d-46ad-8e61-a15c86b2b312"
],
"flowConfig": {
"root": "send-escalation-message",
"nodes": {
"send-escalation-message": {
"id": "send-escalation-message",
"name": "Send escalation message",
"type": "ACTION",
"subtype": "SEND_MESSAGE",
"message": "Thanks, we escalated this to a teammate."
}
}
},
"createdAt": "2026-07-28T08:55:32.000Z",
"updatedAt": "2026-07-28T09:10:18.000Z"
}
~~~
</ResponseExample>
## Errors
<AccordionGroup>
<Accordion title="400 Bad Request" icon="circle-exclamation">
The body is malformed, a template-based rule defines `flowConfig`, or a referenced agent, action, or widget form is invalid.
</Accordion>
<Accordion title="401 Unauthorized" icon="lock">
The API key is missing, malformed, revoked, or invalid.
</Accordion>
<Accordion title="403 Forbidden" icon="shield-halved">
The API key does not include the `write` scope required for this route.
</Accordion>
<Accordion title="404 Not Found" icon="ghost">
The Business Rule does not exist in your workspace.
</Accordion>
</AccordionGroup>
## Related topics
- [Business Rules](/en/automations/business-rules.md)
- [List Business Rules](/en/api-reference/list-business-rules.md)
- [Duplicate Business Rule](/en/api-reference/duplicate-business-rule.md)
This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.
Business Rules

