Skip to main content
POST
/
v2
/
hc-rules
/
public
Create rule
curl --request POST \
  --url https://api-prod.usefini.com/v2/hc-rules/public \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "flowConfig": {},
  "botIds": [
    "<string>"
  ],
  "type": "<string>",
  "source": "<string>",
  "triggerType": "<string>",
  "defaultRuleId": "<string>",
  "inputSchema": [
    {}
  ]
}
'
Creates a published Rule.

Headers

Authorization
string
required
Bearer token containing your Fini workspace API key. Format: Bearer fini_... The key needs write scope.
Content-Type
string
required
application/json

Body parameters

name
string
required
Rule name.
description
string
required
Natural-language routing description. This is the text the planner uses when deciding whether the rule should run.
flowConfig
RuleNodeConfig
Optional rule tree. See Rules for the shared transport shape.
botIds
string[]
Optional agent IDs to assign after creation.
type
string
Optional rule type. Current values are intent and business. Send it explicitly rather than relying on the current default.
source
string
Optional source. Current public enum value is widget.
triggerType
string
Optional trigger type. Current public enum value is on_escalation.
defaultRuleId
string
Optional template rule ID.
inputSchema
InputSchemaField[]
Optional runtime input schema. See Rules.

Response

Returns the created Rule.

Errors

The body is malformed, a referenced agent ID is invalid, or the flowConfig references a missing or unsupported action or widget form.
The API key is missing, malformed, revoked, or invalid.
The API key does not include the write scope required for this route.
Fini failed while creating the rule in storage.