# iMock

Use iMock to simulate different API call results that are caused by specific values of key request parameters. When you send an API request containing one of the values, iMock returns the corresponding result.

> **Note**:
>
> -   Use iTest to send API requests to receive the results that are simulated by iMock. For how to use iTest, see [iTest](itest).
> -   If you use other tools such as Postman to send API requests, you need to add the following parameters in the request headers: `loadmode: 2`, `markuid: 0A`, and `instmock: O`.

On the **Sandbox** > **Tools** > **iMock** page, follow these steps:

1.  Select an API.

![image.png](https://idocs-assets.marmot-cloud.com/storage/idocs87c36dc8dac653c1/1738832243872-a818ba0d-92f8-4d25-a02e-6e5bede28baf.png)

2.  The list shows different values of the key request parameters and the responding result codes in the response. You can click **View Details** to see the complete request body and response body.

![image.png](https://idocs-assets.marmot-cloud.com/storage/idocs87c36dc8dac653c1/1738832955464-0c7c4f91-80cc-4bd8-91a3-b210033f864d.png)

3.  Set the API Mocking duration. The duration can be 30 mins, 60 mins, 90 mins, or 120 mins. iMock is turned off automatically when the time is up.

![image.png](https://idocs-assets.marmot-cloud.com/storage/idocs87c36dc8dac653c1/1738833065794-818172dd-2bba-4920-aa11-ec2e9e501724.png)

4.  Turn on iMock by switching the **Off** button to **On**.

![image.png](https://idocs-assets.marmot-cloud.com/storage/idocs87c36dc8dac653c1/1738833155161-5b43d6d1-a883-426d-8f1b-8bd2adaccd34.png)