PATCH /hub/v1/nestedtags/{tagId}
Overview
Updates an existing tag. Provide only the tag fields to be changed.
| Name | Type | Description | |
|---|---|---|---|
| tagId | number | Required | ID of the tag to patch. |
| Name | Type | Description | |
|---|---|---|---|
| id | number | Required | TagId of the tag to update. |
| name | string | Name of the tag, up to 120 characters. The only special characters allowed are period (.) and apostrophe ('). | |
| description | string | Description of the tag, up to 256 characters. The only special characters allowed are period (.), apostrophe ('), comma (,), and forward slash (/). If you don’t provide a description, the existing description is not changed. | |
| parentId | number | TagId that you want to be the parent of this tag. If you don’t provide a parentId, the parentId is not changed. | |
| tags | object | A list of tags to create as nested tags. If you don’t provide a list of tags, the existing nested tags are not changed. |
Usage
Example Request
This example patches a nested tag to update its description field.
Host: https://YOUR_SUBDOMAIN.rest.marketingcloudapis.com
PATCH /hub/v1/nestedtags/18
Content-Type: application/json
Authorization: Bearer YOUR_ACCESS_TOKEN
{
"id": 18,
"description": "Platinum Membership Level - the highest level"
}Example Response
HTTP/1.1 200 OK
{
"id": 18,
"name": "Platinum",
"description": "Platinum Membership Level - the highest level",
"modifiedDate": "2019-06-14T11:58:00",
"parentId": 14
}Example Request
This example changes a nested tag into a root tag with no parent.
Host: https://YOUR_SUBDOMAIN.rest.marketingcloudapis.com
PATCH /hub/v1/nestedtags/18
Content-Type: application/json
Authorization: Bearer YOUR_ACCESS_TOKEN
{
"id": 18,
"parentId": 0
}Example Response
HTTP/1.1 200 OK
{
"id": 18,
"name": "Platinum",
"description": "Platinum Membership Level - the highest level",
"modifiedDate": "2019-06-14T11:58:00",
"parentId": 0
}