Logo
30 Days of Postman API Documentation

Postman API

Number of APIs: 57


1. Collections - All Collections

GET https://api.getpostman.com/collections

The /collections endpoint returns a list of all collections that are accessible by you. The list includes your own collections and the collections that you have subscribed to.

The response contains an array of collection information containing the name, id, owner and uid of each collection.

Requires API Key as X-Api-Key request header or apikey URL query parameter.



2. Collections - Single Collection

GET https://api.getpostman.com/collections/{{collection_uid}}

Access the contents of a collection that is accessible to you using its unique id (uid).

Requires API Key as X-Api-Key request header or apikey URL query parameter.



3. Collections - Create Collection

POST https://api.getpostman.com/collections

This endpoint allows you to create collections using the Qodex Collection v2 format. For more information about the v2 schema, check the format here.

On successful creation of the collection, the response returns the collection name, id and the uid.

You can also specify the context of a workspace to create a collection in directly by passing the workspace as a query param.

Requires API Key as X-Api-Key request header or apikey URL query parameter.



4. Collections - Update Collection

PUT https://api.getpostman.com/collections/{{collection_uid}}

This endpoint allows you to update an existing collection using the Qodex Collection v2 format. For more information about the v2 schema, check the format here.

On successful updation of the collection, the response returns the collection name, id and uid.

Requires API Key as X-Api-Key request header or apikey URL query parameter.

Note: Please be careful when trying to update the collection, as the existing collection will be replaced by the request body.



5. Collections - Delete Collection

DELETE https://api.getpostman.com/collections/{{collection_uid}}

This endpoint allows you to delete an existing collection.

On successful deletion of the collection, the response returns the id and uid.

Requires API Key as X-Api-Key request header or apikey URL query parameter.



6. Collections - Create a Fork

POST https://api.getpostman.com/collections/fork/{{collection_uid}}?workspace={{workspace_id}}

This endpoint allows you to create a fork from an existing collection.

On successful creation of the collection, the response returns the collection name, id, uid along with fork information.

You can also specify the context of a workspace to fork a collection in by passing the workspace as a query param.

Requires API Key as X-Api-Key request header or apikey URL query parameter.



7. Collections - Merge a Fork

POST https://api.getpostman.com/collections/merge

This endpoint allows you to merge a forked collection back to its destination collection.

On successful creation of the collection, the response returns the collection name, id and uid.

You need to specify the fork UID (as source) and destination collection UID (as destination) in the request body.

Optionally, you can also specify the merge strategy as either deleteSource or updateSourceWithDestination. Following is an explanation of the merge strategies

Merge Strategy Behaviour
deleteSource Forked collection is deleted after merging
updateSourceWithDestination Forked collection is up to date with changes in destination collection

If the collections cannot be merged (due to conflicts), appropriate error messages will be returned.

Requires API Key as X-Api-Key request header or apikey URL query parameter.



8. Environments - All Environments

GET https://api.getpostman.com/environments

The /environments endpoint returns a list of all environments that belong to you..

The response contains an array of environments' information containing the name, id, owner and uid of each environment.

Requires API Key as X-Api-Key request header or apikey URL query parameter.



9. Environments - Single Environment

GET https://api.getpostman.com/environments/{{environment_uid}}

Access the contents of an environment that is accessible to you using its unique id (uid).

Requires API Key as X-Api-Key request header or apikey URL query parameter.



10. Environments - Create Environment

POST https://api.getpostman.com/environments

A sample body is added to the request that conforms to the following JSON schema:

{
  "type": "object",
  "properties": {
    "environment": {
      "type": "object",
      "properties": {
        "name": {
              "type": "string",
              "maxLength": 254,
              "minLength": 1
            },
        "values": {
          "type": "array",
          "maxItems": 100,
          "additionalItems": false,
          "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "maxLength": 254
                  "minLength": 1
                },
                "value": { "type": "string" },
                "enabled": { "type": "boolean" }
              },
              "required": ["key", "value"]
            }
        }
      },
      "required": ["name"]
    }
  },
  "required": ["environment"]
}

On successful creation of the environment, the API returns the environment name and id.

You can also specify the context of a workspace to create an environment in directly by passing the workspace as a query param.

Requires API Key as X-Api-Key request header or apikey URL query parameter.



11. Environments - Update Environment

PUT https://api.getpostman.com/environments/{{environment_uid}}

This endpoint replaces an existing environment.

A sample body is added to the request that conforms to the following JSON schema:

