Insomnia logo
  • Documentation
  • Download
  • Upgrade
    • Introduction to Insomnia
    • Install Insomnia
    • Send Your First Request
    • Import and Export Data
    • Environment Variables
    • Insomnia Workspaces
    • Insomnia Accounts
    • Forgotten Passwords
    • Change Password
    • Insomnia Teams
    • Insomnia Subscriptions
    • Insomnia Subscription Management
    • Requests
    • Responses
    • Request Collections
    • Request Timeouts
    • Chaining Requests
    • Post CSV Data
    • SOAP Requests
    • gRPC
    • WebSocket Support
    • Get Started with Documents
    • Design Documents
    • Linting
    • GraphQL for OpenAPI
    • Migrate from Designer
    • Unit Testing
    • Stress Testing
    • Sign into Insomnia Cloud
    • Sync Collections with Insomnia Cloud
    • Teams
    • End to End Data Encryption
    • Sync with Git
    • Key Security Features
    • Security Standards
    • Signup and Authentication
    • Analytics Collected
    • Authentication
    • Client Certificates
    • Generate Code Snippet
    • Cookie Management
    • Encoding
    • GraphQL Queries
    • Run in Insomnia Button
    • Key Maps
    • HTTP(S) Proxy
    • Insomnia Configuration File
    • Introduction to Plugins
    • Context Object Reference
    • Template Tags
    • Hooks and Actions
    • Custom Themes
    • FAQ
    • Application Data
    • SSL Validation
    • Password Recovery
    • Introduction to Inso CLI
    • Install Inso CLI
    • CLI Command Reference
      • inso generate config
      • inso run test
      • inso lint spec
      • inso export spec
      • inso script
      • OpenAPI Spec Reference
    • Configuration
    • Inso CLI on Docker
    • Continuous Integration
    • Publish API to Dev Portal
    • Kong Declarative Config (for decK)
    • Kong for Kubernetes

Send Your First Request

Insomnia is an API client that enables you to send API requests outside of your terminal, and without writing any code. This means you don’t have to write any finicky cURL requests or backend code to quickly retrieve information, push content to a database, and do anything else a given API enables you to do.

In this guide, we’ll talk specifically about HTTP requests. This will give us common ground to send off a first request together. If you want to learn to send gRPC and GraphQL requests, see our more comprehensive Requests documentation.

  • API Request Basics
  • Send a Request to mockbin
  • Send a Request to Insomnia Website

API Request Basics

Here’s some common terminology that’ll help you navigate the world of APIs:

  • Request: A structured attempt to communicate with an API.
  • Endpoint: A request-able URL. For example, I could have an API with the base URL petstore.com with the endpoint /inventory. If I make a request to petstore.com/inventory, I’ll get back a list of the pet store’s product inventory.

An API request is composed of discrete elements that let you interact with an API. Some common elements you may need are:

  • URL: The address where the API is hosted.
  • Request type: In the HTTP protocol, common request types include the following:
    • GET: returns information from an API.
    • POST: sends data you’ve entered, and returns a confirmation that the data you sent was received.
    • PATCH and PUT: sends data that modifies a record that an API has access to.
    • DELETE: deletes a record that an API has access to.
  • Authentication: The credentials required to access API endpoints. Not all APIs require authentication, and there are a lot of different types of authentication. Learn more about Authentication.

Send a Request to mockbin

We’re going to use mockbin to test out a GET request. mockbin is a free tool offered by Kong (the makers of Insomnia) that enables you to create mock endpoints so you can easily test out API functionality without having to set up a server.

  1. Go to mockbin.
  2. Click Create Bin. You’ll be taken to the Bin Builder.
  3. Add some text in the Body input.

    Enter text in the body. Enter body text. This text will be returned when you make a GET request to this endpoint.

  4. Click Create Bin. You’ll see a new page with a Bin Identifier.
  5. Click Visit in Browser and see your inputted Body text. The URL for this text is where we’re going to send our request. Now let’s do it through your Insomnia app.
  6. From your Insomnia dashboard, create a new Document or Collection.
  7. In a Document, select the Debug tab, then New Request. In a Collection, select New Request.
  8. In the New Request modal:
    1. Enter a request name like Return mockbin message.
    2. Select a GET method from the dropdown.
    3. Click Create.
  9. Enter your mockbin URL in the request URL input.
  10. Click Send.

    Your mockbin message should appear in the Preview panel. Once you’ve clicked Send on your request, you should see your mockbin message in the right-side Preview panel. Note that this screenshot shows a Document (not a Collection).

Congrats! You’ve now used Insomnia to send your first request to mockbin. For more complex request options, see our Request documentation.

Send a Request to Insomnia Website

In this section, we’re going to send a GET request to the Insomnia website. Feel free to interchange the Insomnia website URL with any web URL you’d like to return in the Preview panel.

  1. From your Insomnia dashboard, create a new Document or Collection.
  2. In a Document, select the Debug tab, then New Request. In a Collection, select New Request.
  3. In the New Request modal:
    1. Enter a request name like Return Insomnia website.
    2. Select a GET method from the dropdown.
    3. Click Create.
  4. Enter insomnia.rest in the request URL input.
  5. Click Send.

    The Insomnia site should appear in the Preview right side panel. Once you’ve clicked Send on your request, you should see the Insomnia website in the right-side Preview panel. Note that this screenshot shows a Document (not a Collection).

Congrats! You’ve now used Insomnia to send your first request to the Insomnia website. For more complex request options, see our Request documentation.

Edit this page
Report an issue
    COMPANY
  • Insomnia
  • Blog
  • Changelog
  • Pricing
  • Careers
    PRODUCTS
  • Insomnia
  • Inso (CLI)
    RESOURCES
  • Sign In
  • Documentation
  • Support
    LEGAL
  • Privacy Policy
  • Terms & Conditions
© Kong Inc. 2021