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:
Prefer GET `/collections/{collectionId}` and read `uid`, or
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
| Name | Required | Description | Default |
|---|---|---|---|
| workspace | Yes | The workspace's ID. | |
| mock | No |