Skip to main content
POST
/
v2
/
hc-rules
/
{id}
/
publish
/
public
Publish rule draft
curl --request POST \
  --url https://api-prod.usefini.com/v2/hc-rules/{id}/publish/public \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>' \
  --data '
{
  "botIds": [
    "<string>"
  ]
}
'
Publishes one draft Rule and assigns it to one or more agents.

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 publish.

Body parameters

botIds
string[]
required
Agent IDs to assign after publishing. At least one ID is required.

Response

Returns the published Rule.

Errors

The body is malformed, the botIds array is empty, or one or more agent IDs do not belong to your workspace.
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 publishing the draft or syncing agent assignments.