> This page is for Postman Docs, version Latest (v12) (default).
> For other versions, use one of these documentation indexes:
> - Latest (v12) (default): https://learning.postman.com/latest-v-12/llms.txt
> - v11: https://learning.postman.com/v11/llms.txt

> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://learning.postman.com/llms.txt.

# Create a Postman mock server from a mock or a collection

> A mock server is an always-available hosted stand-in for an API. Create one from a code mock or from a collection, then call it from anywhere.

A *mock server* is a hosted, always-available stand-in for an API, deployed to the Postman Cloud at a stable URL. Once deployed, anyone with access can send requests to it at any time, so your teammates, your tests, and your CI pipelines can develop against it without a real backend.

You can create a mock server two ways:

* **From a [mock](/docs/design-apis/mock-apis/mocks/overview)** — Deploy your code-based mock so its JavaScript request handlers run in the Postman Cloud. Private by default, with per-session state.
* **From a collection** — Serve the saved examples in a collection, matched to each incoming request. Create one from an existing collection or from your request history.

To serve several mocks behind one address, deploy a [simulation](/docs/design-apis/simulate-conditions/overview), which hosts a group of mocks together as a single mock server.

To view your mock servers, click the ![Services icon](https://assets.postman.com/postman-docs/aether-icons/v12/descriptive-services-stroke.svg#icon) **Services** tab in the sidebar, then expand **Mock Servers**.

> **Info**
>
> [Super Admins and Admins](/docs/administration/roles-and-permissions/#team-roles) can control whether users can create public mock servers. To learn more, see [Manage mock servers](/docs/administration/managing-your-team/manage-team-workspaces/#manage-mock-servers).

## Create a mock server from a mock \[#create-a-mock-server-from-a-mock]

Deploy a code [mock](/docs/design-apis/mock-apis/mocks/overview) so its request handlers run in the Postman Cloud, always available at a hosted URL. The server is private by default, keeps per-session state, and can redeploy automatically when the mock changes.

Learn more at [Create a mock server from a mock](/docs/design-apis/mock-apis/mock-servers/from-a-mock).

## Create a mock server from a collection \[#create-a-mock-server-from-a-collection]

Create a mock server from the saved examples in a collection. When you send a request, Postman uses a [matching algorithm](/docs/design-apis/mock-apis/mock-servers/matching-algorithm) to return the closest example, and can [generate dynamic responses](/docs/design-apis/mock-apis/mock-servers/generate-dynamic-responses) with variables and templates.

Learn more at [Create a mock server from a collection](/docs/design-apis/mock-apis/mock-servers/from-a-collection).