Skip to main content
POST
/
v2
/
hc-rules
/
{id}
/
refine
/
public
Refine rule draft
curl --request POST \
  --url https://api-prod.usefini.com/v2/hc-rules/{id}/refine/public \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>' \
  --data '
{
  "refinementInstructions": "<string>"
}
'
Refines one existing draft Rule using natural-language refinement instructions.

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

Path parameters

id
string
required
Draft rule ID to refine.

Body parameters

refinementInstructions
string
required
Natural-language instructions describing how the draft should change.

Response

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

Errors

The body is malformed, or the draft can no longer be refined because its original source instructions are unavailable.
The API key is missing, malformed, revoked, or invalid.
The API key does not include the write scope required for this route.
The draft rule ID does not exist in your workspace, or it is no longer a draft.
Fini failed while generating or storing the refined draft.