# Mocking Configuration

The `mocking` plugin simulates API responses without forwarding requests to upstream services, offering customization of status codes, response bodies, headers, and more for API testing and development.<!-- --> <!-- -->Configuration covers plugin parameters.

## Parameters[​](#parameters "Direct link to Parameters")

See plugin [common configurations](https://docs.api7.ai/apisix/reference/plugin-common-configurations.md) for configuration options available to all plugins.

* delay

  integer

  default: `0`

  ***

  Mock response delay in seconds.

* response\_status

  integer

  default: `200`

  ***

  HTTP status code of the mock response.

* content\_type

  string

  default: `application/json;charset=utf8`

  ***

  `Content-Type` header of the mock response.

* response\_example

  string

  ***

  Response body of the mock response. Support the use of [built-in variables](https://docs.api7.ai/apisix/reference/built-in-variables.md) in the body.

  At least one of the `response_example` and `response_schema` should be configured.

* response\_schema

  object

  ***

  Response [JSON Schema](https://json-schema.org). The JSON schema supports `string`, `number`, `integer`, `boolean`, `object`, and `array` in data types.

  At least one of the `response_example` and `response_schema` should be configured. `response_schema` is only effective when `response_example` is not configured.

* with\_mock\_header

  boolean

  default: `true`

  ***

  If true, add the response header `x-mock-by`. APISIX sets its value to `APISIX/{version}`, while API7 Gateway sets it to `API7/{version}`.

* response\_headers

  object

  ***

  Headers to be added in the mock response.
