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"
]
}'
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();
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()
{
"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"
}
Business Rules
Update Business Rule
Update a custom or template-based Business Rule.
PATCH
/
v2
/
business-rules
/
{id}
/
public
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"
]
}'
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();
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()
{
"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"
}
Updates a Business Rule directly. Business Rules do not create versions.
Headers
Bearer token containing your Fini workspace API key. Format:
Bearer fini_... The key needs write scope.Path parameters
Body parameters
Response
Returns the updated Business Rule.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"
]
}'
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();
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()
{
"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"
}
Errors
400 Bad Request
400 Bad Request
The body is malformed, a template-based rule defines
flowConfig, or a referenced agent, action, or widget form is invalid.401 Unauthorized
401 Unauthorized
The API key is missing, malformed, revoked, or invalid.
403 Forbidden
403 Forbidden
The API key does not include the
write scope required for this route.404 Not Found
404 Not Found
The Business Rule does not exist in your workspace.
Was this page helpful?

