Add tags to a contact

Add up to 100 tags to a contact in one request, by name, by id, or both. This is the batch equivalent of Create a contact tag, which applies a single tag per call.

tags always holds tag names and tagIds always holds tag ids; neither array is ever reinterpreted as the other, and at least one of the two must be non-empty. Names that do not exist yet are created unless createMissing is false; ids are never created. A tag that cannot be resolved fails the whole request, so the contact is never left with part of the requested set.

Tags the contact already has are returned with their original id and cdate rather than being duplicated, so the request can be repeated safely. The response lists an association for every tag addressed, in the order the request addressed them.

At most 100 tags may be addressed, and a body may reference at most 200 tags in total (a tag may legitimately be referenced both by name and by id).

Requires permission to edit the contact.

Path Params
int32
required

id of the contact to tag

Body Params
tags
array of strings

Tag names to apply. Trimmed, and may not be empty or contain commas, line breaks or 4-byte characters.

tags
tagIds
array of int32s

Ids of existing tags to apply. Positive integers.

tagIds
boolean
Defaults to true

Whether a tag name that does not exist yet is created. Never applies to tagIds.

Responses

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