putCollection
Replace a Postman collection's contents with a new collection body in v2.1.0 schema. Include item IDs to preserve existing items; otherwise items are recreated. Supports async update with Prefer header.
Instructions
Replaces the contents of a collection using the Postman Collection v2.1.0 schema format. Include the collection's ID values in the request body. If you do not, the endpoint removes the existing items and creates new items.
To perform an update asynchronously, use the `Prefer` header with the `respond-async` value. When performing an async update, this endpoint returns a HTTP `202 Accepted` response.
For a complete list of properties and information, see the Postman Collection Format documentation.
For protocol profile behavior, refer to Postman's Protocol Profile Behavior documentation.
Note:
The maximum collection size this endpoint accepts cannot exceed 100 MB.
Use the GET `/collection-updates-tasks/{taskId}` endpoint to get the collection's update status when performing an asynchronous update.
If you don't include the collection items' ID values from the request body, the endpoint removes the existing items and recreates the items with new ID values.
To copy another collection's contents to the given collection, remove all ID values before you pass it in this endpoint. If you do not, this endpoint returns an error. These values include the `id`, `uid`, and `postman_id` values.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| collectionId | Yes | The collection ID must be in the form <OWNER_ID>-<UUID> (e.g. 12345-33823532ab9e41c9b6fd12d0fd459b8b). | |
| Prefer | No | The `respond-async` header to perform the update asynchronously. | |
| collection | No |