Once you test more than a handful of endpoints, saved requests need a home. Collections in Hoppscotch work like folders on your computer: a collection holds requests and sub-folders, and folders can be nested as deep as you like.
Create a collection
- Open the Collections panel in the sidebar.
- Create a new collection and give it a clear name, such as the API or project name.
- Use the collection’s menu to add folders, for example Auth, Users and Orders.
- When you save a request, choose the collection and folder it belongs in.
You can drag requests and folders to reorder them or move them somewhere else.
A structure that scales
A layout many teams find easy to navigate mirrors the API’s own sections:
Shop API
├── Auth
│ ├── Log in
│ └── Refresh token
├── Products
│ ├── List products
│ ├── Get product
│ └── Create product
└── Orders
├── Create order
└── Cancel order
Name requests by what they do (“Create order”) rather than by URL. The URL is visible anyway, and action names read better in test reports.
Share settings at collection or folder level
Collections and folders can have their own authorization and headers. Set Bearer auth once on the collection, and leave each request’s authorization set to Inherit. When the token changes, you update one place. The same works for headers such as Accept or an API version header.
History versus collections
Every request you send appears in History, saved or not. History is great for finding something you tried an hour ago; collections are for requests you want to keep. You can save any history entry into a collection.
Import from other tools
Hoppscotch can import collections in several formats, including its own JSON format, Postman collections, Insomnia exports and OpenAPI specifications. Use the import option in the Collections panel and pick the format. After importing, check authorization and environment variables — tools name these slightly differently, so a quick review saves confusion later.
Export and share
- File — export a collection as JSON to back it up, put it in your Git repository next to the API code, or run it with the CLI.
- GitHub gist — export to a gist to share a link with someone outside your team.
- Team workspace — if you sign in, create a team and move collections into its workspace so everyone sees the same, always-updated requests.
Run a whole collection
Recent versions of Hoppscotch include a collection runner that sends every request in a collection or folder in order and shows which tests passed. For automation outside the app, the Hoppscotch CLI does the same in a terminal or CI pipeline.
Tips
- Put requests in the order a real user would call them (log in, create, read, update, delete). It makes running the collection meaningful.
- Keep URLs environment-based with
<<baseUrl>>— see environment variables. - Add a short description to collections and folders so new teammates know what they are for.