Skip to main content
POST
/
v2
/
hc-rules
/
draft
/
public
Create rule draft
curl --request POST \
  --url https://api-prod.usefini.com/v2/hc-rules/draft/public \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>' \
  --data '
{
  "behaviorInstructions": "<string>"
}
'
Generates a draft Rule from natural-language behavior instructions.
The dashboard-auth draft route accepts multipart uploads, but the workspace-API-key public route is JSON-only. On the public route, behaviorInstructions is therefore required in practice.

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

behaviorInstructions
string
required
Natural-language instructions describing the workflow you want Fini to turn into a draft rule.

Response

Returns the generated draft Rule.
Draft responses return isDraft: true and botIds: [].

Errors

The body is malformed or behaviorInstructions is missing. Current service behavior requires either instructions or a file, and file upload is not exposed on the public route.
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 generating or storing the draft rule.