Add contact to group
civicrm_add_to_groupAdd a contact to a CiviCRM group, updating existing memberships to avoid duplicates.
Instructions
Add a contact to a group (GroupContact status='Added'). Idempotent — updates an existing row rather than creating duplicates. Requires CIVICRM_ALLOW_WRITES=true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| group_id | Yes | CiviCRM group id (not title). | |
| contact_id | Yes |