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 requests
response = 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 requests
response = 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.
Headers
string
required
Bearer token containing your Fini workspace API key. Format:
Bearer fini_... The key needs write scope.string
required
application/jsonPath parameters
string
required
Business Rule ID to evaluate.
Body parameters
object
required
Input context to evaluate the rule against.
object
Optional schema overrides for the evaluation.
Response
Returns an array of rule-node evaluation results.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 requests
response = 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.
Errors
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?

