Tag contacts
civicrm_tag_contactsAdd a tag to one or more contacts in a single call. Idempotent, so re-tagging a contact already tagged has no effect.
Instructions
Add a tag to one or more contacts in a single call. Idempotent — re-tagging an already-tagged contact is a no-op. Requires CIVICRM_ALLOW_WRITES=true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tag | Yes | Tag id (number) or tag name (string). Names are resolved to ids on the fly. | |
| contact_ids | Yes | Contact ids to tag. Bounded at 500 per call to keep one request bounded; chunk larger sets in the caller. |