curl --request POST \ --url 'https://api-prod.usefini.com/v2/business-rules/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/evaluate/public' \ --header 'Authorization: Bearer fini_your_api_key' \ --header 'Content-Type: application/json' \ --data '{ "inputContext": { "interactionHistoryTranscript": "User: I need help with a refund", "formattedUserAttributes": "Plan: Premium", "interactionId": "int_123456789" }, "inputSchemaOverrides": { "conversationUrl": "https://example.com/conversations/int_123456789" }}'
const response = await fetch('https://api-prod.usefini.com/v2/business-rules/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/evaluate/public', { method: 'POST', headers: { Authorization: 'Bearer fini_your_api_key', 'Content-Type': 'application/json' }, body: JSON.stringify({ 'inputContext': { 'interactionHistoryTranscript': 'User: I need help with a refund', 'formattedUserAttributes': 'Plan: Premium', 'interactionId': 'int_123456789' }, 'inputSchemaOverrides': { 'conversationUrl': 'https://example.com/conversations/int_123456789' }} )});const data = await response.json();
import requestsresponse = requests.post( "https://api-prod.usefini.com/v2/business-rules/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/evaluate/public", headers={"Authorization": "Bearer fini_your_api_key", "Content-Type": "application/json"}, json={ "inputContext": { "interactionHistoryTranscript": "User: I need help with a refund", "formattedUserAttributes": "Plan: Premium", "interactionId": "int_123456789" }, "inputSchemaOverrides": { "conversationUrl": "https://example.com/conversations/int_123456789" }},)data = response.json()
[ { "id": "send-escalation-message", "name": "Send escalation message", "type": "ACTION", "success": true, "result": { "message": "Thanks, we escalated this to a teammate." } }]
Business Rules
Evaluate Business Rule
Evaluate one Business Rule against supplied input context and return rule-node results.
POST
/
v2
/
business-rules
/
{id}
/
evaluate
/
public
curl --request POST \ --url 'https://api-prod.usefini.com/v2/business-rules/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/evaluate/public' \ --header 'Authorization: Bearer fini_your_api_key' \ --header 'Content-Type: application/json' \ --data '{ "inputContext": { "interactionHistoryTranscript": "User: I need help with a refund", "formattedUserAttributes": "Plan: Premium", "interactionId": "int_123456789" }, "inputSchemaOverrides": { "conversationUrl": "https://example.com/conversations/int_123456789" }}'
const response = await fetch('https://api-prod.usefini.com/v2/business-rules/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/evaluate/public', { method: 'POST', headers: { Authorization: 'Bearer fini_your_api_key', 'Content-Type': 'application/json' }, body: JSON.stringify({ 'inputContext': { 'interactionHistoryTranscript': 'User: I need help with a refund', 'formattedUserAttributes': 'Plan: Premium', 'interactionId': 'int_123456789' }, 'inputSchemaOverrides': { 'conversationUrl': 'https://example.com/conversations/int_123456789' }} )});const data = await response.json();
import requestsresponse = requests.post( "https://api-prod.usefini.com/v2/business-rules/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/evaluate/public", headers={"Authorization": "Bearer fini_your_api_key", "Content-Type": "application/json"}, json={ "inputContext": { "interactionHistoryTranscript": "User: I need help with a refund", "formattedUserAttributes": "Plan: Premium", "interactionId": "int_123456789" }, "inputSchemaOverrides": { "conversationUrl": "https://example.com/conversations/int_123456789" }},)data = response.json()
[ { "id": "send-escalation-message", "name": "Send escalation message", "type": "ACTION", "success": true, "result": { "message": "Thanks, we escalated this to a teammate." } }]
Evaluates a Business Rule directly from an input context payload. Use this when you want to test rule behavior without binding the evaluation to an existing conversation.
curl --request POST \ --url 'https://api-prod.usefini.com/v2/business-rules/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/evaluate/public' \ --header 'Authorization: Bearer fini_your_api_key' \ --header 'Content-Type: application/json' \ --data '{ "inputContext": { "interactionHistoryTranscript": "User: I need help with a refund", "formattedUserAttributes": "Plan: Premium", "interactionId": "int_123456789" }, "inputSchemaOverrides": { "conversationUrl": "https://example.com/conversations/int_123456789" }}'
const response = await fetch('https://api-prod.usefini.com/v2/business-rules/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/evaluate/public', { method: 'POST', headers: { Authorization: 'Bearer fini_your_api_key', 'Content-Type': 'application/json' }, body: JSON.stringify({ 'inputContext': { 'interactionHistoryTranscript': 'User: I need help with a refund', 'formattedUserAttributes': 'Plan: Premium', 'interactionId': 'int_123456789' }, 'inputSchemaOverrides': { 'conversationUrl': 'https://example.com/conversations/int_123456789' }} )});const data = await response.json();
import requestsresponse = requests.post( "https://api-prod.usefini.com/v2/business-rules/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/evaluate/public", headers={"Authorization": "Bearer fini_your_api_key", "Content-Type": "application/json"}, json={ "inputContext": { "interactionHistoryTranscript": "User: I need help with a refund", "formattedUserAttributes": "Plan: Premium", "interactionId": "int_123456789" }, "inputSchemaOverrides": { "conversationUrl": "https://example.com/conversations/int_123456789" }},)data = response.json()
[ { "id": "send-escalation-message", "name": "Send escalation message", "type": "ACTION", "success": true, "result": { "message": "Thanks, we escalated this to a teammate." } }]
This route uses synthetic public-API test identifiers for the bot, trace, and session context. Use Evaluate conversation rule when you need to evaluate against a real conversation.