> ## Documentation Index
> Fetch the complete documentation index at: https://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/requestly/I3ka5JRtv_yeHtHG/images/create-cloud-based-mocks/de32dd86-8b34-4cfd-94c5-25347627b290.png?fit=max&auto=format&n=I3ka5JRtv_yeHtHG&q=85&s=f58e95a95c4999ca60bc061d2a02bb81" 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/requestly/I3ka5JRtv_yeHtHG/images/create-cloud-based-mocks/aeb2aff4-de54-4934-9438-c7816e8d5a8a.png?fit=max&auto=format&n=I3ka5JRtv_yeHtHG&q=85&s=a228d51160c613a7efe1b754f88894a9" 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/requestly/I3ka5JRtv_yeHtHG/images/create-cloud-based-mocks/362047f4-03f2-49b8-93f7-515522bd10b1.png?fit=max&auto=format&n=I3ka5JRtv_yeHtHG&q=85&s=7049400a5e5039beb04db5408ba6bfbd" 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/requestly/I3ka5JRtv_yeHtHG/images/create-cloud-based-mocks/67515110-0849-4dbc-a9a9-de8b86ddd79d.png?fit=max&auto=format&n=I3ka5JRtv_yeHtHG&q=85&s=ab04b7f64793791ca851e8ef4db27c21" 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/requestly/I3ka5JRtv_yeHtHG/images/create-cloud-based-mocks/0abbb077-399a-4943-9585-ac8a2fa0319e.png?fit=max&auto=format&n=I3ka5JRtv_yeHtHG&q=85&s=15b18bffbbbb78a37af91bb5001cd93a" 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>
