> ## Documentation Index
> Fetch the complete documentation index at: https://requestly-mintlify-changelog-requestly-past-week-38456.mintlify.site/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’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—perfect for frontend development or testing in isolation.

## How to Create a Cloud-based Mock

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

### Step 1: Create a File on Requestly’s File Server

<Steps>
  <Step title="Open the File Server:">
    From the Requestly 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-mintlify-changelog-requestly-past-week-38456/Mws7Nl41vrG3QlsU/images/create-cloud-based-mocks/de32dd86-8b34-4cfd-94c5-25347627b290.png?fit=max&auto=format&n=Mws7Nl41vrG3QlsU&q=85&s=9436c233e859af897360c602310b2253" 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-mintlify-changelog-requestly-past-week-38456/Mws7Nl41vrG3QlsU/images/create-cloud-based-mocks/aeb2aff4-de54-4934-9438-c7816e8d5a8a.png?fit=max&auto=format&n=Mws7Nl41vrG3QlsU&q=85&s=93bdc713818e760cb1f1b1ea58651d29" 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 the File Server

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

    <img src="https://mintcdn.com/requestly-mintlify-changelog-requestly-past-week-38456/Mws7Nl41vrG3QlsU/images/create-cloud-based-mocks/362047f4-03f2-49b8-93f7-515522bd10b1.png?fit=max&auto=format&n=Mws7Nl41vrG3QlsU&q=85&s=5e3eccbdc1bc99200477fc822673cb2c" 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-mintlify-changelog-requestly-past-week-38456/Mws7Nl41vrG3QlsU/images/create-cloud-based-mocks/67515110-0849-4dbc-a9a9-de8b86ddd79d.png?fit=max&auto=format&n=Mws7Nl41vrG3QlsU&q=85&s=7ad09145468149bd09bb9000a2196953" 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 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-mintlify-changelog-requestly-past-week-38456/Mws7Nl41vrG3QlsU/images/create-cloud-based-mocks/0abbb077-399a-4943-9585-ac8a2fa0319e.png?fit=max&auto=format&n=Mws7Nl41vrG3QlsU&q=85&s=5c9b059b081fce09b5b0e702a1e87046" 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 your File Server.
  </Step>

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