REGISTER NOW FOR THE KONG AGENTIC ERA WORLD TOUR GOVERN A2A TRAFFIC WITH KONG'S NEW AGENT GATEWAY WHY GARTNER’S “CONTEXT MESH” CHANGES EVERYTHING DON’T MISS API + AI SUMMIT 2026 SEPT 30 – OCT 1
  • [Why Kong](/company/why-kong)Why Kong
    • Explore the unified API Platform
        • BUILD APIs
        • [
          Kong Insomnia](/products/kong-insomnia)
          Kong Insomnia
        • [
          API Design](/products/kong-insomnia/api-design)
          API Design
        • [
          API Mocking](/products/kong-insomnia/api-mocking)
          API Mocking
        • [
          API Testing and Debugging](/products/kong-insomnia/api-testing-and-debugging)
          API Testing and Debugging
        • [
          MCP Client](/products/kong-insomnia/mcp-client)
          MCP Client
        • RUN APIs
        • [
          API Gateway](/products/kong-gateway)
          API Gateway
        • [
          Context Mesh](/products/kong-konnect/features/context-mesh)
          Context Mesh
        • [
          AI Gateway](/products/kong-ai-gateway)
          AI Gateway
        • [
          Event Gateway](/products/event-gateway)
          Event Gateway
        • [
          Kubernetes Operator](/products/kong-gateway-operator)
          Kubernetes Operator
        • [
          Service Mesh](/products/kong-mesh)
          Service Mesh
        • [
          Ingress Controller](/products/kong-ingress-controller)
          Ingress Controller
        • [
          Runtime Management](/products/kong-konnect/features/runtime-management)
          Runtime Management
        • DISCOVER APIs
        • [
          Developer Portal](/products/kong-konnect/features/developer-portal)
          Developer Portal
        • [
          Service Catalog](/products/kong-konnect/features/api-service-catalog)
          Service Catalog
        • [
          MCP Registry](/products/mcp-registry)
          MCP Registry
        • GOVERN APIs
        • [
          Metering and Billing](/products/kong-konnect/features/usage-based-metering-and-billing)
          Metering and Billing
        • [
          APIOps and Automation](/products/apiops-automation)
          APIOps and Automation
        • [
          API Observability](/products/kong-konnect/features/api-observability)
          API Observability
        • [Why Kong?](/company/why-kong)Why Kong?
      • CLOUD
      • [Cloud API Gateways](/products/kong-konnect/features/dedicated-cloud-gateways)Cloud API Gateways
      • [Need a self-hosted or hybrid option?](/products/kong-enterprise)Need a self-hosted or hybrid option?
      • COMPARE
      • [Considering AI Gateway alternatives? ](/performance-comparison/ai-gateway-alternatives)Considering AI Gateway alternatives?
      • [Kong vs. Postman](/performance-comparison/kong-vs-postman)Kong vs. Postman
      • [Kong vs. MuleSoft](/performance-comparison/kong-vs-mulesoft)Kong vs. MuleSoft
      • [Kong vs. Apigee](/performance-comparison/kong-vs-apigee)Kong vs. Apigee
      • [Kong vs. IBM](/performance-comparison/ibm-api-connect-vs-kong)Kong vs. IBM
      • GET STARTED
      • [Sign Up for Kong Konnect](/products/kong-konnect/register)Sign Up for Kong Konnect
      • [Documentation](https://developer.konghq.com/)Documentation
      • FOR PLATFORM TEAMS
      • [Developer Platform](/solutions/building-developer-platform)Developer Platform
      • [Kubernetes and Microservices](/solutions/build-on-kubernetes)Kubernetes and Microservices
      • [Observability](/solutions/observability)Observability
      • [Service Mesh Connectivity ](/solutions/service-mesh-connectivity)Service Mesh Connectivity
      • [Kafka Event Streaming](/solutions/kafka-stream-api-management)Kafka Event Streaming
      • FOR EXECUTIVES
      • [AI Connectivity](/ai-connectivity)AI Connectivity
      • [Open Banking](/solutions/open-banking)Open Banking
      • [Legacy Migration](/solutions/legacy-api-management-migration)Legacy Migration
      • [Platform Cost Reduction](/solutions/api-platform-consolidation)Platform Cost Reduction
      • [Kafka Cost Optimization](/solutions/reduce-kafka-cost)Kafka Cost Optimization
      • [API Monetization](/solutions/api-monetization)API Monetization
      • [AI Monetization](/solutions/ai-monetization)AI Monetization
      • [AI FinOps](/solutions/ai-cost-governance-finops)AI FinOps
      • FOR AI TEAMS
      • [Agent Gateway](/agent-gateway)Agent Gateway
      • [AI Governance](/solutions/ai-governance)AI Governance
      • [AI Security](/solutions/ai-security)AI Security
      • [AI Cost Control](/solutions/ai-cost-optimization-management)AI Cost Control
      • [Agentic Infrastructure](/solutions/agentic-ai-workflows)Agentic Infrastructure
      • [MCP Production](/solutions/mcp-production-and-consumption)MCP Production
      • [MCP Traffic Gateway](/solutions/mcp-governance)MCP Traffic Gateway
      • FOR DEVELOPERS
      • [Mobile App API Development](/solutions/mobile-application-api-development)Mobile App API Development
      • [GenAI App Development](/solutions/power-openai-applications)GenAI App Development
      • [API Gateway for Istio](/solutions/istio-gateway)API Gateway for Istio
      • [Decentralized Load Balancing](/solutions/decentralized-load-balancing)Decentralized Load Balancing
      • BY INDUSTRY
      • [Financial Services](/solutions/financial-services-industry)Financial Services
      • [Healthcare](/solutions/healthcare)Healthcare
      • [Higher Education](/solutions/api-platform-for-education-services)Higher Education
      • [Insurance](/solutions/insurance)Insurance
      • [Manufacturing](/solutions/manufacturing)Manufacturing
      • [Retail](/solutions/retail)Retail
      • [Software & Technology](/solutions/software-and-technology)Software & Technology
      • [Transportation](/solutions/transportation-and-logistics)Transportation
      • [See all Solutions](/solutions)See all Solutions
  • [Pricing](/pricing)Pricing
      • DOCUMENTATION
      • [Kong Konnect](https://developer.konghq.com/konnect/)Kong Konnect
      • [Kong Gateway](https://developer.konghq.com/gateway/)Kong Gateway
      • [Kong Mesh](https://developer.konghq.com/mesh/)Kong Mesh
      • [Kong AI Gateway](https://developer.konghq.com/ai-gateway/)Kong AI Gateway
      • [Kong Event Gateway](https://developer.konghq.com/event-gateway/)Kong Event Gateway
      • [Kong Insomnia](https://developer.konghq.com/insomnia/)Kong Insomnia
      • [Plugin Hub](https://developer.konghq.com/plugins/)Plugin Hub
      • EXPLORE
      • [Blog](/blog)Blog
      • [Learning Center](/blog/learning-center)Learning Center
      • [eBooks](/resources/e-book)eBooks
      • [Reports](/resources/reports)Reports
      • [Demos](/resources/demos)Demos
      • [Customer Stories](/customer-stories)Customer Stories
      • [Videos](/resources/videos)Videos
      • EVENTS
      • [API + AI Summit](/events/conferences/api-ai-summit)API + AI Summit
      • [Agentic Era World Tour](/agentic-era-world-tour)Agentic Era World Tour
      • [Webinars](/events/webinars)Webinars
      • [User Calls](/events/user-calls)User Calls
      • [Workshops](/events/workshops)Workshops
      • [Meetups](/events/meetups)Meetups
      • [See All Events](/events)See All Events
      • FOR DEVELOPERS
      • [Get Started](https://developer.konghq.com/)Get Started
      • [Community](/community)Community
      • [Certification](/academy/certification)Certification
      • [Training](https://education.konghq.com)Training
      • COMPANY
      • [About Us](/company/about-us)About Us
      • [We're Hiring!](/company/careers)We're Hiring!
      • [Press Room](/company/press-room)Press Room
      • [Contact Us](/company/contact-us)Contact Us
      • [Kong Partner Program](/partners)Kong Partner Program
      • [Enterprise Support Portal](https://support.konghq.com/s/)Enterprise Support Portal
      • [Documentation](https://developer.konghq.com/?_gl=1*tphanb*_gcl_au*MTcxNTQ5NjQ0MC4xNzY5Nzg4MDY0LjIwMTI3NzEwOTEuMTc3MzMxODI2MS4xNzczMzE4MjYw*_ga*NDIwMDU4MTU3LjE3Njk3ODgwNjQ.*_ga_4JK9146J1H*czE3NzQwMjg1MjkkbzE4OSRnMCR0MTc3NDAyODUyOSRqNjAkbDAkaDA)Documentation
  • [](/search)
  • [Login](https://cloud.konghq.com/login)Login
  • [Book Demo](/contact-sales)Book Demo
  • [Get Started](/products/kong-konnect/register)Get Started
[Blog](/blog)Blog
  • [AI Gateway](/blog/tag/ai-gateway)AI Gateway
  • [AI Security](/blog/tag/ai-security)AI Security
  • [AIOps](/blog/tag/aiops)AIOps
  • [API Security](/blog/tag/api-security)API Security
  • [API Gateway](/blog/tag/api-gateway)API Gateway
|
    • [API Management](/blog/tag/api-management)API Management
    • [API Development](/blog/tag/api-development)API Development
    • [API Design](/blog/tag/api-design)API Design
    • [Automation](/blog/tag/automation)Automation
    • [Service Mesh](/blog/tag/service-mesh)Service Mesh
    • [Insomnia](/blog/tag/insomnia)Insomnia
    • [Event Gateway](/blog/tag/event-gateway)Event Gateway
    • [View All Blogs](/blog/page/1)View All Blogs
We're Entering the Age of AI Connectivity [Read more](/blog/news/the-age-of-ai-connectivity)Read moreProducts & Agents:
    • [Kong AI Gateway](/products/kong-ai-gateway)Kong AI Gateway
    • [Kong API Gateway](/products/kong-gateway)Kong API Gateway
    • [Kong Event Gateway](/products/event-gateway)Kong Event Gateway
    • [Kong Metering & Billing](/products/usage-based-metering-and-billing)Kong Metering & Billing
    • [Kong Insomnia](/products/kong-insomnia)Kong Insomnia
    • [Kong Konnect](/products/kong-konnect)Kong Konnect
  • [Documentation](https://developer.konghq.com)Documentation
  • [Book Demo](/contact-sales)Book Demo
  1. Home
  2. Blog
  3. Engineering
  4. Speed-Review API Specifications with Insomnia
[Engineering](/blog/engineering)Engineering
September 20, 2021
12 min read

# Speed-Review API Specifications with Insomnia

Viktor Gamov

As the software application world moves from [monolith architectures to microservices](https://konghq.com/blog/learning-center/monolith-vs-microservices)monolith architectures to microservices, we are also seeing a shift toward developing modular and reusable APIs. According to [APIOps](https://konghq.com/blog/what-is-apiops)APIOps, reusable APIs are consumable APIs, which means they must be well-documented and compliant. The separation between the *designers*, *builders* and *consumers* of an API grows larger and larger, making the API specification even more central to that API's success.

### *The API spec is a contract. It is a promise that an API will function in a certain way. *

API builders implement the spec, while API consumers reference the spec to know what behavior to expect. Yet, somewhere along the evolutionary process of an API, the API specification needs to be reviewed:

  • - Does the API spec comply with a standard format?
  • - Does the API implementation behave in accordance with the spec?
  • - Has the expected behavior been verified through testing?

### *When either the API spec or implementation changes, you must perform all of these review steps again. *


This review process is a critical function in organizations that build [microservices](https://konghq.com/blog/learning-center/what-are-microservices)microservices. And while there's a slow, manual way to do API spec review, there's also a quicker, automated way.

In this article, we'll walk through the steps involved in reviewing an API specification. We start with a running example of an API service with a few endpoints. In our hands, we have a purported API spec document corresponding to that service. As is often the case, a development team that consumes our API service has complained that the spec is outdated and incorrect. We'll consider the steps we would take to review this spec manually. Then, we'll look at what the spec review process would look like when using [Insomnia](https://insomnia.rest)Insomnia.

Are you ready? Let's dive in.

## Our API Service: Names and IDs

First, let's briefly describe our simple API service. Our API service manages a database of users. Each User has an id and a name. Our service exposes four endpoints:

  1. - GET /users returns the entire list of users.
  2. - GET /users/:id returns the user with the given id.
  3. - DELETE /users/:id deletes the user with the given id.
  4. - PUT /users adds a new user to the database.

We built this service as a basic Node.js Express server. It consists of the server code, index.js, and the starting data set, users.json. The code for this service is [publicly available](https://bit.ly/insomnia-api-specs-example)publicly available. For this walkthrough, we've deployed our service to GCP Cloud Run.

Below is an example cURL request for fetching all users from our API service:

$ curl -i -X GET https://users-api-uxngcvgmwq-uc.a.run.app/users
HTTP/2 200 
x-powered-by: Express
content-type: application/json; charset=utf-8
…

[{"id":"b850756e-f6fd-46e8-95ef-3125956a7181","name":"Aaron Adams"},{"id":"f67838ce-936f-4db5-a129-d8dab5320f1c","name":"Beth Barnes"},{"id":"e76c81ce-ee9f-4d89-857e-f4c6e5915306","name":"Charlie Collins"},{"id":"a8bba489-9f15-4115-943f-b76c528e6d29","name":"Dawn Dawson"},{"id":"eed23d3d-dd97-48a5-bcbe-43ab1c0213d4","name":"Elise Ellis"}]

## Manually Validating API Specifications

It's Friday afternoon, and you get an email from the marketing features project team with the subject line, "Users API – PLEASE HELP." It reads like this:

*We're building a new feature that uses your team's Users API. We looked at the API documentation page (which, by the way, was last updated over a year ago) for the available endpoints, but the responses we're getting don't look consistent. Are we doing something wrong? I'm attaching the spec document we're working from…*

You reluctantly open the attached file, aptly named users_api_spec_201911-v0-9 copy (1).yaml, and scan it briefly. Below are some of the salient parts:

paths:
    /users:
      get:
        summary: "Get all users"
        responses:
          "200":
            description: "200 OK, all users"
            content:
              application/json:
                schema:
                  $ref: "#/components/schemas/ArrayOfUsers"
      patch:
        summary: "Add a new user"
        requestBody:
          required: true
          content:
            application/json:
              schema:
                type: obj
                properties:
                  name:
                    type: string
        responses:
          "200":
            content:
              application/json:
                schema:
                  $ref: "#/components/schemas/User"
          "500":
            description: "500, name required"
            content:
              application/json:
                schema:
                  type: obj
                  properties:
                    message:
                      type: string
      delete:
        summary: "Delete a user"
        parameters:
          - in: query
            name: userId
            schema:
              type: string
        responses:
          "200":
            description: "200 OK"
          "500":
            description: "500, User not found"
            content:
              application/json:
                schema:
                  type: obj
                  properties:
                    message:
                      type: string
    /users/{id}:
      get:
        summary: "Get user"
        parameters:
          - in: path
            name: userId
            schema:
              type: string
            required: true
            description: "id (uuid) of user to get"
        responses:
          "200":
            description: "200 OK, user"
            content:
              application/json:
                schema:
                  $ref: "#/components/schemas/User"
          "500":
            description: "500, User not found"
            content:
              application/json:
                schema:
                  type: object
                  properties:
                    message:
                      type: string
  components:
    schemas:
      Users:
        type: array
        items:
          $ref: '#/components/schemas/User'
      User:
        type: object
        properties:
          id:
            type: string
          name:
            type: string

You spot some problems immediately. For example, the shape of the response to GET /users references a schema (ArrayOfUsers) that isn't defined in the schema components. Some schema instances are of type obj, which isn't a valid data type in OAS 3. It looks like it's time to do a thorough API spec review. Let's get to work.

### Validate and Lint

At the very least, you *know* that obj is not a valid type in an OpenAPI specification, but object is. And the GET /users response references an ArrayOfUsers schema, but the schema defined lower down is called Users, not ArrayOfUsers. Who wrote this spec? You quietly hope that they've taken a job with your competitor.


Those are just some of the glaring syntax issues that jumped out right away—and there has to be more. We need a way to validate the entire spec, ensuring that it conforms with the OpenAPI standard. One way to do this linting is by using the [Swagger Editor](https://editor.swagger.io)Swagger Editor. We can pull up that website and then copy-paste our spec. The linter in the Swagger Editor will tell us where our mistakes live.

Swagger Lint API Specification

It looks like there are several problems with our syntax beyond the ones we spotted. We could work within the Swagger Editor to clean up the syntax.

### Test API Implementation Against API Specification

After cleaning up the file to have a syntactically valid spec, the next step is to run a test case in the production API service. Does it behave the way the API spec says it ought to?

Let's start with a cURL request to get an existing user. Our original GET /users response had a user with an id or eed23d3d-dd97-48a5-bcbe-43ab1c0213d4. We send a request to get that user:

$ curl -X GET https://users-api-uxngcvgmwq-uc.a.run.app/users/eed23d3d-dd97-48a5-bcbe-43ab1c0213d4

{"id":"eed23d3d-dd97-48a5-bcbe-43ab1c0213d4","name":"Elise Ellis"}

That looks like what we would expect. How about if we try to get a non-existent user?

$ curl -i -X GET https://users-api-uxngcvgmwq-uc.a.run.app/users/abcde
HTTP/2 404 
x-powered-by: Express
content-type: text/html; charset=utf-8
…

User not found.

The API spec said that we should expect a status code of 500, not 404, and that the response would be a JSON object with a message rather than a response of simple text. It looks like the API implementation has evolved, but the API spec has gotten stale.

Let's test out one more request. This time, we'll try to delete a user. The API spec says we should send a DELETE request to /users and include the user's id as a query parameter:

$ curl -i -X DELETE https://users-api-uxngcvgmwq-uc.a.run.app/users?id=eed23d3d-dd97-48a5-bcbe-43ab1c0213d4
HTTP/2 404 
x-powered-by: Express
…

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot DELETE /users</pre>
</body>
</html>

Well, *that* was unexpected. Our API spec could use some serious work.

### Manual Validation is Unsustainable

While it's wonderful that our manual review steps have surfaced where there are problems in our API spec, this manual validation process is unsustainable. Even if your API spec was versioned, the manual process of copy-pasting the latest proposed version into Swagger Editor for linting is tedious and time-consuming.

Our cURL requests for testing the API service were nice because we could run them at the command line. However, will you have the time to craft, execute and examine an entire set of cURL requests every time you want to test the API service for regressions? This manual process is error-prone and would benefit from automation.

There is a better way.

## API Specification Validation with Insomnia

[Insomnia](https://insomnia.rest)Insomnia is more than just an API client; it facilitates better API design with Git synchronization, OpenAPI format validation, and automated testing. By integrating Insomnia into your APIOps (DevOps+GitOps) workflow, you'll end up with validated, tested and up-to-date API specs that reside right beside your API implementation.

Let's walk through how to get there.

### Create a Design Document

After installing and starting up Insomnia, you'll arrive at the Dashboard. Click on **Create** and select **Design Document**.

Create a Design Document in Insomnia

After entering a name for your Design Document (for example, "Users API") and clicking on **Create**, you'll end up at an OpenAPI specification editor with an empty document.

Insomnia Empty Window

### Set Up Git Sync

Insomnia can sync your design document with a Git repository (GitHub, GitLab and Bitbucket). As you make changes to your API spec, you can commit and push those changes to your remote repository—all from within Insomnia! When you sync to a repository, Insomnia will keep all of its work within a .insomnia subfolder.

To get started, click on "Set up Git Sync" and then configure Insomnia to [hook into your remote repository](https://docs.insomnia.rest/insomnia/git-sync#remote-repository-settings)hook into your remote repository.

Configure Insomnia Repository

Along with your repository's Git URI (HTTPS), you'll also need:

  • - The "Author Name" and "Author Email" to commit messages.
  • - Your remote repository Username, along with an Authentication Token for pulling from and pushing to the repository. This authentication token is known as a "personal access token" on [GitHub](https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token)GitHub, [GitLab](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html)GitLab and [Bitbucket](https://confluence.atlassian.com/bitbucketserver/personal-access-tokens-939515499.html)Bitbucket and [Bitbucket Server](https://confluence.atlassian.com/bitbucketserver/personal-access-tokens-939515499.html)Bitbucket Server.

After you have connected your Insomnia Design Document to your Git repository, you'll be able to navigate between branches, see commit history and commit and push your changes.

Insomnia git sync complete for api specification

### Real-Time Linting and Syntax Validation

Now that we set up our repository, we paste in our syntax-violating, out-of-date API specification. As soon as we do that, we see Insomnia's real-time linter go into action. We're immediately notified of our API spec's syntax violations:

Insomnia Lint

Yes, this is similar to what we would see in Swagger Editor. But remember, we will do *all* of our design and testing here in Insomnia, and we'll also push our changes to Git. Syntax validation can happen here, within our main working environment, rather than copy-pasted to a third-party site.

With our linter pointing out our violations, we click on each violation to navigate directly to the offending line. One by one, we go through the API spec and clean it up so that it is at least API standards-compliant. From here, we can commit our changes to the repository.

Insomnia Select Commit for API Specification

We enter a commit message:

Insomnia Commit

Then, we push our commit to the remote repository:

Insomnia Push API Specification

Now, our latest API specification document is available for others who pull down the repository's latest commits.

### "Debug" With Example Requests

Although our API spec no longer violates OpenAPI syntax, we still have some consistency issues between the spec and the actual implementation. You'll recall that the spec says to expect a 500 status code on a non-existent user, but the API service (rightly) returns a 404.

In Insomnia, we enter "Debug" mode to create a set of stored API requests. These requests will also comprise the available requests we can use in our automated test suite.

Insomnia Debug

When we enter Debug mode, we notice that Insomnia has already generated a set of requests inferred from our API spec document!

Insomnia Requests Inferred

This is a great start.

We do notice several things about our actual API implementation which our spec has gotten wrong. First, the request method for adding a new user should be PUT, not PATCH. Also, the request for deleting a user should have the user's id as a path parameter rather than a query parameter.

We go back to "Design" mode to make those changes to our spec. And while we're at it, any "user not found" responses should have a status code of 404 in our spec, not 500. After making those changes, we go back to "Debug" mode. Now, we see two new requests added to the top of the list:

Insomnia Requests Updated

Our DELETE /users/:id request (now using a path parameter rather than a query parameter to /users) is shown, followed by our PUT request for adding a new user. We can delete our old PATCH and DELETE requests.

We select and send the "Get all users" requests. The response is as follows:

Insomnia Get Users for API Specification

For the "Get User" request, we need to add a user id as a path parameter.

Insomnia Get User ID Param

It would be ideal if one of the values from our previous "Get all users" request automatically supplied that id value. This technique is called "[request chaining](https://docs.insomnia.rest/insomnia/chaining-requests)request chaining"—and Insomnia can do that!

For this request, we modify the URL. We remove the id and instead type ctrl (or cmd) + space. This brings up Insomnia's dialog for inserting a [template tag](https://support.insomnia.rest/article/171-template-tags)template tag. We choose "Response → Body Attribute" from the list of available options.

Insomnia Template Tag Response Body

We'll tell Insomnia that the value to use for id should be based on the response body from our recent request to "Get all users." In *that* response body, we want to get the id from the last object in the array (the last user).

Insomnia Edit Tag

Whenever we test our "Get user" request, the response to the "Get all users" request will automatically supply the id. When we send the "Get user" request, the response looks like this:

Insomnia Get User

We also create several more example requests so that we have all of the following:

  • - GET all users
  • - GET user (based on the id of the last user in the "Get all users" request)
  • - GET non-existing user (with an id that is not in the list)
  • - PUT (create) user, providing a valid name
  • - PUT (create) user, without providing a name
  • - DELETE user (based on the id of the last user in the "Get all users" request)
  • - DELETE non-existing user (with an id that is not in the list)

Insomnia Request List

Now that we've created all of our requests, we can sync them to our remote Git repository, too! They will always be available and can be updated as our API evolves.

### Automated Testing

While manually validating our API specification, you'll recall that we were sending cURL requests and manually evaluating the responses for expected behavior. You might be thinking that the requests we've just created are essentially the same thing, and they still require manual sending and evaluating the response.

This is where Insomnia's API "Test" mode comes in.

Insomnia Test Mode

In Test mode, we can create a suite of tests that send the requests in Debug mode and then assert expectations (using the [Chai Assertion Library](https://www.chaijs.com)Chai Assertion Library) on the responses to those requests. We start by clicking on "New Test Suite":

Then, we create tests for our suite. We click on "New Test" and give our first test a name.

For this test, we select our "Get all users" request. Then, we write the test code with our assertion:

We write another test, asserting that our "Get existing user" request also returns a 200. Then, we write a test to assert that "Get non-existing user" returns a 404 with a message.

When we click on **Run Tests**, all of our tests pass:

Just like with our requests, we can commit and push these tests to our repository, too. Other team members working in Insomnia and synced to this repository will have access to the same test suite. Once you have a fully built-out test suite, both API spec writers and API implementation engineers can use this centralized test suite to verify correct API behavior.

### As the API Specification and Implementation Evolve

The API spec document is the first piece to change when the API designer adds new endpoints or updates existing ones. This should happen in Insomnia, and you should push changes to the spec document to the repository. You should update requests and tests to reflect expected behavior—the behavior declared by the API specification. Those updated tests will likely fail, as the API implementation has yet to be updated. This is an excellent lead-in for test-driven development on the part of your API implementation team.

Perhaps the API implementation team deploys some changes to the API service. While this is not the ideal order of operations, a similar validation process can happen, but this time in reverse. In Insomnia, you would run the test suite and realize that tests that were once passing now fail. You would update your tests and requests to conform to the updated API implementation and update your API spec accordingly. Once again, everything is in sync.

[See what's new (and coming soon) with Insomnia >>](https://konghq.com/blog/insomnia-roadmap-2022)See what's new (and coming soon) with Insomnia >>

## Advanced Usage Examples

With Insomnia fully integrated into your API spec review workflow, you might consider taking advantage of two additional companion tools to level up your APIOps chops.

### Deploy to Portal

[Kong Konnect](https://konghq.com/kong-konnect)Kong Konnect is a service connectivity platform that allows your organization to publish a catalog of services for easy connection and consumption. Part of Konnect's offering includes the Developer Portal, which makes your APIs available for consumption by external developers.

If your organization uses [Kong Konnect Enterprise](https://konghq.com/contact-sales)Kong Konnect Enterprise, your API service can be deployed directly to the Developer Portal from within Insomnia. This further simplifies your APIOps tasks by consolidating review and deployment to a single, central tool.

### inso CLI

[inso](https://insomnia.rest/products/inso)inso is Insomnia as a CLI, and it can work with any repository synced with Insomnia. From the command line, inso lint spec can perform linting of the API specification and look for syntax/standard violations. The command, inso run test, will run the test suite that you created in Insomnia. With inso, you can perform API spec validation and testing as part of your [CI/CD pipeline](https://docs.insomnia.rest/inso-cli/continuous-integration)CI/CD pipeline.

## Conclusion

API spec review is essential. With today's shift toward microservices architecture and the broad adoption of building reusable APIs, there is no getting around the need for meticulous validation of API specs. However, *manual* review is no longer a feasible option. Manually validating API specifications is time-consuming and error-prone, and therefore is neither scalable nor trustworthy.

**If you have any questions, ask them in the Insomnia Community on **[**Slack**](https://chat.insomnia.rest)**Slack**** and **[**GitHub**](https://github.com/Kong/insomnia)**GitHub****.**

**Once you set up API specification review in Insomnia, you may find these other tutorials helpful:**

  • - [6 Ways to Leverage Insomnia as a gRPC Client](https://konghq.com/blog/insomnia-grpc)6 Ways to Leverage Insomnia as a gRPC Client
  • - [How to Leverage Insomnia as a GraphQL Client](https://konghq.com/blog/insomnia-graphql)How to Leverage Insomnia as a GraphQL Client
  • - Or try testing your Kong Gateway plugins in Insomnia with these tutorials: [Key Auth](https://konghq.com/blog/kong-gateway-key-authentication)Key Auth, [Rate Limiting](https://konghq.com/blog/kong-gateway-rate-limiting)Rate Limiting, [OAuth2](https://konghq.com/blog/kong-gateway-oauth2)OAuth2 and [JWT](https://konghq.com/blog/jwt-kong-gateway)JWT.

The faster and better approach to API spec review is an API design client like Insomnia. With syntax validation in real-time, the ability to build a fully automated test suite around real API requests and repository synchronization that brings versioning and collaboration, you'll likely never go back to manual API review ever again.

## Developer agility meets compliance and security. Discover how Kong can help you become an API-first company.

[Get a Demo](/contact-sales)Get a Demo[Start for Free](/products/kong-konnect/register)Start for Free
- [API Development](/blog/tag/api-development)API Development- [Insomnia](/blog/tag/insomnia)Insomnia

## More on this topic

_Videos_

## Native API Mocking in Insomnia

_Videos_

## How to Migrate Collections Into Insomnia

## See Kong in action

Accelerate deployments, reduce vulnerabilities, and gain real-time visibility. 

[Get a Demo](/contact-sales)Get a Demo
**Topics**
- [API Development](/blog/tag/api-development)API Development- [Insomnia](/blog/tag/insomnia)Insomnia
Viktor Gamov

Recommended posts

# Harnessing the Power of Insomnia Plugins

[Engineering](/blog)EngineeringFebruary 17, 2022

Insomnia is a fast and lightweight open source desktop application that doubles as a tool for API design and testing and as an API client for making HTTP requests. It has built-in support for REST Client , gRPC and GraphQL . All of that is just

Viktor Gamov
[](https://konghq.com/blog/engineering/insomnia-plugins)

# Building With Insomnia as a REST API Client

[Engineering](/blog)EngineeringDecember 8, 2021

As more companies invest in a cloud native infrastructure , they're choosing to prioritize their applications as microservices —architecting them into distinct servers. Each component is responsible for one (and only one) feature. For example, yo

Garen Torikian
[](https://konghq.com/blog/engineering/insomnia-rest)

# How to Leverage Insomnia as a GraphQL Client

[Engineering](/blog)EngineeringAugust 24, 2021

Here at Kong, we're advocates for architecting your application as a group of microservices . In this design style, individual services are responsible for handling one aspect of your application, and they communicate with other services within you

Garen Torikian
[](https://konghq.com/blog/engineering/insomnia-graphql)

# Migrating Your Collections and Requests from Postman to Insomnia

[Engineering](/blog)EngineeringApril 17, 2026

Local-first: your data stays with you: Insomnia stores everything on your machine by default. No forced cloud sync, no account needed just to send a request. This is helpful if privacy or working in a regulated environment is a priority for you Fre

Juhi Singh
[](https://konghq.com/blog/engineering/migrating-collections-and-requests-from-postman-to-insomnia)

# Can You Trust What You’re Shipping? You Will with Insomnia v12

[Product Releases](/blog)Product ReleasesOctober 13, 2025

AI Assist: Clean commits, transparent teams Building trust starts with small things, like making sure every commit tells the right story. That’s where Insomnia’s v12 AI Commit capability comes in.  Developers want to write code. It’s what they’re go

Haley Giuliano
[](https://konghq.com/blog/product-releases/trust-what-youre-shipping-with-insomnia-v12)

# Evaluating API Testing Tools: Insomnia vs Postman

[Enterprise](/blog)EnterpriseMarch 26, 2026

Free collaboration with Postman — a myth On March 1st, 2026, Postman discontinued free collaboration for small teams. Now , Git or Cloud-native collaboration requires a Team plan starting at $19 per person per month. That means even a 3-person team

Haley Giuliano
[](https://konghq.com/blog/enterprise/insomnia-vs-postman-evaluating-api-testing-tools)

# Kong Insomnia 12.4: Better Tabs, Clearer Commits, Smarter Admin

[Product Releases](/blog)Product ReleasesMarch 5, 2026

We've been all ears. Your workflows clearly told us what mattered most: tabs that adapt to how you actually work, Git commits you can actually understand, and admin controls that don't require a manual to navigate. Insomnia v12.4 discards the fricti

Haley Giuliano
[](https://konghq.com/blog/product-releases/insomnia-12-4)

## Ready to see Kong in action?

Get a personalized walkthrough of Kong's platform tailored to your architecture, use cases, and scale requirements.

[Get a Demo](/contact-sales)Get a Demo

## step-0

  • ## Company

    • [About Kong](/company/about-us)About Kong
    • [Customers](/customer-stories)Customers
    • [Careers](/company/careers)Careers
    • [Press](/company/press-room)Press
    • [Events](/events)Events
    • [Contact](/company/contact-us)Contact
    • [Pricing](/pricing)Pricing
      • Terms
      • Privacy
      • Trust and Compliance
  • ## Platform

    • [Kong AI Gateway](/products/kong-ai-gateway)Kong AI Gateway
    • [Kong Konnect](/products/kong-konnect)Kong Konnect
    • [Kong Gateway](/products/kong-gateway)Kong Gateway
    • [Kong Event Gateway](/products/event-gateway)Kong Event Gateway
    • [Kong Insomnia](/products/kong-insomnia)Kong Insomnia
    • [Documentation](https://developer.konghq.com)Documentation
    • [Book Demo](/contact-sales)Book Demo
  • ## Compare

    • [AI Gateway Alternatives](/performance-comparison/ai-gateway-alternatives)AI Gateway Alternatives
    • [Kong vs Apigee](/performance-comparison/kong-vs-apigee)Kong vs Apigee
    • [Kong vs IBM](/performance-comparison/ibm-api-connect-vs-kong)Kong vs IBM
    • [Kong vs Postman](/performance-comparison/kong-vs-postman)Kong vs Postman
    • [Kong vs Mulesoft](/performance-comparison/kong-vs-mulesoft)Kong vs Mulesoft
  • ## Explore More

    • [Open Banking API Solutions](/solutions/open-banking)Open Banking API Solutions
    • [API Governance Solutions](/solutions/api-governance)API Governance Solutions
    • [Istio API Gateway Integration](/solutions/istio-gateway)Istio API Gateway Integration
    • [Kubernetes API Management](/solutions/build-on-kubernetes)Kubernetes API Management
    • [API Gateway: Build vs Buy](/campaign/secure-api-scalability)API Gateway: Build vs Buy
    • [Kong vs Apigee](/performance-comparison/kong-vs-apigee)Kong vs Apigee
  • ## Open Source

    • [Kong Gateway](https://developer.konghq.com/gateway/install/)Kong Gateway
    • [Kuma](https://kuma.io/)Kuma
    • [Insomnia](https://insomnia.rest/)Insomnia
    • [Kong Community](/community)Kong Community

Kong enables the connectivity layer for the agentic era – securely connecting, governing, and monetizing APIs and AI tokens across any model or cloud.

  • English
  • Japanese
  • Frenchcoming soon
  • Spanishcoming soon
  • Germancoming soon
© Kong Inc. 2026
Interaction mode