Create Collection on API level

I am able to create a collection with the postman public API using the following endpoint:

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

In the Postman UI, there is the possibility to create a new collection for an API:


How can I accomplish this using the Postman API?
I would imagine that there is supposed to be an endpoint like

POST https://api.getpostman.com/api/{{apiId}}/collections

Thanks

Max

Hey @wilde-it-partenfelde :wave:

I mentioned this in the SO post you created but I think this is what you’re looking for:

https://www.postman.com/postman/workspace/postman-public-workspace/request/12959542-aab6039a-c565-4c18-b94c-b80381e303ca

Hi @danny-dainton,
Thanks for your reply!
Unfortunately, the request is labeled as “deprecated”…
How would I attach a collection to an API? Is that handled with /relations ?
Thanks