Create a tag

Creates a tag definition. This does not apply the tag to any contact; to do that, pass the new tag id to POST /contactTags, or use POST /contacts/{id}/tags to create and apply by name in one call. Always send tagType (contact or template): a tag created without it does not appear in GET /tags listings. If a non-deleted tag with the same name and type already exists, the request returns 200 with the existing tag instead of creating a duplicate. If the name is held by a deleted tag that has not been purged, the request fails with 422 and a {message, error} body rather than an errors array. Tag names must be 1 to 250 characters and cannot contain commas, line breaks, or HTML markup; such requests fail with 422 (see the 422 response for the two body shapes). Emoji and other 4-byte characters are not supported in tag names. Names are compared case-insensitively: creating a name that differs from an existing tag only in letter case returns the existing tag. Names are stored exactly as sent; leading and trailing spaces are not trimmed. Requires the tag management permission.

📘

Tags should be treated as case-insensitive

Tags should be treated as case insensitive, however, avoid using case as the only differentiator between tags. For example, My Tag and my tag can cause problems.

Commas are prohibited in tag creation.

{
	"tag":{
		"tag": "My Tag",
		"tagType": "contact",
		"description": "Description"
	}
}
{
    "tag": {
        "tag": "My Tag",
        "description": "Description",
        "tagType": "contact",
        "cdate": "2018-09-29T19:21:25-05:00",
        "links": {
            "contactGoalTags": "https://:account.api-us1.com/api/:version/tags/16/contactGoalTags"
        },
        "id": "16"
    }
}
Body Params
tag
object
Responses

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