Postman API
  1. Collections
Postman API
  • API
    • Get all APIs
      GET
    • Create API
      POST
    • Delete an API
      DELETE
    • Single API
      GET
    • Update an API
      PUT
    • Get All API Versions
      GET
    • Create API Version
      POST
    • Delete an API Version
      DELETE
    • Get an API Version
      GET
    • Update an API Version
      PUT
    • Get contract test relations
      GET
    • Get documentation relations
      GET
    • Get environment relations
      GET
    • Get integration test relations
      GET
    • Get monitor relations
      GET
    • Get linked relations
      GET
    • Create relations
      POST
    • Create Schema
      POST
    • Get Schema
      GET
    • Update Schema
      PUT
    • Create collection from schema
      POST
    • Get test suite relations
      GET
    • Sync relations with schema
      PUT
  • Collections
    • All Collections
      GET
    • Create Collection
      POST
    • Create a Fork
      POST
    • Merge a Fork
      POST
    • Delete Collection
      DELETE
    • Single Collection
      GET
    • Update Collection
      PUT
  • Environments
    • All Environments
    • Create Environment
    • Delete Environment
    • Single Environment
    • Update Environment
  • Import
    • Import exported data
    • Import external API specification
  • User
    • API Key Owner
  • Mocks
    • All Mocks
    • Create Mock
    • Delete Mock
    • Single Mock
    • Update Mock
    • Publish Mock
    • Unpublish Mock
  • Monitors
    • All Monitors
    • Create Monitor
    • Delete Monitor
    • Single Monitor
    • Update Monitor
    • Run a Monitor
  • Webhooks
    • Create Webhook
  • Workspaces
    • All workspaces
    • Create Workspace
    • Delete Workspace
    • Single workspace
    • Update Workspace
  1. Collections

Update Collection

PUT
/collections/{collection_uid}
Collections
This endpoint allows you to update an existing collection using the Postman Collection v2 format. For more information about the v2 schema, check the format here.
On successful updation of the collection, the response returns the collection name, id and uid.
Requires API Key as X-Api-Key request header or apikey URL query parameter.
Note: Please be careful when trying to update the collection, as the existing collection will be replaced by the request body.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PUT 'https://api.getpostman.com/collections/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "collection": {
        "info": {
            "_postman_id": "174bad7c-07e3-45f3-914f-36cf84e5586f",
            "description": "This is just a sample collection.",
            "name": "Sample Collection {{$randomInt}}",
            "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
        },
        "item": [
            {
                "item": [
                    {
                        "name": "Sample POST Request",
                        "request": {
                            "body": {
                                "mode": "raw",
                                "raw": "{\"data\": \"123\"}"
                            },
                            "description": "This is a sample POST Request",
                            "header": [
                                {
                                    "key": "Content-Type",
                                    "value": "application/json"
                                }
                            ],
                            "method": "POST",
                            "url": "https://postman-echo.com/post"
                        }
                    }
                ],
                "name": "This is a folder"
            },
            {
                "name": "Sample GET Request",
                "request": {
                    "description": "This is a sample GET Request",
                    "method": "GET",
                    "url": "https://postman-echo/get"
                }
            }
        ]
    }
}'
Response Response Example
200 - Collection Updated
{
  "collection": {
    "id": "1d3daef4-2037-4584-ab86-bafd8c8f8a55",
    "name": "Sample Collection",
    "uid": "5852-1d3daef4-2037-4584-ab86-bafd8c8f8a55"
  }
}

Request

Path Params
collection_uid
string 
required
Body Params application/json
collection
object 
optional
info
object 
optional
item
array [object {2}] 
optional
Examples

Responses

🟢200Collection Updated
application/json
Body
collection
object 
optional
id
string 
optional
Example:
1d3daef4-2037-4584-ab86-bafd8c8f8a55
name
string 
optional
Example:
Sample Collection
uid
string 
optional
Example:
5852-1d3daef4-2037-4584-ab86-bafd8c8f8a55
🟠400Collection ID Mismatch
🟠403Not Enough Permissions
🟠404Collection Not Found
Previous
Single Collection
Next
All Environments
Built with