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

# Create Cloud-based Mocks

> Learn how to create modify and manage mock files in requestly

Cloud-based mocks let you simulate API responses by hosting mock data online instead of running a local server. With Requestly Interceptor’s File Server, you can upload mock files like JSON or HTML and redirect real API requests to these files. It’s a fast, shareable, and reliable way to mock backend APIs for frontend development and testing in isolation.

## How to Create a Cloud-based Mock

To create a cloud mock, you’ll first create a file in File Server and then set up a Redirect Rule to serve it in place of a real API.

### Step 1: Create a File in Requestly Interceptor File Server

<Steps>
  <Step title="Open File Server:">
    From the Requestly Interceptor Dashboard, go to the **Files** tab in the sidebar.
  </Step>

  <Step title="Click &#x22;New File&#x22; or Upload:">
    Choose **New File** to create one from scratch, or upload an existing JSON file.

    <img src="https://mintcdn.com/interceptor/goWI1O0WUCIMQT01/images/create-cloud-based-mocks/de32dd86-8b34-4cfd-94c5-25347627b290.png?fit=max&auto=format&n=goWI1O0WUCIMQT01&q=85&s=426d8fc66d68d80fdb3266c22b4c7cee" align="center" fullwidth="false" width="2048" height="1239" data-path="images/create-cloud-based-mocks/de32dd86-8b34-4cfd-94c5-25347627b290.png" />
  </Step>

  <Step title="Configure the File and save the file:">
    Give it a descriptive name and fill in the following options:

    * **Method**: HTTP method to match (GET, POST, etc.)

    * **Status**: Response code (e.g. 200 OK)

    * **Content Type**: e.g. `application/json`

    * **Latency** *(optional)*: Simulate response delay

    * **Endpoint**: Define a unique URL path

    * **Response Body**: Add your mock JSON/text

    * **Headers** *(optional)*: Add custom response headers

    * **Password Protection** *(optional)*: Secure with a query param password

    <img src="https://mintcdn.com/interceptor/goWI1O0WUCIMQT01/images/create-cloud-based-mocks/aeb2aff4-de54-4934-9438-c7816e8d5a8a.png?fit=max&auto=format&n=goWI1O0WUCIMQT01&q=85&s=af33d6c897e7827759582803972eb7cd" align="center" fullwidth="false" width="2048" height="1321" data-path="images/create-cloud-based-mocks/aeb2aff4-de54-4934-9438-c7816e8d5a8a.png" />
  </Step>
</Steps>

### Step 2: Redirect API Requests to File Server

<Steps>
  <Step title="Create a Redirect Rule:">
    Go to **HTTP Rules → + New Rule → Redirect Rule**.

    <img src="https://mintcdn.com/interceptor/goWI1O0WUCIMQT01/images/create-cloud-based-mocks/362047f4-03f2-49b8-93f7-515522bd10b1.png?fit=max&auto=format&n=goWI1O0WUCIMQT01&q=85&s=94fd0d524613b9070312517461e69922" align="center" fullwidth="false" width="2048" height="1309" data-path="images/create-cloud-based-mocks/362047f4-03f2-49b8-93f7-515522bd10b1.png" />
  </Step>

  <Step title="Name the Rule:">
    Give your rule a clear name and optional description.

    <img src="https://mintcdn.com/interceptor/goWI1O0WUCIMQT01/images/create-cloud-based-mocks/67515110-0849-4dbc-a9a9-de8b86ddd79d.png?fit=max&auto=format&n=goWI1O0WUCIMQT01&q=85&s=6b2e1c57d62c2a434c0c4660a329dfa8" align="center" fullwidth="false" width="2048" height="1231" data-path="images/create-cloud-based-mocks/67515110-0849-4dbc-a9a9-de8b86ddd79d.png" />
  </Step>

  <Step title="Set the Source Condition">
    Define when the rule should trigger. Use filters like **URL Contains**, **Equals**, **Regex**, or **Advanced Filters**.

    > 💡 Example:
    >
    > Match the bakery products API in the [Requestly Interceptor Playground:](https://requestly-playground.com/)
    >
    > [`https://rest.requestly-playground.com/api/products?searchJoin=and&with=type%3Bauthor&limit=30&language=en&search=type.slug:bakery%3Bstatus:publish`](https://rest.requestly-playground.com/api/products?searchJoin=and\&with=type%3Bauthor\&limit=30\&language=en\&search=type.slug:bakery%3Bstatus:publish)

    <img src="https://mintcdn.com/interceptor/goWI1O0WUCIMQT01/images/create-cloud-based-mocks/0abbb077-399a-4943-9585-ac8a2fa0319e.png?fit=max&auto=format&n=goWI1O0WUCIMQT01&q=85&s=e030a4e6317001d2c09eecf2c99c9d55" align="center" fullwidth="false" width="2048" height="1236" data-path="images/create-cloud-based-mocks/0abbb077-399a-4943-9585-ac8a2fa0319e.png" />
  </Step>

  <Step title="Set the Redirect Target:">
    Paste the File Server URL copied earlier. You can also select the file directly from File Server.
  </Step>

  <Step title="Save and Enable the Rule:">
    Click **Save** and toggle the rule **ON** to activate it.
  </Step>
</Steps>
