Add a collection

Deprecated
View as Markdown
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. - `options` — An object that contains advanced creation options and their values. You can find a complete list of properties and their values in Postman's [OpenAPI to Postman Collection Converter OPTIONS documentation](https://github.com/postmanlabs/openapi-to-postman/blob/develop/OPTIONS.md). These properties are case-sensitive.

Authentication

x-api-keystring
API Key authentication via header
OR
Authorizationstring
A valid [SCIM API key](https://learning.postman.com/docs/administration/scim-provisioning/scim-provisioning-overview/#generating-scim-api-key) for calls to SCIM endpoints.
OR
AuthorizationBasic

Basic authentication of the form Basic <base64(username:password)>.

Path parameters

apiIdstringRequired
The API's ID.

Headers

AcceptenumRequired

The application/vnd.api.v10+json request header required to use the endpoint.

Allowed values:

Request

This endpoint expects an object.
Copy Collection to APIobjectRequired
OR
Create API CollectionobjectRequired
OR
Generate from SchemaobjectRequired

Response

Created
idstring
The collection's ID.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
500
Internal Server Error