{
    "type": "object",
    "properties": {
        "environment": {
            "type": "object",
            "properties": {
                "name": {
                    "type": "string",
                    "maxLength": 254,
                    "minLength": 1
                },
                "values": {
                    "type": "array",
                    "maxItems": 100,
                    "additionalItems": false,
                    "items": {
                        "type": "object",
                        "properties": {
                            "key": {
                                "type": "string",
                                "maxLength": 254,
                                "minLength": 1
                            },
                            "value": {
                                "type": "string",
                                "maxLength": 254,
                                "minLength": 1
                            },
                            "type": {
                                "type": "string"
                            },
                            "enabled": {
                                "type": "boolean"
                            }
                        },
                        "required": [
                            "key",
                            "value"
                        ]
                    }
                }
            }
        }
    },
    "required": [
        "environment"
    ]
}

On successful updation of the environment, the API returns the environment name and id.

Requires API Key as X-Api-Key request header or apikey URL query parameter.



12. Environments - Delete Environment

DELETE https://api.getpostman.com/environments/{{environment_uid}}

This endpoint allows you to delete a single environment based on an environment's unique uid.

Requires API Key as X-Api-Key request header or apikey URL query parameter.



13. Mocks - 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.



14. Mocks - Single Mock

GET https://api.getpostman.com/mocks/{{mock_uid}}

This endpoint fetches you the basic information about a single mock using its uid.

Requires API Key as X-Api-Key request header or apikey URL query parameter.



15. Mocks - 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 workspace as a query param.

Requires API Key as X-Api-Key request header or apikey URL query parameter.



16. Mocks - Update Mock

PUT https://api.getpostman.com/mocks/{{mock_uid}}

This endpoint allows you to update a mock you have created using its uid. The endpoint allows you to edit fields, * name * environment * description * private * versionTag

Requires API Key as X-Api-Key request header or apikey URL query parameter.



17. Mocks - Delete Mock

DELETE https://api.getpostman.com/mocks/{{mock_uid}}

This endpoint allows you to delete an existing mock using its uid.

Requires API Key as X-Api-Key request header or apikey URL query parameter.



18. Mocks - Publish Mock

POST https://api.getpostman.com/mocks/{{mock_uid}}/publish

This endpoint publishes the mock you have created using its uid

Requires API Key as X-Api-Key request header or apikey URL query parameter.



19. Mocks - Unpublish Mock

DELETE https://api.getpostman.com/mocks/{{mock_uid}}/unpublish

This endpoint unpublishes the mock you have created using its uid

Requires API Key as X-Api-Key request header or apikey URL query parameter.



20. Monitors - All Monitors

GET https://api.getpostman.com/monitors

The /monitors endpoint returns a list of all monitors that are accessible by you.

The response contains an array of monitors information containing the name, id, owner and uid of each monitor.

Requires API Key as X-Api-Key request header or apikey URL query parameter.



21. Monitors - Single Monitor

GET https://api.getpostman.com/monitors/{{monitor_uid}}

This endpoint fetches you basic information about the monitor using its uid.

Requires API Key as X-Api-Key request header or apikey URL query parameter.



22. Monitors - Create Monitor

POST https://api.getpostman.com/monitors

This endpoint allows you to create a monitor.

Some sample cron values are:

Frequency Cron Pattern
Every 5 minutes */5 * * * *
Every 30 minutes */30 * * * *
Every Hour 0 */1 * * *
Every 6 Hours 0 */6 * * *
Every day at 5pm 0 17 * * *
Every Monday at 12pm 0 12 * * MON
Every weekday (Monday - Friday) at 6am 0 6 * * MON-FRI

Note: Currently, you can only create monitors at some limited schedules. You can head to Qodex Monitors to see the allowed schedules.

For more information about the format of the timezone value, check this list of time zones.

You can also specify the context of a workspace to create a monitor in directly by passing the workspace as a query param.

Requires API Key as X-Api-Key request header or apikey URL query parameter.



23. Monitors - Update Monitor

PUT https://api.getpostman.com/monitors/{{monitor_uid}}

This endpoint allows you to update a monitor using its uid. Only the monitor name and its schedule can be updated.

Some example cron values are:

Frequency Cron Pattern
Every 5 minutes */5 * * * *
Every 30 minutes */30 * * * *
Every Hour 0 */1 * * *
Every 6 Hours 0 */6 * * *
Every day at 5pm 0 17 * * *
Every Monday at 12pm 0 12 * * MON
Every weekday (Monday - Friday) at 6am 0 6 * * MON-FRI

