curl --request PATCH \
--url 'https://api-prod.usefini.com/v2/hc-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.",
"flowConfig": {
"type": "reply",
"message": "Escalate refund requests with order context."
},
"status": "PUBLISHED",
"botIds": [
"2a1cf0f0-f35d-46ad-8e61-a15c86b2b312"
]
}'
const response = await fetch('https://api-prod.usefini.com/v2/hc-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.',
'flowConfig': {
'type': 'reply',
'message': 'Escalate refund requests with order context.'
},
'status': 'PUBLISHED',
'botIds': [
'2a1cf0f0-f35d-46ad-8e61-a15c86b2b312'
]
}
)
});
const data = await response.json();
import requests
response = requests.patch(
"https://api-prod.usefini.com/v2/hc-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.",
"flowConfig": {
"type": "reply",
"message": "Escalate refund requests with order context."
},
"status": "PUBLISHED",
"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
Update intent rule
Create a new draft or published version of an intent rule.
PATCH
/
v2
/
hc-rules
/
{id}
/
public
curl --request PATCH \
--url 'https://api-prod.usefini.com/v2/hc-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.",
"flowConfig": {
"type": "reply",
"message": "Escalate refund requests with order context."
},
"status": "PUBLISHED",
"botIds": [
"2a1cf0f0-f35d-46ad-8e61-a15c86b2b312"
]
}'
const response = await fetch('https://api-prod.usefini.com/v2/hc-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.',
'flowConfig': {
'type': 'reply',
'message': 'Escalate refund requests with order context.'
},
'status': 'PUBLISHED',
'botIds': [
'2a1cf0f0-f35d-46ad-8e61-a15c86b2b312'
]
}
)
});
const data = await response.json();
import requests
response = requests.patch(
"https://api-prod.usefini.com/v2/hc-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.",
"flowConfig": {
"type": "reply",
"message": "Escalate refund requests with order context."
},
"status": "PUBLISHED",
"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"
}
Updates intent-rule content by creating a new version.
Send
status: "DRAFT" explicitly when editing a draft. If omitted, a rule with a published version is updated by creating a new published version. A draft-only rule defaults to updating its draft.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
Intent-rule ID.
Body parameters
string
Updated rule name.
string
Updated routing description.
RuleNodeConfig
Updated rule tree.
string
Version state to update:
DRAFT or PUBLISHED. ARCHIVED is rejected.string[]
Updated agent assignments for a published rule. Draft updates cannot include this field.
Response
Returns the updatedRule.
curl --request PATCH \
--url 'https://api-prod.usefini.com/v2/hc-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.",
"flowConfig": {
"type": "reply",
"message": "Escalate refund requests with order context."
},
"status": "PUBLISHED",
"botIds": [
"2a1cf0f0-f35d-46ad-8e61-a15c86b2b312"
]
}'
const response = await fetch('https://api-prod.usefini.com/v2/hc-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.',
'flowConfig': {
'type': 'reply',
'message': 'Escalate refund requests with order context.'
},
'status': 'PUBLISHED',
'botIds': [
'2a1cf0f0-f35d-46ad-8e61-a15c86b2b312'
]
}
)
});
const data = await response.json();
import requests
response = requests.patch(
"https://api-prod.usefini.com/v2/hc-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.",
"flowConfig": {
"type": "reply",
"message": "Escalate refund requests with order context."
},
"status": "PUBLISHED",
"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 update includes
botIds, 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.404 Not Found
404 Not Found
The intent rule does not exist in your workspace.
Was this page helpful?
⌘I

