Skip to main content
Create a new mocking rule that will be added to the end of the rules list.
External DocumentationTo learn more, visit the Beeceptor documentation.

Parameters

ParameterDescription
DelayThe response delay in milliseconds before returning the mocked response.
DescriptionAn optional description to help identify and organize the rule.
EnabledCheck to enable the rule, Uncheck to disable it. Disabled rules are not applied to incoming requests.
Endpoint Match - HTTP MethodThe HTTP method that incoming requests must match.
Endpoint Match - OperatorSelect how the rule matches incoming requests against the specified value.
Endpoint Match - ValueThe value to match against incoming requests, based on the selected operator (path, regex pattern, body content, or header value).
Endpoint NameThe endpoint name where the rule will be created.
MockCheck to set the rule as mock. When unchecked, mocking is not attempted and only the delay is effective.
Random ResponsesA list of response objects with percentage weights as JSON array.

Each response must comply with the required response object properties. For more details please see Beeceptor’s API documentation.
Response BodyThe response body content to return (JSON or text).

For example:
{
“status”: “Awesome!”
}
Response HeadersThe response headers to send as a JSON object.

For example:
{
“Content-Type”: “application/json”
}
Response StatusThe HTTP status code to return when this rule matches.
Send TypeThe response type for the rule. Choose send for a fixed response or sendRandom for randomly selected responses.
Templated ResponseSelect true to enable HandleBar templating in the mocked response for dynamic content.

For more information about the Templated Response parameter please visit Beeceptor documentation.

Example Output

{
	"data": {
		"enabled": true,
		"mock": true,
		"delay": 0,
		"match": {
			"method": "GET",
			"operator": "SW",
			"value": "/my-api-path"
		},
		"send": {
			"status": 200,
			"body": "{ \"status\": \"Awesome!\"}",
			"headers": {
				"Content-Type": "application/json",
				"my-custom-header": "some-data"
			},
			"templated": false
		},
		"id": "s6ocngast47"
	}
}

Workflow Library Example

Create Rule with Beeceptor and Send Results Via Email
Workflow LibraryPreview this Workflow on desktop