Note: Currently, you can only create monitors at some limited schedules. You can head to Qodex Monitors to see the allowed schedules.

For more information about the format of the timezone value, check this list of time zones.

Requires API Key as X-Api-Key request header or apikey URL query parameter.



24. Monitors - Delete Monitor

DELETE https://api.getpostman.com/monitors/{{monitor_uid}}

This endpoint can be used to delete an existing monitor using its uid.

Requires API Key as X-Api-Key request header or apikey URL query parameter.



25. Monitors - Run a Monitor

POST https://api.getpostman.com/monitors/{{monitor_uid}}/run

This endpoint will run the monitor instantly and wait for the monitor to run completely. It responds with the run results.

Requires API Key as X-Api-Key request header or apikey URL query parameter.



26. Workspaces - All workspaces

GET https://api.getpostman.com/workspaces

The /workspaces endpoint returns a list of all workspaces that is accessible by you. The list includes your own workspaces and the workspaces that you have access to.

The response contains an array of collection information containing the name, id, and type of each workspace.

Requires API Key as X-Api-Key request header or apikey URL query parameter.



27. Workspaces - Single workspace

GET https://api.getpostman.com/workspaces/{{workspace_id}}

Access the contents of a workspace that is accessible to you using its id (id). Includes the collections, environments, mocks and monitors of that workspace.

Requires API Key as X-Api-Key request header or apikey URL query parameter.



28. Workspaces - Create Workspace

POST https://api.getpostman.com/workspaces

This endpoint allows you to create a workspace and populate it with entities like collections, environments, mocks and monitors using their uid.

On successful creation of the workspace, the response returns the workspcae name and id.

Requires API Key as X-Api-Key request header or apikey URL query parameter.



29. Workspaces - Update Workspace

PUT https://api.getpostman.com/workspaces/{{workspace_id}}

This endpoint allows you to update a workspace and update it's association to entities like collections, environments, mocks and monitors using their uid.

On successful updation of the workspace, the response returns the workspcae name and id.

Requires API Key as X-Api-Key request header or apikey URL query parameter.

Note : The endpoint expects you to send the desired state of the workspace in terms of the associated entities so be careful when trying to update these entities.

For eg. if your workspace has collections A and B, and in the update call, you send C's uid in the collections array, then A and B would be removed from the workspace and C would be added.



30. Workspaces - Delete Workspace

DELETE https://api.getpostman.com/workspaces/{{workspace_id}}

This endpoint allows you to delete an existing workspace.

On successful deletion of the workspace, the response returns the id.

Requires API Key as X-Api-Key request header or apikey URL query parameter.



31. User - API Key Owner

GET https://api.getpostman.com/me

the /me Qodex API endpoint lets you access information about the authenticated user. You can retrieve the authenticated user's username, full name, e-mail address, and any other available information.

Requires API Key as X-Api-Key request header or apikey URL query parameter.



32. Import - Import external API specification

POST https://api.getpostman.com/import/openapi

This endpoint allows you to import external API specifications into Qodex.

Currently, this endpoint only supports the OpenAPI specification, for which the importType will be openapi.

On a successful import, the response will be an array with each element contaning id, name and uid of entities created.

Supported types:

  • string
  • json
  • file

The input parameter should be defined based on the type.

To import a file, request body must be form-data with type param set to file.

Note: Refer to examples for different scenarios.

Requires API Key as X-Api-Key request header.



33. Import - Import exported data

POST https://api.getpostman.com/import/exported

This endpoint allows you to import your exported Qodex data. For more information about how you can export your data, refer Export your Qodex data.

On successful imports, the response will be an array with Each element contaning id, name and uid of entities created.

Note: Refer to examples for different scenarios.

Requires API Key as X-Api-Key request header.



34. API-API Version - Create API Version

POST https://api.getpostman.com/apis/{{apiId}}/versions

This call creates a new API version in the specified API.

Request body should contain a version object which should have fields:

name Required. Name of the API Version
source If specified, it will copy the contents of the specified api version to create a new api verison.
id Required. Id of the apiversion from where the details are to be copied
schema Boolean. If true then copies the schema from the specified api version
relations Object. {"<relationType>": true/false}. Allowed relation types are `mock`, `monitor`, `documentation`, `contracttest`, `integrationtest`, `testsuite`, `environment` Relation types which should be copied over to the new api verison

Response contains a version object with all the details related to the created API Version, namely, id, name, api.

Requires API Key as X-Api-Key request header or apikey URL query parameter.



