---
updatedAt: 2026-09-24T14:59:35.000Z
agentTools:
  projectIndex: https://virustotal.readme.io/llms.txt
---

# Update a collection

> 🚧 IoC scanning and dataset inclusion
>
> Any IoC submitted or queried via the API will be scanned and added to the VirusTotal dataset, making it accessible to the community. Do not submit or query indicators containing sensitive, confidential, or personally identifiable information (PII).

This endpoint allows updating a collection's attributes (such as name or description) and adding new elements to a collection by using a raw text.

The following request body shows an example of how to update a collection's name and add new IOCs to it by using a raw text:

```json Example request body
{
	"data": {
		"attributes": {
			"name": "Updating the name"
		},
		"raw_items": "This is a text containing a IoC, www.virustotal.com",
		"type": "collection"
	}
}
```

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "virustotal-api-v3",
    "version": "3.0"
  },
  "servers": [
    {
      "url": "https://www.virustotal.com/api/v3"
    }
  ],
  "security": [
    {}
  ],
  "paths": {
    "/collections/{id}": {
      "patch": {
        "summary": "Update a collection",
        "description": "",
        "operationId": "collections-update",
        "parameters": [
          {
            "name": "x-apikey",
            "in": "header",
            "description": "Your API key",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "Collection's ID",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "data"
                ],
                "properties": {
                  "data": {
                    "type": "string",
                    "description": "Collection object",
                    "format": "json"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"data\": {\n    \"attributes\": {\n      \"name\": \"Updating the name\",\n      \"description\": \"This is how to create a new collection via API.\",\n      \"top_icon_md5\": [\n        \"1bc1faf71106e964e44cb17ab4dd8d11\"\n      ],\n      \"tags\": [],\n      \"ip_addresses_count\": 1,\n      \"domains_count\": 2,\n      \"creation_date\": 1614784765,\n      \"last_modification_date\": 1614784765,\n      \"references_count\": 0,\n      \"alt_names\": [],\n      \"urls_count\": 2,\n      \"autogenerated_tags\": [\n        \"cve-2017-5753\"\n      ],\n      \"files_count\": 1\n    },\n    \"type\": \"collection\",\n    \"id\": \"{id}\",\n    \"links\": {\n      \"self\": \"https://www.virustotal.com/api/v3/collections/{id}\"\n    }\n  }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "attributes": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "example": "Updating the name"
                            },
                            "description": {
                              "type": "string",
                              "example": "This is how to create a new collection via API."
                            },
                            "top_icon_md5": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "example": "1bc1faf71106e964e44cb17ab4dd8d11"
                              }
                            },
                            "tags": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {}
                              }
                            },
                            "ip_addresses_count": {
                              "type": "integer",
                              "example": 1,
                              "default": 0
                            },
                            "domains_count": {
                              "type": "integer",
                              "example": 2,
                              "default": 0
                            },
                            "creation_date": {
                              "type": "integer",
                              "example": 1614784765,
                              "default": 0
                            },
                            "last_modification_date": {
                              "type": "integer",
                              "example": 1614784765,
                              "default": 0
                            },
                            "references_count": {
                              "type": "integer",
                              "example": 0,
                              "default": 0
                            },
                            "alt_names": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {}
                              }
                            },
                            "urls_count": {
                              "type": "integer",
                              "example": 2,
                              "default": 0
                            },
                            "autogenerated_tags": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "example": "cve-2017-5753"
                              }
                            },
                            "files_count": {
                              "type": "integer",
                              "example": 1,
                              "default": 0
                            }
                          }
                        },
                        "type": {
                          "type": "string",
                          "example": "collection"
                        },
                        "id": {
                          "type": "string",
                          "example": "{id}"
                        },
                        "links": {
                          "type": "object",
                          "properties": {
                            "self": {
                              "type": "string",
                              "example": "https://www.virustotal.com/api/v3/collections/{id}"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false,
        "security": []
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": false
  },
  "x-readme-fauxas": true
}
```