POST contacts/saveGroups

Save groups for an existing contact. ContactID or email is required. By default, this call mirrors the functionality of /contacts/save when passing the "groupIDs" parameter. However, here you can include a "suppressed" flag per group which allows you to set group-level suppression.

* required

Parameters

Name Type Description
contactID integer Unique ID of a contact
email email-address An email address of an existing contact
groups * array Array of structs holding group subscription data. Each struct must contain the key "groupID" and may contain an optional "suppressed" key. [{"groupID":123}] or [{"groupID":123,"suppressed":1}]. If "suppressed" key is not passed, it will default to 0.

Response Data

Method returns no data

Permissions

Method requires the Contacts (Edit) permission

Example Calls

Add contact to groups

This example suppresses the contact in one group and unsuppresses them in another.

POST
/contacts/saveGroups
cURL
Copy
Response Data

API Console

The console uses production data, so BE CAREFUL!
POST
contacts/saveGroups
Request Body
{"groups":[],"email":"","contactID":0}
Access token: *