Create an API Collection in Insomnia
In your Insomnia workspace, click Create > API Collection, enter a name, and click Create. To add an OpenAPI spec, click the Spec tab, then write your spec or click Use example OpenAPI Spec.
Create an API Collection
An API Collection holds your requests, folders, environments, and an optional OpenAPI spec.
- In your workspace, click Create.
- From the Create dropdown menu, select “API Collection”.
- In the Name field, enter
Flights Service. - Click Create.
Your new API Collection opens.
v13.3+ Documents and collections are merged into a single workspace type called an API Collection, so Create > Design document is no longer in the UI. Create an API Collection instead, then add your spec to it. For more details, see API Collections.
Add an OpenAPI spec
You can design an API in the same API Collection that you use to call it.
- On the API Collection screen, click the Spec tab.
- Click Use example OpenAPI Spec to populate the spec editor with the sample Swagger Petstore specification.
To write your own spec instead, enter it directly in the spec editor. To start from a spec you already have, see Import an API specification into an API Collection.
Validate
On the Spec tab, confirm that you can see the three panes of the spec editor:
- On the left, an overview of the specification, with sections that you can expand. Click an element to highlight it in the specification.
- In the middle, the specification itself, along with any warnings or errors.
- On the right, a preview of the rendered specification.
To turn the spec into requests you can send, click Generate and select “Requests”. For more information, see Generate requests from an API spec.