***

title: Simulate your API in Postman with a mock server
approved: 2025-05-27T00:00:00.000Z
topictype: concept
max-toc-depth: 2
ux: v12
-------

Use a *mock server* to simulate a server for your API requests without having to configure one. You can use any HTTP collection to set up a mock server. When you send a request, Postman returns a real-world response using data from your collection.

## Get started with mock servers in Postman

To set up a mock server you can [create a new one](/docs/design-apis/mock-apis/set-up-mock-servers/#create-a-mock-server), create one from an [existing collection](/docs/design-apis/mock-apis/set-up-mock-servers/#create-a-mock-server), or build one from your [request history](/docs/design-apis/mock-apis/set-up-mock-servers/#create-a-mock-server-from-history).

After setting up your mock server, you can then [make calls](/docs/design-apis/mock-apis/mock-server-calls/) to it from Postman or from a client application. The mock server simulates your API's behavior, so you can test your API or develop new functionality before your API is production ready.

<Info class="iconless-callout">
  If needed, the mock server can [generate dynamic responses](/docs/design-apis/mock-apis/create-dynamic-responses/) using variables and templates to better simulate real-world behavior.
</Info>

## Level up with step-by-step guides

If you need more help setting up a mock server, follow the step-by-step guide to [mock your API using saved response examples](/docs/design-apis/mock-apis/tutorials/mock-with-examples/). You'll learn how to add requests and examples to your collection, then use the collection to configure and use a mock server.

If you want to automate your mock servers, follow the step-by-step guide to [set up mock servers using the Postman API](/docs/design-apis/mock-apis/tutorials/mock-with-api/). You'll learn how to use the Postman API to mock a collection and get the mock server URL.

## Learn how Postman mock servers work

When you send a request to a mock server, Postman uses an algorithm to choose the saved example that best matches the request. The mock server then returns a response using the data in the saved example.

[Dive deeper into the matching algorithm](/docs/design-apis/mock-apis/matching-algorithm/) and learn how to create examples so you always get the responses you expect from the mock server.
