> ## 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.

# Use File Collection

Mock collections provide a structured way to manage your mocks. Each collection can optionally include a static “path” that is automatically prepended to the mock endpoints within that collection. This feature is particularly useful for versioning your mocks, ensuring consistency and clarity across different versions of your API.

### Key benefits

1. **Efficient Organization**:

   * Group related mocks together, making it easier to manage and locate them.

2) **Better Versioning**:

   * Utilize the static "path" feature to prepend a version identifier or other relevant prefixes to your mock endpoints.

   * Simplify the process of updating and managing multiple versions of your API.

### Example

Consider a collection for API version 1.0:

* Collection path: `/api/v1`

- Mock Endpoints:

  * `/users`

  * `/products`

With the collection path, the actual mock endpoints become:

* `/api/v1/users`

- `/api/v1/products`

This approach ensures that all endpoints within the collection are easily versioned, improving maintainability and clarity.

**Creating a New Collection:**

<Steps>
  <Step title="Go to the Mocks Dashboard">
    From the Requestly Interceptor dashboard, click on "Mock" in the left menu bar.
  </Step>

  <Step title="Click on &#x22;New Collection&#x22;">
    On the top right side of the table, click on new collection

    <img src="https://mintcdn.com/requestly/1os8lH_VUE6QydeH/images/mock-collection/a24ebef4-4308-41d8-910e-737098a6a7a6.png?fit=max&auto=format&n=1os8lH_VUE6QydeH&q=85&s=9d125985992b7a80b189af0fcba8e5e7" align="left" fullwidth="false" width="2400" height="1452" data-path="images/mock-collection/a24ebef4-4308-41d8-910e-737098a6a7a6.png" />
  </Step>

  <Step title="Enter the details of the Mock Collection.">
    <img src="https://mintcdn.com/requestly/1os8lH_VUE6QydeH/images/mock-collection/b71ad662-9ccf-43fa-8545-4d008a3cc49e.png?fit=max&auto=format&n=1os8lH_VUE6QydeH&q=85&s=78b9c9774d4d7ba3c9dd132411e46d6a" align="left" fullwidth="false" width="2400" height="1482" data-path="images/mock-collection/b71ad662-9ccf-43fa-8545-4d008a3cc49e.png" />

    * **Name**: Give the collection a name.

    * **Collection Path**: A path which gets prepended to all the mocks inside this collection. For example, if the collection path is "/api/v1", then all the child mocks’ endpoints will start with this path.

    * **Description**: Provide a brief description of the collection.
  </Step>

  <Step title="Click on &#x22;Save&#x22; to finalize the collection." />
</Steps>

**Moving Mocks into a Collection:**

Once the collection is created, you can move mocks into it:

<Steps>
  <Step title="Click on the options button on the right of the mock you want to move and select &#x22;Move.&#x22;">
    <img src="https://mintcdn.com/requestly/1os8lH_VUE6QydeH/images/mock-collection/7a4ca5d4-851f-4fe2-b813-a230a721e630.png?fit=max&auto=format&n=1os8lH_VUE6QydeH&q=85&s=0f7d4e5c6bd806a2ae7ad32fcd59a312" align="left" fullwidth="false" width="2400" height="1462" data-path="images/mock-collection/7a4ca5d4-851f-4fe2-b813-a230a721e630.png" />
  </Step>

  <Step title="Select the appropriate collection and click &#x22;Move.&#x22;">
    <img src="https://mintcdn.com/requestly/1os8lH_VUE6QydeH/images/mock-collection/4f3b90b8-02de-48e2-9fbd-5a0b01e07a96.png?fit=max&auto=format&n=1os8lH_VUE6QydeH&q=85&s=2f68da7ddcb4d479cf544f7287307db4" align="left" fullwidth="false" width="2400" height="1454" data-path="images/mock-collection/4f3b90b8-02de-48e2-9fbd-5a0b01e07a96.png" />
  </Step>
</Steps>
