> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nx1cloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Publish a version

> Publish an approved version so a rule uses it.

You publish an approved version to make it the one that a rule runs. Your code and SQL queries then use that version. You can publish only approved versions. To roll back, publish an earlier approved version. NexusOne records it as a rollback in the publication history.

## Prerequisites

Before starting this task, ensure you have the following:

* Required roles: [`approver` or `workspace_admin` in a workspace](https://docs.nx1cloud.com/documentation/data/overview/business-rules#roles-and-permissions)
* An [approved version](https://docs.nx1cloud.com/documentation/data/tasks/business-rules/versions/approve-or-reject-a-version.md)

## Steps

> [tab] Web portal
>
> Perform these steps to publish a version:
>
> 1. Log in to NexusOne.
> 2. On the top navigation bar, hover your mouse over **Data** and then select **Business Rules**.
> 3. Select a workspace.
> 4. Select a rule.
> 5. In the **Versions** tab, find the approved version to make live.
> 6. In the **Actions** column at the right end of the row, click **Publish**.
> 7. In the dialog, check which version is live now. Publishing replaces it.
> 8. Click **Publish**.
>
> Perform these steps to roll back to an earlier version:
>
> 1. In the **Versions** tab, find the earlier approved version.
> 2. In the **Actions** column at the right end of the row, click **Roll back**.
> 3. In the dialog, click **Roll back**.
>
> To see every publish and rollback, open the **Publication history** tab.

> [tab] REST API
>
> Use the following API endpoints to publish a version:
>
> * [Get publication history for a decision](https://docs.nx1cloud.com/api-reference/endpoints/decisions/get-publication-history-for-a-decision.md)
> * [List published versions in a workspace](https://docs.nx1cloud.com/api-reference/endpoints/decisions/list-what-is-published-in-a-workspace.md)
> * [Publish a version](https://docs.nx1cloud.com/api-reference/endpoints/decisions/publish-a-version.md)

## Additional resources

For when a published rule appears in SQL, refer to [Call a rule from SQL](https://docs.nx1cloud.com/documentation/data/tasks/business-rules/rules/call-a-rule-from-sql.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.