curl --request POST \
--url 'https://api-prod.usefini.com/v2/hc-rules/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/publish/public' \
--header 'Authorization: Bearer fini_your_api_key' \
--header 'Content-Type: application/json' \
--data '{
"botIds": [
"2a1cf0f0-f35d-46ad-8e61-a15c86b2b312"
],
"draftVersionId": "v3"
}'
const response = await fetch('https://api-prod.usefini.com/v2/hc-rules/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/publish/public', {
method: 'POST',
headers: {
Authorization: 'Bearer fini_your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
'botIds': [
'2a1cf0f0-f35d-46ad-8e61-a15c86b2b312'
],
'draftVersionId': 'v3'
}
)
});
const data = await response.json();
import requests
response = requests.post(
"https://api-prod.usefini.com/v2/hc-rules/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/publish/public",
headers={"Authorization": "Bearer fini_your_api_key", "Content-Type": "application/json"},
json={
"botIds": [
"2a1cf0f0-f35d-46ad-8e61-a15c86b2b312"
],
"draftVersionId": "v3"
},
)
data = response.json()
{
"id": "b8b8d87b-2f0c-47f6-8a8a-546da73e0820",
"name": "Refund escalation",
"description": "Route refund requests to the right workflow.",
"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
Publish intent-rule draft
Publish an intent-rule draft and assign it to one or more agents.
POST
/
v2
/
hc-rules
/
{id}
/
publish
/
public
curl --request POST \
--url 'https://api-prod.usefini.com/v2/hc-rules/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/publish/public' \
--header 'Authorization: Bearer fini_your_api_key' \
--header 'Content-Type: application/json' \
--data '{
"botIds": [
"2a1cf0f0-f35d-46ad-8e61-a15c86b2b312"
],
"draftVersionId": "v3"
}'
const response = await fetch('https://api-prod.usefini.com/v2/hc-rules/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/publish/public', {
method: 'POST',
headers: {
Authorization: 'Bearer fini_your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
'botIds': [
'2a1cf0f0-f35d-46ad-8e61-a15c86b2b312'
],
'draftVersionId': 'v3'
}
)
});
const data = await response.json();
import requests
response = requests.post(
"https://api-prod.usefini.com/v2/hc-rules/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/publish/public",
headers={"Authorization": "Bearer fini_your_api_key", "Content-Type": "application/json"},
json={
"botIds": [
"2a1cf0f0-f35d-46ad-8e61-a15c86b2b312"
],
"draftVersionId": "v3"
},
)
data = response.json()
{
"id": "b8b8d87b-2f0c-47f6-8a8a-546da73e0820",
"name": "Refund escalation",
"description": "Route refund requests to the right workflow.",
"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"
}
Publishes one draft Intent Rule and assigns it to one or more agents.
This endpoint supports intent rules only. Business Rules are published immediately when created and do not have drafts.
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
Draft rule ID to publish.
Body parameters
string[]
required
Agent IDs to assign after publishing. At least one ID is required.
string
required
UUID of the draft version to publish. Get it from List intent-rule versions or a
versionStatus=DRAFT Get intent rule response.Response
Returns the published Intent Rule.curl --request POST \
--url 'https://api-prod.usefini.com/v2/hc-rules/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/publish/public' \
--header 'Authorization: Bearer fini_your_api_key' \
--header 'Content-Type: application/json' \
--data '{
"botIds": [
"2a1cf0f0-f35d-46ad-8e61-a15c86b2b312"
],
"draftVersionId": "v3"
}'
const response = await fetch('https://api-prod.usefini.com/v2/hc-rules/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/publish/public', {
method: 'POST',
headers: {
Authorization: 'Bearer fini_your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
'botIds': [
'2a1cf0f0-f35d-46ad-8e61-a15c86b2b312'
],
'draftVersionId': 'v3'
}
)
});
const data = await response.json();
import requests
response = requests.post(
"https://api-prod.usefini.com/v2/hc-rules/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/publish/public",
headers={"Authorization": "Bearer fini_your_api_key", "Content-Type": "application/json"},
json={
"botIds": [
"2a1cf0f0-f35d-46ad-8e61-a15c86b2b312"
],
"draftVersionId": "v3"
},
)
data = response.json()
{
"id": "b8b8d87b-2f0c-47f6-8a8a-546da73e0820",
"name": "Refund escalation",
"description": "Route refund requests to the right workflow.",
"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, the
botIds array is empty, one or more agent IDs do not belong to your workspace, or the selected draft became stale after another version was published.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 draft rule or
draftVersionId does not exist in your workspace, does not belong to the rule, or is no longer a draft.500 Internal Server Error
500 Internal Server Error
Fini failed while publishing the draft or syncing agent assignments.
Was this page helpful?