35. API-API Version - Update an API Version

PUT https://api.getpostman.com/apis/{{apiId}}/versions/{{apiVersionId}}

This call updates an existing API Version.

Request body should contain a version object with the fields which need to be updated. Only field which can be updated is name.

Response contains a version object with all the details related to the created API Version, namely, id, name, api etc.

Requires API Key as X-Api-Key request header or apikey URL query parameter.



36. API-API Version - Delete an API Version

DELETE https://api.getpostman.com/apis/{{apiId}}/versions/{{apiVersionId}}

This call deletes an existing API Version having the specified id.

Response contains an version object with id of the API Version which was deleted.

Requires API Key as X-Api-Key request header or apikey URL query parameter.



37. API-API Version - Get an API Version

GET https://api.getpostman.com/apis/{{apiId}}/versions/{{apiVersionId}}

This call fetches details about the specified API Version.

The response will contain a version object which would contain all the details of the API Version.

Requires API Key as X-Api-Key request header or apikey URL query parameter.



38. API-API Version - Get All API Versions

GET https://api.getpostman.com/apis/{{apiId}}/versions

This call fetches details about the all the API Versions in the specified API.

The response will contain an array versions object which would be a list of all the API Version along with their details.

Requires API Key as X-Api-Key request header or apikey URL query parameter.



39. API-Schema - Create Schema

POST https://api.getpostman.com/apis/{{apiId}}/versions/{{apiVersionId}}/schemas

This call creates a new schema.

Request body should contain a schema object which should atleast have these properties with string values:

  • type: Allowed types are openapi3, openapi2, openapi1, raml and graphql.
  • language : Allowed languages are json and yaml for OpenAPI and RAML schema types. GraphQL schema type accepts only graphql language.
  • schema: Optional. If passed, must be the content of the schema as a string.

Response contains a schema object with all the details related to the created schema, namely, id, language, type etc.

Requires API Key as X-Api-Key request header or apikey URL query parameter.



40. API-Schema - Update Schema

PUT https://api.getpostman.com/apis/{{apiId}}/versions/{{apiVersionId}}/schemas/{{schemaId}}

This call updates an existing schema.

Request body should contain a schema object which should atleast have these properties with string values:

  • type: Allowed types are openapi3, openapi2, openapi1, raml and graphql.
  • language : Allowed languages are json and yaml for OpenAPI and RAML schema types. GraphQL schema type accepts only graphql language.
  • schema: Optional. If passed, must be the content of the schema as a string.

Response contains a schema object with all the details related to the created schema, namely, id, language, type etc.

Requires API Key as X-Api-Key request header or apikey URL query parameter.



41. API-Schema - Get Schema

GET https://api.getpostman.com/apis/{{apiId}}/versions/{{apiVersionId}}/schemas/{{schemaId}}

This call fetches a single schema having the specified id.

Response contains a schema object with all the details related to the schema, namely, id, language, type, schema etc.

Requires API Key as X-Api-Key request header or apikey URL query parameter.



42. API-Schema - Create collection from schema

POST https://api.getpostman.com/apis/{{apiId}}/versions/{{apiVersionId}}/schemas/{{schemaId}}/collections?workspace={{workspaceId}}

This call creates a collection and links it to an API as one or multiple relations.

Request body requires two keys: - name - Name of the collection to be created. - relations - A list of relation(s) to be created.

The allowed relation types are contracttest, integrationtest, testsuite, and documentation.

Requires API Key as X-Api-Key request header or apikey URL query parameter.



43. API-Relations - Get linked relations

GET https://api.getpostman.com/apis/{{apiId}}/versions/{{apiVersionId}}/relations

This call fetches all the relations which are linked to the specified API version along with their details.

The response will contain a relations object which lists all the relation types which are linked to the API version. Each of the relation type will be an object which details the relations of this type.

Requires API Key as X-Api-Key request header or apikey URL query parameter.



44. API-Relations - Get documentation relations

GET https://api.getpostman.com/apis/{{apiId}}/versions/{{apiVersionId}}/documentation

This call fetches all the relations by type which are linked to the specified API version along with their details.

The response will contain an array with key {{relationType}}. Each of the item will consist of all the details related each of the relation.

Requires API Key as X-Api-Key request header or apikey URL query parameter.



45. API-Relations - Get environment relations

GET https://api.getpostman.com/apis/{{apiId}}/versions/{{apiVersionId}}/environment

This call fetches all the relations by type which are linked to the specified API version along with their details.

