Archived topic — some details may be out of date.
Mock servers built from saved collection examples are still supported. Postman now also has code-based mocks: JavaScript request handlers plus aconfig.yaml, stored as files in your Git repository, which you can run locally or deploy. Create one in the app, or use the Postman CLI to generate one from an OpenAPI spec, collection or dataset (postman mock generate) and run it (postman mock run). See About mocks and Create a mock.
Working with an AI coding agent? The Postman plugin can build and run mocks for you.
For current help, see the Postman docs, try the free Postman tools (no account needed), or join us on Discord.
We’re just trying out postman. Someone else on the team has sent me a collection, so I can see his api documentation, and I’m trying to create a mock out of it so I can build against it.
The call is a simple GET {{ server }}/accounts/{{account_id}}. And it works fine if I use an integer as the account_id (I get the example back). When I use a hexidecimal string as the account_id I get a mockRequestNotFoundError.
How do I fix this - I’ve looked through the json for the collection and poked around the app looking for a way to specify the format of this parameter, but I can’t find anything.
How to I get my mock to accept a string path variable?