# 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](/doc/api/rule-solver-api.md).

#### Examples:

<figure><img src="/files/cXvoPaxbshV7l0HReAcI" 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](/doc/api/rule-solver-api.md). When trying to solve such a rule, [Solver API](/doc/api/rule-solver-api.md) 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 by using the **Debug** in [Test Bench](/doc/rules/common-rule-features/test-bench.md) feature to solve the rule directly within the platform.
{% endhint %}

#### Example:

<figure><img src="/files/1xDDtl1mEHulz9u9VZLP" 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="/files/LhwAlsDLJm2fJFHC2YB9" alt="" width="303"><figcaption><p>switched to Pending</p></figcaption></figure> <figure><img src="/files/vIwxRtYzyyERuVzoSiI9" alt="" width="303"><figcaption><p>switched to Published</p></figcaption></figure></div>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.decisionrules.io/doc/rules/common-rule-features/rule-settings/rule-state.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
