Add a collection
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
apiId
The API's ID.
Headers
Accept
The application/vnd.api.v10+json request header required to use the endpoint.
Allowed values:
Request
This endpoint expects an object.
Copy Collection to API
OR
Create API Collection
OR
Generate from Schema
Response
Created
id
The collection's ID.
Errors
400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
500
Internal Server Error