List all tags

Returns tag definitions. 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]; for a partial-name search, use search. 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. Results are sorted by id ascending unless orders[search]=weight applies. meta.total is the number of tags that matched, returned as a string.

{
    "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"
    }
}
Query Params

Filters tags by name. Partial matches are included (a contains match), within the selected type only. If both search and filters[search] are sent, search wins and filters[search] is ignored.

string

Filters by exact tag name. The simplest way to look up one tag by name.

string
enum

Selects which tag type the response contains: contact (the default) or template. Any other value is treated as contact. Every response contains only one type of tag. Sending filters[type] instead of this parameter does not work and can return an empty result.

Allowed:
string

Filters tags by name using the operator. Supported operators: eq (exact name match), neq, lt, lte, gt, gte, contains, starts_with. Send only one operator per request; additional operators are not combined correctly. Any other operator value returns an empty result set.

string

Filters by tag id. Supported operators: eq, neq, lt, lte, gt, gte, and in with a comma-separated list of ids (for example filters[id][in]=1,2,3).

string

Comma-separated list of tag ids to return. Overrides limit.

string
enum

Sorts search results by relevance: exact matches first, then tags starting with the searched text, then the rest. weight is the only supported value, and it only applies when filters[search] is also sent and the legacy order parameter is absent. Ordering by other fields is not supported; any other orders parameter is silently ignored and the default sort by id applies.

Allowed:
integer

Number of results to return. Default 20, maximum 100.

integer

Number of results to skip. Use with limit to page through results.

Responses

Language
Credentials
Header
URL
LoadingLoading…
Response
Choose an example:
application/json