Number of APIs: 7
1. Publish Mock
POST https://api.getpostman.com/mocks/{{mock_uid}}/publish
This endpoint publishes the mock you have created using its Requires API Key as uid
X-Api-Key
request header or apikey
URL query parameter.
DELETE https://api.getpostman.com/mocks/{{mock_uid}}/unpublish
This endpoint unpublishes the mock you have created using its Requires API Key as uid
X-Api-Key
request header or apikey
URL query parameter.
3. Update Mock
PUT https://api.getpostman.com/mocks/{{mock_uid}}
This endpoint allows you to update a mock you have created using its Requires API Key as uid
. The endpoint allows you to edit fields,
* name
* environment
* description
* private
* versionTag
X-Api-Key
request header or apikey
URL query parameter.
4. Delete Mock
DELETE https://api.getpostman.com/mocks/{{mock_uid}}
This endpoint allows you to delete an existing mock using its Requires API Key as uid
.
X-Api-Key
request header or apikey
URL query parameter.
5. All Mocks
GET https://api.getpostman.com/mocks
This endpoint fetches all the mocks that you have created. Requires API Key as
X-Api-Key
request header or apikey
URL query parameter.
6. Single Mock
GET https://api.getpostman.com/mocks/{{mock_uid}}
This endpoint fetches you the basic information about a single mock using its Requires API Key as uid
.
X-Api-Key
request header or apikey
URL query parameter.
7. Create Mock
POST https://api.getpostman.com/mocks
This endpoint allows you to create a mock on a collection. You can also provide an environment UID to resolve any environment variables in the collection. You can also specify the context of a workspace to create a mock in directly by passing the Requires API Key as workspace
as a query param.
X-Api-Key
request header or apikey
URL query parameter.
ENDPOINTS