Once you've created the mock, use the mock URL https://{{mockId}}.mock.pstmn.io/{{mockPath}}
, where:
- mockId is the id that you received upon creating the mock and can be retrieved using the GET All Mocks endpoint in the Postman Pro API.
- mockPath is the path of your request that you’d like to mock, for example
api/response.
You'll also need to specify your Pro API Key as a `apikey` query parameter in the URL, or an `X-API-Key` header. The mock server will pick a response based on:
- The optional `x-mock-response-code` header: If this is provided, the system will try to return an example response with the given status code
- HTTP Method
- Request path
Find out more about on our blog post about mock servers!