Skip to main content
Intent Rules are the workflows configured under Automations → Intent Rules. They use the /v2/hc-rules API family and have their own draft, version, publish, restore, and test-path lifecycle. Intent rules have a version lifecycle. A rule can have a current published version, draft versions, and archived historical versions. Drafts have no agent assignments and do not run in production until published.

Intent-rule endpoints

Typical draft workflow

1

Generate the draft content

Call Generate intent-rule draft with AI with natural-language instructions. The LLM returns a draft name, description, and rule tree. The response is not persisted yet.
2

Create the draft

Call Create intent rule with status: "DRAFT" and the generated fields or your own tree. Do not send botIds for a draft.
3

Update the draft

Call Update intent rule with status: "DRAFT". Sending the status explicitly prevents an existing published version from being updated instead.
4

Publish and assign

Read the draft’s versionId, then call Publish rule draft with that draftVersionId and at least one agent ID.
5

Discard drafts you do not want to publish

Call Delete intent-rule draft version to remove an unpublished draft version from normal version-history reads.
6

Generate and run path tests

Call Get rule version test paths to derive paths from the version, then call Run rule version test path with the selected pathId and expected terminal node.
A draft becomes stale when its parentVersionId no longer matches the current published version. The publish route rejects stale drafts. Restore or recreate the draft from the current version before publishing.

Intent-rule response fields

Intent Rule responses include id, companyId, name, description, flowConfig, botIds, and lifecycle fields such as version, versionId, status, parentVersionId, publishedAt, isStale, and currentPublishedVersionId.