Applies up to 100 tags to one contact in a single request, by tag name, tag id, or both. Tag names that do not exist yet are created automatically unless createMissing is false; tag ids must refer to existing tags. This replaces the per-tag sequence of GET /tags, POST /tags, and POST /contactTags with one call. Returns 201 with every requested association, including ones that already existed, so the request is safe to repeat. Send at least one entry in tags or tagIds. Tag names are matched case-insensitively, and are trimmed and stripped of HTML markup before matching and creation. Returns 404 if the contact does not exist. Fails with 400 for an unknown tag id, an unknown name when createMissing is false, a name held by a deleted tag, a name containing commas, line breaks, emoji, or other 4-byte characters, or a request addressing more than 100 tags. createMissing is true by default: a name in tags that matches no existing tag creates a new tag definition for the whole account, the same as POST /tags does, and then applies it. Creating a tag needs the tag management permission (pg_tag_manage), the same permission POST /tags requires; users in the main user group always have it. A user who may edit contacts but not manage tags gets 403 when a request would create a tag, and nothing is created or applied. Applying tags that already exist needs only the contact edit permission. An integration that should only apply tags, never create them, sends tagIds, or sends tags with createMissing set to false; an unknown name then fails with 400 and no tag is created. Users outside the main user group can only tag contacts they have access to. A request may contain at most 200 entries across tags and tagIds, counted after repeated entries within each array are dropped (names compared exactly, after trimming spaces), and may address at most 100 distinct tags once names are resolved. The 201 body differs between a first apply and a repeat: when at least one association is newly created, the body also carries tags (the tag definitions involved) and contacts (the contact) beside contactTags; when every association already existed, only contactTags is returned.
post
https://{youraccountname}.api-us1.com/api/3/contacts//tags
