# Rule Status

## The two rule statuses

Every Rule has two status options: `Published` and `Pending`. The status can be set on each version of the rule independently.

**Initial Status:**

* **Newly created rules:** All rules are created in `Published` status by default
* **Imported rules:** The status is determined by the value defined in the imported rule data
* **New versions:** All newly created versions start in `Pending` status

### Published status

Rule in Published status is ready for production and is available via [Solver API](https://docs.decisionrules.io/doc/api/rule-solver-api).

#### Examples:

<figure><img src="https://437457296-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MN4F4-qybg8XDATvios%2Fuploads%2FiwVLDn1zi6c6cNGKKDJ4%2FScreenshot%202026-02-04%20at%2013.45.41.png?alt=media&#x26;token=c8360032-cecc-4379-887c-47cb3f644ab2" alt=""><figcaption><p>rules in Published status</p></figcaption></figure>

### Pending status

Some rules or versions of rules are not yet ready for production. For example, because the rule is still in development. Such a rule has a Pending status and it cannot be accessed using [Solver API](https://docs.decisionrules.io/doc/api/rule-solver-api). When trying to solve such a rule, [Solver API](https://docs.decisionrules.io/doc/api/rule-solver-api) returns the following HTTP request error:

```javascript
400 Bad Request
{
  "error": {
    "message": "Rule state is not published"
  }
}
```

{% hint style="success" %}
For the purpose of testing your rules and their versions that are not yet in production, you can execute rules in Pending status using two methods:

1. Use the **Debug** in [Test Bench](https://docs.decisionrules.io/doc/rules/common-rule-features/test-bench) feature to solve the rule directly within the platform.
2. Include the **X-Debug: true** header when calling the rule via API.
   {% endhint %}

#### Example:

<figure><img src="https://437457296-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MN4F4-qybg8XDATvios%2Fuploads%2FmWhXTyLDjx1yl0HFIbEC%2FScreenshot%202026-02-04%20at%2013.50.22.png?alt=media&#x26;token=9bed4251-13eb-41d4-a29a-3ddfe8eb1628" alt=""><figcaption><p>rules in Pending status</p></figcaption></figure>

### How to change the rule status

The status can be changed in rule settings by clicking the **Status toggle**. The rule **must be saved** to apply the status change.

<div><figure><img src="https://437457296-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MN4F4-qybg8XDATvios%2Fuploads%2FzZgdeUGwt38yufL4OHhh%2FScreenshot%202026-02-04%20at%2013.26.20.png?alt=media&#x26;token=121422e8-a515-42b0-a250-c5ee40edddfe" alt="" width="303"><figcaption><p>switched to Pending</p></figcaption></figure> <figure><img src="https://437457296-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MN4F4-qybg8XDATvios%2Fuploads%2FUpoLRLeD8hXJ2Z9GWAlh%2FScreenshot%202026-02-04%20at%2013.39.58.png?alt=media&#x26;token=291ea05e-6552-4207-871c-3727ab8afbbc" alt="" width="303"><figcaption><p>switched to Published</p></figcaption></figure></div>
