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

# Update Rule

Update an existing mocking rule. Changes may take a few seconds to take effect.

<Note>
  External Documentation

  To learn more, visit the [Beeceptor documentation](https://beeceptor.com/docs/api-for-managing-mocking-rules/#update-a-rule).
</Note>

## Parameters

<div className="integrations-table">
  | Parameter                    | Description                                                                                                                                                                                                                                                                                                                                       |
  | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | Delay                        | The response delay in milliseconds before returning the mocked response.                                                                                                                                                                                                                                                                          |
  | Description                  | An optional description to help identify and organize the rule.                                                                                                                                                                                                                                                                                   |
  | Enabled                      | Select `Enabled` to activate the rule or `Disabled` to deactivate it. Disabled rules are not applied to incoming requests.                                                                                                                                                                                                                        |
  | Endpoint Match - HTTP Method | The HTTP method that incoming requests must match.                                                                                                                                                                                                                                                                                                |
  | Endpoint Match - Operator    | Select how the rule matches incoming requests against the specified value.                                                                                                                                                                                                                                                                        |
  | Endpoint Match - Value       | The value to match against incoming requests, based on the selected operator (path, regex pattern, body content, or header value).                                                                                                                                                                                                                |
  | Endpoint Name                | The name of the endpoint to update the rule of.                                                                                                                                                                                                                                                                                                   |
  | Mock                         | Select `Enabled` to enable mocking for this rule or `Disabled` or disabled to disable mocking for this rule. When enabled, the rule will intercept matching requests and return the configured response.                                                                                                                                          |
  | Random Responses             | A list of response objects with percentage weights as JSON array.<br /><br />Each response must comply with the required response object properties. For more details please see [Beeceptor's API documentation](https://beeceptor.com/docs/api-for-managing-mocking-rules/#example-create-a-rule-that-picks-a-random-response-based-on-weights). |
  | Response Body                | The response body content to return (JSON or text).<br /><br />For example:<br /><pre><code>\{<br />  "status": "Awesome!"<br />}</code></pre>                                                                                                                                                                                                    |
  | Response Headers             | The response headers to send as a JSON object.<br /><br />For example:<br /><pre><code>\{<br />  "Content-Type": "application/json"<br />}</code></pre>                                                                                                                                                                                           |
  | Response Status              | The HTTP status code to return when this rule matches.                                                                                                                                                                                                                                                                                            |
  | Rule ID                      | The ID of the required rule.                                                                                                                                                                                                                                                                                                                      |
  | Send Type                    | The response type for the rule. Choose `send` for a fixed response or `sendRandom` for randomly selected responses.                                                                                                                                                                                                                               |
  | Templated Response           | Select `true` to enable HandleBar templating in the mocked response for dynamic content.<br /><br />For more information about the `Templated Response` parameter please visit [Beeceptor documentation](https://beeceptor.com/docs/parameterized-dynamic-response-payload-using-request-header/).                                                |
</div>

## Example Output

```json theme={"dark"}
{
	"enabled": true,
	"mock": true,
	"delay": 31000,
	"match": {
		"method": "POST",
		"value": "/customers",
		"operator": "SW"
	},
	"send": {
		"status": 200,
		"body": "{ }",
		"headers": {
			"Content-Type": "application/json",
			"my-custom-header": "some-data"
		},
		"templated": false
	}
}
```

## Workflow Library Example

[Update Rule with Beeceptor and Send Results Via Email](https://library.blinkops.com/workflows/update-rule-with-beeceptor-and-send-results-via-email)

<div className="iframe-wrapper">
  <div className="iframe-media">
    <img src="https://mintcdn.com/blinkops-2/ojHYuDeYX5FWuN8a/img/Icons/play-box.svg?fit=max&auto=format&n=ojHYuDeYX5FWuN8a&q=85&s=b8af968e71438a9499c3223c9bd29fb2" alt="Workflow Library" width="16" height="16" data-path="img/Icons/play-box.svg" />

    Preview this Workflow on desktop
  </div>

  <iframe className="iframe" src="https://library.blinkops.com/workflows/update-rule-with-beeceptor-and-send-results-via-email/canvas" />
</div>
