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

# Create a rule

> Create a rule to hold the logic for one business decision.

You create a rule to hold the logic for one decision, such as whether to approve a
loan based on an applicant's income.

## Prerequisites

Before starting this task, ensure you have the following:

* Required roles: [`author` or `workspace_admin` in a workspace](https://docs.nx1cloud.com/documentation/data/overview/business-rules#roles-and-permissions)
* An existing [business rules workspace](https://docs.nx1cloud.com/documentation/data/tasks/business-rules/workspaces/create-a-workspace.md)

## Steps

> [tab] Web portal
>
> Perform these steps to create a rule:
>
> 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. Click **New decision**.
> 5. In the **Key** field, enter a short ID, such as `eligibility`. Your code and SQL queries
>    use it to run a rule. An ID can't contain slashes.
> 6. In the **Name** field, enter a name.
> 7. Optional: In the **Folder** field, enter any name to group rules.
>    NexusOne shows it before the key name on each rule's card in the **Business rules** tab.
>    You can change it later.
> 8. Optional: In the **Description** field, enter a short description of the decision.
> 9. Click **Create decision**.

> [tab] REST API
>
> Use the [Create a decision](https://docs.nx1cloud.com/api-reference/endpoints/decisions/create-a-decision.md) endpoint to create a rule.

## Additional resources

To add logic to a rule, refer to [Create or edit a draft version](https://docs.nx1cloud.com/documentation/data/tasks/business-rules/versions/create-or-edit-a-draft-version.md).


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