Skip to main content

Publish policy

POST 

/api/policies/:policy_id/publish

Publish in one call, in one transaction.

  • ACTIVE/DISABLED with a pending draft: apply it (content -> version + 1 and a policy_versions row, like PATCH; enabled -> ACTIVE/DISABLED like the toggle), clear the draft, ledger policy.published.
  • DRAFT / VALIDATED / PENDING_APPROVAL: walk the legal chain to ACTIVE (a policy.transitioned entry per hop, then one policy.published); the version stays what it is (a rule saved as a draft is v1).
  • anything else: 409.

Request​

Responses​

Successful Response