Skip to main content
Glama

createMock

Generate mock servers for API testing by configuring collections and environments in Postman workspaces to simulate API responses during development.

Instructions

Creates a mock server in a collection.

  • Pass the collection UID (ownerId-collectionId), not the bare collection ID.

  • If you only have a `collectionId`, resolve the UID first:

    1. Prefer GET `/collections/{collectionId}` and read `uid`, or

    2. Construct `{ownerId}-{collectionId}` using ownerId from GET `/me`:

    • For team-owned collections: `ownerId = me.teamId`

    • For personal collections: `ownerId = me.user.id`

  • Use the `workspace` query to place the mock in a specific workspace. Prefer explicit workspace scoping.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspaceYesThe workspace's ID.
mockNo

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/postmanlabs/postman-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server