Skip to main content
POST
Publishes one draft 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/json

Path 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 Rule.

Errors

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.
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 or draftVersionId does not exist in your workspace, does not belong to the rule, or is no longer a draft.
Fini failed while publishing the draft or syncing agent assignments.