The Postman API allows you to programmatically access data stored in Postman account with ease.
The easiest way to get started with the API is to click the fork button to fork this collection to your own workspace and use Postman to send requests.
You need a valid API Key to send requests to the API endpoints. You can get your key from the integrations dashboard.
The API has an access rate limit applied to it.
The Postman API will only respond to secured communication done over HTTPS. HTTP requests will be sent a 301
redirect to corresponding HTTPS resources.
Response to every request is sent in JSON format. In case the API request results in an error, it is represented by an "error": {}
key in the JSON response.
The request method (verb) determines the nature of action you intend to perform. A request made using the GET
method implies that you want to fetch something from Postman, and POST
implies you want to save something new to Postman.
The API calls will respond with appropriate HTTP status codes for all requests. Within Postman Client, when a response is received, the status code is highlighted and is accompanied by a help text that indicates the possible meaning of the response code. A 200 OK
indicates all went well, while 4XX
or 5XX
response codes indicate an error from the requesting client or our API servers respectively.
Individual resources in your Postman Account is accessible using its unique id (uid
). The uid
is a simple concatenation of the resource owner’s user-id and the resource-id. For example, a collection’s uid
is {{owner_id}}-{{collection_id}}
.
An API Key is required to be sent as part of every request to the Postman API, in the form of an X-Api-Key
request header.
If you do not have an API Key, you can easily generate one by heading over to the Postman Integrations Dashboard.
An API Key tells our API server that the request it received came from you. Everything that you have access to in Postman is accessible with an API Key that is generated by you.
For ease of use inside Postman, you could store your API key in an environment variable called postman_api_key
and this Collection will automatically use it to make API calls.
If an API Key is missing, malformed, or invalid, you will receive a 401 Unauthorised
response code and the following JSON response:
{
"error": {
"name": "AuthenticationError",
"message": "API Key missing. Every request requires an API Key to be sent."
}
}
Every request that accepts API Key as X-Api-Key
request header, also accepts the key when sent as apikey
URL query parameter.
API key sent as part of the header has a higher priority in case you send the key using both request header and query parameter.
API access rate limits are applied at a per-key basis in unit time. Access to the API using a key is limited to 60 requests per minute. In addition, every API response is accompanied by the following set of headers to identify the status of your consumption.
Header | Description |
---|---|
X-RateLimit-Limit | The maximum number of requests that the consumer is permitted to make per minute. |
X-RateLimit-Remaining | The number of requests remaining in the current rate limit window. |
X-RateLimit-Reset | The time at which the current rate limit window resets in UTC epoch seconds. |
Once you hit the rate limit, you will receive a response similar to the following JSON, with a status code of 429 Too Many Requests
.
{
"error": {
"name": "rateLimitError",
"message": "Rate Limit exceeded. Please retry at 1465452702843"
}
}
For help regarding accessing the Postman API, feel free to discuss it in our Discourse Community. You can also drop in a line at help@getpostman.com.
In the event you receive a 503
response from our servers, it implies that we have hit an unexpected spike in API access traffic and would usually be operational within the next 5 minutes. If the outage persists, or your receive any other form of 5XX
error, kindly let us know.
For information on API terms of use and privacy, refer to our terms at http://postman.com/legal/terms/ and our privacy policy at https://www.postman.com/legal/privacy-policy/.
Use this page to mock Postman API in your testing and development.
Run our mock API sample using the open source WireMock library, or in the free edition of WireMock Cloud. You'll have a working API server simulating the behavior of Postman API, which will allow you to keep building and testing even if the actual API you isn't currently available.