curl --request POST \
--url 'https://api-prod.usefini.com/v2/hc-rules/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.",
"type": "intent",
"status": "PUBLISHED",
"flowConfig": {
"type": "reply",
"message": "Escalate refund requests with order context."
},
"botIds": [
"2a1cf0f0-f35d-46ad-8e61-a15c86b2b312"
]
}'
const response = await fetch('https://api-prod.usefini.com/v2/hc-rules/public', {
method: 'POST',
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.',
'type': 'intent',
'status': 'PUBLISHED',
'flowConfig': {
'type': 'reply',
'message': 'Escalate refund requests with order context.'
},
'botIds': [
'2a1cf0f0-f35d-46ad-8e61-a15c86b2b312'
]
}
)
});
const data = await response.json();
import requests
response = requests.post(
"https://api-prod.usefini.com/v2/hc-rules/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.",
"type": "intent",
"status": "PUBLISHED",
"flowConfig": {
"type": "reply",
"message": "Escalate refund requests with order context."
},
"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": "intent",
"status": "PUBLISHED",
"source": null,
"triggerType": null,
"botIds": [
"2a1cf0f0-f35d-46ad-8e61-a15c86b2b312"
],
"flowConfig": {
"type": "reply",
"message": "Escalate refund requests with order context."
},
"version": 3,
"versionId": "v3",
"createdAt": "2026-07-28T08:55:32.000Z",
"updatedAt": "2026-07-28T09:10:18.000Z"
}
Intent Rules
Create intent rule
Create a draft or published Rulebook intent rule.
POST
/
v2
/
hc-rules
/
public
curl --request POST \
--url 'https://api-prod.usefini.com/v2/hc-rules/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.",
"type": "intent",
"status": "PUBLISHED",
"flowConfig": {
"type": "reply",
"message": "Escalate refund requests with order context."
},
"botIds": [
"2a1cf0f0-f35d-46ad-8e61-a15c86b2b312"
]
}'
const response = await fetch('https://api-prod.usefini.com/v2/hc-rules/public', {
method: 'POST',
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.',
'type': 'intent',
'status': 'PUBLISHED',
'flowConfig': {
'type': 'reply',
'message': 'Escalate refund requests with order context.'
},
'botIds': [
'2a1cf0f0-f35d-46ad-8e61-a15c86b2b312'
]
}
)
});
const data = await response.json();
import requests
response = requests.post(
"https://api-prod.usefini.com/v2/hc-rules/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.",
"type": "intent",
"status": "PUBLISHED",
"flowConfig": {
"type": "reply",
"message": "Escalate refund requests with order context."
},
"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": "intent",
"status": "PUBLISHED",
"source": null,
"triggerType": null,
"botIds": [
"2a1cf0f0-f35d-46ad-8e61-a15c86b2b312"
],
"flowConfig": {
"type": "reply",
"message": "Escalate refund requests with order context."
},
"version": 3,
"versionId": "v3",
"createdAt": "2026-07-28T08:55:32.000Z",
"updatedAt": "2026-07-28T09:10:18.000Z"
}
Creates an intent rule. Use
status: "DRAFT" for a reviewable draft or status: "PUBLISHED" for a live version.
Headers
string
required
Bearer token containing your Fini workspace API key. Format:
Bearer fini_... The key needs write scope.string
required
application/jsonBody parameters
string
required
Rule name.
string
required
Natural-language routing description used by the planner.
string
required
Send
intent.string
DRAFT or PUBLISHED. Defaults to PUBLISHED. ARCHIVED is rejected.RuleNodeConfig
Rule tree. See the shared RuleNodeConfig shape.
string[]
Agent IDs to assign to a published rule. Drafts cannot include agent assignments.
Response
Returns the createdRule. Draft responses have botIds: [].
curl --request POST \
--url 'https://api-prod.usefini.com/v2/hc-rules/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.",
"type": "intent",
"status": "PUBLISHED",
"flowConfig": {
"type": "reply",
"message": "Escalate refund requests with order context."
},
"botIds": [
"2a1cf0f0-f35d-46ad-8e61-a15c86b2b312"
]
}'
const response = await fetch('https://api-prod.usefini.com/v2/hc-rules/public', {
method: 'POST',
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.',
'type': 'intent',
'status': 'PUBLISHED',
'flowConfig': {
'type': 'reply',
'message': 'Escalate refund requests with order context.'
},
'botIds': [
'2a1cf0f0-f35d-46ad-8e61-a15c86b2b312'
]
}
)
});
const data = await response.json();
import requests
response = requests.post(
"https://api-prod.usefini.com/v2/hc-rules/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.",
"type": "intent",
"status": "PUBLISHED",
"flowConfig": {
"type": "reply",
"message": "Escalate refund requests with order context."
},
"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": "intent",
"status": "PUBLISHED",
"source": null,
"triggerType": null,
"botIds": [
"2a1cf0f0-f35d-46ad-8e61-a15c86b2b312"
],
"flowConfig": {
"type": "reply",
"message": "Escalate refund requests with order context."
},
"version": 3,
"versionId": "v3",
"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 draft includes agent assignments, an agent ID is invalid, or
flowConfig references a missing action or widget form.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.Was this page helpful?
⌘I

