---
updatedAt: 2026-07-02T14:39:48.000Z
---

# Modify tags

This operation enables you to create new tags if none exist for the site, or to replace any existing tags with new tags.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "x-explorer-enabled": false,
  "info": {
    "title": "Site API (Legacy)",
    "license": {
      "name": "(c) Copyright 2021 WhiteHat Security"
    },
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://sentinel.whitehatsec.com"
    }
  ],
  "paths": {
    "/api/site/{site_id}/tag": {
      "put": {
        "tags": [
          "Site API v1.0"
        ],
        "summary": "Modify tags",
        "description": "This operation enables you to create new tags if none exist for the site, or to replace any existing tags with new tags.",
        "operationId": "updateTags",
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "description": "Site ID.",
            "required": true,
            "style": "simple",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "format",
            "in": "query",
            "description": "The response representation format for results.",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string",
              "default": "xml",
              "example": "json",
              "enum": [
                "json",
                "xml"
              ]
            }
          }
        ],
        "requestBody": {
          "description": "Holds the information to add new tags.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TagsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Provides the list of added tags to a particular site.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TagCollection"
                }
              },
              "application/xml": {
                "example": "XML preview is currently not supported."
              }
            }
          },
          "400": {
            "description": "BadRequestResponse indicates a request with invalid parameters.",
            "content": {}
          },
          "401": {
            "description": "UnauthorizedResponse signals an unauthorized API access.",
            "content": {}
          },
          "403": {
            "description": "ForbiddenResponse signals a request for a resource that does not exist or is not authorized.",
            "content": {}
          },
          "500": {
            "description": "GenericError generic error.",
            "content": {}
          }
        },
        "deprecated": false
      }
    }
  },
  "components": {
    "schemas": {
      "SiteTags": {
        "type": "array",
        "description": "List of new tags. A maximum of 25 alphanumeric characters (plus underscore '_') per tag string is recommended.",
        "items": {
          "type": "string"
        }
      },
      "TagCollection": {
        "properties": {
          "type": {
            "type": "string"
          },
          "collection": {
            "$ref": "#/components/schemas/SiteTags"
          },
          "href": {
            "type": "string"
          },
          "page": {
            "properties": {
              "total": {
                "type": "number"
              }
            },
            "type": "object"
          }
        }
      },
      "TagsRequest": {
        "required": [
          "tag"
        ],
        "properties": {
          "tag": {
            "$ref": "#/components/schemas/SiteTags"
          }
        }
      }
    }
  }
}
```