Logo
15_Days_of_Postman_-_for_testers_IvanKo API Documentation

Add a collection

POST {{baseUrl}}/apis/{{apiId}}/collections

Adds a collection to an API. To do this, use the following operationType values:

  • COPY_COLLECTION — Copies a collection from the workspace and adds it to an API.
  • CREATE_NEW — Creates a new collection by providing the new collection's content.
  • GENERATE_FROM_SCHEMA — Generates the collection from an API schema.

For examples of each method, see the collection's response examples.

 

Body PARAM

Key Datatype Required Description 



HEADERS

Key Datatype Required Description 
Accept
string




RESPONSES

status Created

{ "id": "12ece9e1-2abf-4edc-8e34-de66e74114d2" }



Curl
curl -X POST 'https://api.getpostman.com/apis/apiId/collections' -H 'Accept: application/vnd.api.v10+json' -d '{"operationType":"operationType"}'

ENDPOINTS