Logo
30-day challenge API Documentation

Collections

Number of APIs: 7


1. Create a collection

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

Creates a collection using the [Qodex Collection v2 schema format] Include a collection object in the request body that contains the following required properties:

  • info — An object that contains the following properties:
    • name — A string value that contains the collection's name.
    • schema — A string that contains a URL to the collection's schema. For example, the https://schema.getQodex.com/collection/v1 URL.
  • item — An object that contains the HTTP request and response information.
    • request — An object that contains the collection's request information. For a complete list of values, refer to the definitions.request entry in the [collection.json schema file] If you pass an empty object for this value, the system defaults to an untitled GET request.

Note:

  • For a complete list of available property values for this endpoint, use the following references available in the [collection.json schema file]
    • info object — Use the definitions.info entry.
    • item object — Use the definitions.items entry.
  • For all other possible values, refer to the [collection.json schema file]



2. Create a fork

POST https://api.getpostman.com/collections/fork/{{collectionId}}?workspace={{workspaceId}}

Creates a [fork] from an existing collection into a workspace. Include the following required request body properties:

  • label — The fork's label.



3. Get a collection

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

Gets information about a collection. For a complete list of this endpoint's possible values, use the [collection.json schema file]



4. Delete a collection

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

Deletes a collection.



5. Update a collection

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

Updates a collection using the [Qodex Collection v2 schema format] Include a collection object in the request body that contains the following required properties:

  • info — An object that contains the following properties:
    • name — A string value that contains the collection's name.
    • schema — A string that contains a URL to the collection's schema. For example, the https://schema.getQodex.com/collection/v1 URL.
  • item — An object that contains the HTTP request and response information.
    • request — An object that contains the collection's request information. For a complete list of values, refer to the definitions.request entry in the [collection.json schema file] If you pass an empty object for this value, the system defaults to an untitled GET request.

Note:

  • For a complete list of available property values for this endpoint, use the following references available in the [collection.json schema file]
    • info object — Use the definitions.info entry.
    • item object — Use the definitions.items entry.
  • For all other possible values, refer to the [collection.json schema file]

Important

Use caution when using this endpoint. The system will replace the existing collection with the values passed in the request body.



6. Merge a fork

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

Merges a forked collection back into its destination collection. Include the following required properties in the request body:

  • source — The forked collection's ID.
  • destination — The destination collection's ID.

You can also include the following optional properties in the request body:

  • strategy — The fork's merge strategy. One of:
    • deleteSource — The system deletes the forked collection after a successful merge into the destination collection.
    • updateSourceWithDestinationDefault. The system only merges the forked collection into the destination collection.



7. Get all collections

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

Gets all of your collections. The response includes all of your subscribed collections.



ENDPOINTS