The response will contain an array with key {{relationType}}. Each of the item will consist of all the details related each of the relation.

Requires API Key as X-Api-Key request header or apikey URL query parameter.



46. API-Relations - Get test suite relations

GET https://api.getpostman.com/apis/{{apiId}}/versions/{{apiVersionId}}/testsuite

This call fetches all the relations by type which are linked to the specified API version along with their details.

The response will contain an array with key {{relationType}}. Each of the item will consist of all the details related each of the relation.

Requires API Key as X-Api-Key request header or apikey URL query parameter.



47. API-Relations - Get contract test relations

GET https://api.getpostman.com/apis/{{apiId}}/versions/{{apiVersionId}}/contracttest

This call fetches all the relations by type which are linked to the specified API version along with their details.

The response will contain an array with key {{relationType}}. Each of the item will consist of all the details related each of the relation.

Requires API Key as X-Api-Key request header or apikey URL query parameter.



48. API-Relations - Get integration test relations

GET https://api.getpostman.com/apis/{{apiId}}/versions/{{apiVersionId}}/integrationtest

This call fetches all the relations by type which are linked to the specified API version along with their details.

The response will contain an array with key {{relationType}}. Each of the item will consist of all the details related each of the relation.

Requires API Key as X-Api-Key request header or apikey URL query parameter.



49. API-Relations - Get monitor relations

GET https://api.getpostman.com/apis/{{apiId}}/versions/{{apiVersionId}}/monitor

This call fetches all the relations by type which are linked to the specified API version along with their details.

The response will contain an array with key {{relationType}}. Each of the item will consist of all the details related each of the relation.

Requires API Key as X-Api-Key request header or apikey URL query parameter.



50. API-Relations - Create relations

POST https://api.getpostman.com/apis/{{apiId}}/versions/{{apiVersionId}}/relations

This call allows you to add existing Qodex entities as new relations to an API. The request body should contain the relations to be created along with an array of entity IDs.

Relation Entity ID type
contracttest Collection UIDs
integrationtest Collection UIDs
documentation Collection UIDs
testsuite Collection UIDs
environment Environment UIDs
mock Mock IDs
monitor Monitor IDs

Requires API Key as X-Api-Key request header or apikey URL query parameter.



51. API-Relations - Sync relations with schema

PUT https://api.getpostman.com/apis/:apiId/versions/:apiVersionId/:entityType/:entityId/syncWithSchema

This call allows you to keep the relation in sync with the API schema.

Requires API Key as X-Api-Key request header or apikey URL query parameter.



52. API - Create API

POST https://api.getpostman.com/apis?workspace={{workspaceId}}

This call creates a new API with a default API Version.

Request body should contain an api object which should atleast have a property name.

Response contains an api object with all the details related to the created API, namely, id, name, summary, description, etc.

Requires API Key as X-Api-Key request header or apikey URL query parameter.



53. API - Update an API

PUT https://api.getpostman.com/apis/{{apiId}}

This call updates an existing API .

Request body should contain an api object which should have the fields to be updated. Only name, summary and description fields can be edited for an API.

Response contains an api object with all the details related to the created API, namely, id, name, summary, description etc.

Requires API Key as X-Api-Key request header or apikey URL query parameter.



54. API - Delete an API

DELETE https://api.getpostman.com/apis/{{apiId}}

This call deletes an existing API having the specified id.

Response contains an api object with id of the API which was deleted.

Requires API Key as X-Api-Key request header or apikey URL query parameter.



55. API - Get all APIs

GET https://api.getpostman.com/apis

This call fetches all the APIs present in the specified workspace

Response contains an array named apis which would contain all the details of APIs present in the workspace.

Requires API Key as X-Api-Key request header or apikey URL query parameter.



56. API - Single API

GET https://api.getpostman.com/apis/{{apiId}}

This call fetches a single API having the specified id.

Response contains an api object with all the details related to the queried API, namely, id, name, summary, description etc.

Requires API Key as X-Api-Key request header or apikey URL query parameter.



57. Webhooks - Create Webhook

POST https://api.getpostman.com/webhooks?workspace={{workspace_id}}

Create a webhook that triggers a collection with your custom payload.

You can specify the webhook name and the collection to trigger by using the following attributes of the webhook object on your JSON body:

  • name: the name of the webhook that you're creating.
  • collection: the ID of the collection that you want to trigger once this webhook is called.

Once created, the webhook URL can be retrieved by accessing the webhookUrl attribute of the webhook object on the response JSON payload.



ENDPOINTS