Create Nested Tags
Get Nested Tags
Get Nested Tag By ID
Update Nested Tags
Patch Nested Tags
Delete Nested Tags
Create Tags
Delete Tags
DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!
Let us know so we can improve!
Creates a tag that can be associated with any object that accepts tagging. The tag must contain a unique name. The tag can contain a description and a list of one or more nested tags.
| Name | Type | Description |
|---|---|---|
name | string | Required. 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 (/). |
parentId | string | TagId that you want to be the parent of this tag. If you don’t provide a parentId, or if you specify zero as the parentId, the tag is created as a root tag with no parent. |
tags | string | A list of tags to create as nested tags. To include no nested tags, omit this field. You can add and modify nested tags using the Update Nested Tags or Patch Nested Tags requests. |
| Status | Name | Type | Description |
|---|---|---|---|
| 201 | Response includes the newly created 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. Add and modify nested tags using the Update Nested Tags or Patch Nested Tags requests. |
This example creates a tag using only a name.
1Host: https://YOUR_SUBDOMAIN.rest.marketingcloudapis.com
2
3POST /hub/v1/nestedtags
4Content-Type: application/json
5Authorization: Bearer YOUR_ACCESS_TOKEN
6
7{
8 "name": "Membership Level"
9}The response includes information about the tag.
1HTTP/1.1 202 Accepted
2{
3 "id": 14,
4 "name": "Membership Level",
5 "description": "",
6 "modifiedDate": "2019-06-14T11:07:00",
7 "parentId": 0,
8 "tags": []
9}This example creates a parent tag with nested tags.
1Host: https://YOUR_SUBDOMAIN.rest.marketingcloudapis.com
2POST /hub/v1/nestedTags
3Content-Type: application/json
4Authorization: Bearer YOUR_ACCESS_TOKEN
5
6{
7 "name": "Membership Level",
8 "tags": [
9 {
10 "name": "Gold",
11 "description": "Gold Membership Level"
12 },
13 {
14 "name": "Silver",
15 "description": "Silver Membership Level"
16 },
17 {
18 "name": "Bronze",
19 "description": "Bronze Membership Level"
20 }
21 ]
22}The response includes information about the primary tag and the nested tags.
1HTTP/1.1 202 Accepted
2{
3 "id": 14,
4 "name": "Membership Level",
5 "description": "",
6 "modifiedDate": "2019-06-14T11:07:00",
7 "parentId": 0,
8 "tags": [
9 {
10 "id": 15,
11 "name": "Bronze",
12 "description": "Bronze Membership Level",
13 "modifiedDate": "2019-06-14T11:07:00",
14 "parentId": 14,
15 "tags": []
16 },
17 {
18 "id": 16,
19 "name": "Gold",
20 "description": "Gold Membership Level",
21 "modifiedDate": "2019-06-14T11:07:00",
22 "parentId": 14,
23 "tags": []
24 },
25 {
26 "id": 17,
27 "name": "Silver",
28 "description": "Silver Membership Level",
29 "modifiedDate": "2019-06-14T11:07:00",
30 "parentId": 14,
31 "tags": []
32 }
33 ]
34}This example adds a new nested tag under an existing tag.
1Host: https://YOUR_SUBDOMAIN.rest.marketingcloudapis.com
2POST /hub/v1/nestedtags
3Content-Type: application/json
4Authorization: Bearer YOUR_ACCESS_TOKEN
5
6{
7 "name": "Platinum",
8 "description": "Platinum Membership Level",
9 “parentId”: 14
10}The response includes information about the nested tag.
1HTTP/1.1 200 Accepted
2{
3 "id": 18,
4 "name": "Platinum",
5 "description": "Platinum Membership Level",
6 "modifiedDate": "2019-06-14T11:58:00",
7 "parentId": 14
8}