Returns tag definitions, each with subscriber_count, the number of contacts the tag is applied to. Contact tags are returned by default; pass type=template for template tags. To find a tag by exact name, use filters[tag] or filters[search][eq]; both match the whole name, ignoring case. For a partial-name search, use search: it is a case-insensitive substring match, so it returns every similarly named tag alongside the one asked for. Identify the tag you want by comparing the tag field of each result, never by its position in the list. To apply a tag to a contact, pass the returned id to POST /contactTags. Unrecognized filter and order parameters are silently ignored. When that happens the response contains the unfiltered set with the unfiltered total, so a request with a misspelled filter looks successful while returning every tag. Soft-deleted tags are never listed. Results are sorted by id ascending unless order, selected_tag_id or orders[search]=weight applies; orders[tag], orders[type] and orders[id] have no effect. meta.total is the number of tags that matched, returned as a string; when counting is slow it can come from a cache of up to five minutes. The list is read from a replica, so a tag created a moment ago can be missing briefly.
{
"tags": [
{
"tagType": "contact",
"tag": "one",
"description": "",
"cdate": "2018-08-17T09:43:15-05:00",
"links": {
"contactGoalTags": "https://:account.api-us1.com/api/:version/tags/1/contactGoalTags"
},
"id": "1"
},
{
"tagType": "contact",
"tag": "two",
"description": "",
"cdate": "2018-08-17T13:41:16-05:00",
"links": {
"contactGoalTags": "https://:account.api-us1.com/api/:version/tags/2/contactGoalTags"
},
"id": "2"
},
{
"tagType": "contact",
"tag": "three",
"description": "",
"cdate": "2018-08-17T13:41:18-05:00",
"links": {
"contactGoalTags": "https://:account.api-us1.com/api/:version/tags/3/contactGoalTags"
},
"id": "3"
},
{
"tagType": "template",
"tag": "test1",
"description": "",
"cdate": "2018-08-28T11:54:36-05:00",
"links": {
"contactGoalTags": "https://:account.api-us1.com/api/:version/tags/4/contactGoalTags"
},
"id": "4"
},
{
"tagType": "template",
"tag": "test2",
"description": "",
"cdate": "2018-08-28T11:54:38-05:00",
"links": {
"contactGoalTags": "https://:account.api-us1.com/api/:version/tags/5/contactGoalTags"
},
"id": "5"
}
],
"meta": {
"total": "5"
}
}