Mock API for Testing and Simplified Development (2020)

Discover how you can use mock APIs to simplify your testing, accelerate your development and much more.

Create a Simple Mock API ⚑

Use the form below to create a simple JSON API response. If you want more features such as multiple endpoints, custom headers, simulated failures and much more sign in to Mocki to start creating a fully fledged mock REST API.

Free API Editor

If you want to create a simple API for testing purposes, simply enter a response body below and press Create API to get your custom API URL.

mocki logo

Use Mocki to create a fully fledged mock API. Sign up for a 7-day free trial and get:

  • Multiple API endpoints
  • Monitoring dashboard
  • Simulated errors and delays
  • Generated test data
Sign Up (Free Trial)

What is a Mock API? πŸ€”

A mock API is a simulated clone of your API that responds in the exact same way as the real one. However the logic behind the API does not exist and it often responds with static data. A mock API might also be used to simulate errors from your API.

Why Use a Mock API? 🧐

There are many use cases for mock APIs. Read more about how you can utilize them to simplify development flows and improve the quality of your product.

Simulate Errors ⚠️

For some test cases we want to trigger different types of errors in the backend. To create the circumstances that are required to trigger an error in your real service might be complex. A mock API can simulate errors based on conditions that you set which is perfect when testing error scenarios in your front end or between services.

Remove Dependencies πŸ”“

If your backend team is lagging behind on API development it is possible to use a mock API instead. Mock APIs are typically quick to set up and let’s your front end team work independently of API development.

Avoid Incomplete Test Data πŸ’†β€β™€οΈ

If you are relying on an external service for fetching data you often face problems with test data. Using a mock API you can quickly set up a service that returns the exact data you need for your application.

Avoid Unstable External Services πŸ“‰

Test environments are not always top priority when it comes to stability. If the service you are integrating with is unstable or unavailable you can use a mock API instead to simulate the responses that you would get from the real service.

Simulate Instability 🌦️

Do you sometimes wonder how your app behaves when the backend service is unstable or slow? A mock API might give you the answer to that. Using Mocki you can easily simulate random errors and delayed responses. An app that is tested under these types of conditions is bound to have improved quality even when there are issues in your backend environment.

Create Proof of Concepts πŸ’‘

If you want to quickly try out a new API design a solution is to create a mock API. Instead of implementing the logic, routing and persistence layer you can simply create a simulated version of what you want to build and try it out end to end before you develop the real thing.

Load Testing πŸƒπŸΏβ€β™€οΈ

Want to know how your backend behaves when it’s external dependencies are unstable or down? Then go ahead and simulate your external services with error responses and delays. Don’t wait until it happens in production - find out before with mock APIs!