Create Nested Tags
Get Nested Tags
Get Nested Tag By ID
Update Nested Tags
Patch Nested Tags
Delete Nested Tags
Create Tags
Delete Tags
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 isn’t changed. |
| parentId | number | TagId that you want to be the parent of this tag. If you don’t provide a parentId, the parentId isn’t 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 aren’t changed. |
| Status | Name | Type | Description |
|---|---|---|---|
| 200 | Response includes the updated tag and all of its properties, including nested tags at the level specified by the depth parameter. | ||
| id | integer | TagId of the tag. | |
| name | string | Name of the tag. | |
| description | string | Description of the tag. | |
| parentId | string | TagId of the parent tag. This field is null or zero if no parent tag exists. | |
| tags | object | A list of the tag’s nested tags. |
This example patches a nested tag to update its description field.
1Host: https://YOUR_SUBDOMAIN.rest.marketingcloudapis.com
2PATCH /hub/v1/nestedtags/18
3Content-Type: application/json
4Authorization: Bearer YOUR_ACCESS_TOKEN
5
6{
7 "id": 18,
8 "description": "Platinum Membership Level - the highest level"
9}The response includes the updated information for the tag.
1HTTP/1.1 200 OK
2{
3 "id": 18,
4 "name": "Platinum",
5 "description": "Platinum Membership Level - the highest level",
6 "modifiedDate": "2019-06-14T11:58:00",
7 "parentId": 14
8}This example changes a nested tag into a root tag with no parent.
1Host: https://YOUR_SUBDOMAIN.rest.marketingcloudapis.com
2PATCH /hub/v1/nestedtags/18
3Content-Type: application/json
4Authorization: Bearer YOUR_ACCESS_TOKEN
5
6{
7 "id": 18,
8 "parentId": 0
9}The response indicates the changed status of the tag.
1HTTP/1.1 200 OK
2{
3 "id": 18,
4 "name": "Platinum",
5 "description": "Platinum Membership Level - the highest level",
6 "modifiedDate": "2019-06-14T11:58:00",
7 "parentId": 0
8}