Create a consent group

Creates a new consent group for the account. <Note>This endpoint is only available when the Consent Groups feature is enabled for your account.</Note>

Authentication

api-keystring

The API key should be passed in the request headers as api-key for authentication.

Request

This endpoint expects an object.
namestringRequired

Unique name for the consent group (max 255 characters)

signupModeenumRequired

Controls how contacts are added to the group. manual — contacts are added explicitly via the API. automatic — contacts are added automatically at signup.

descriptionstringOptional

Optional description (max 500 characters)

listIdslist of longsOptional
Optional list of contact list IDs. Contacts from these lists will be copied once into this consent group at creation time.

Response

Consent group created successfully
idlong
Unique identifier for the consent group
namestring
Display name of the consent group
signupModeenum

Controls how contacts are added to the group. manual — contacts are added explicitly via the API. automatic — contacts are added automatically at signup.

contactsCountlong
Number of contacts currently in this consent group
isDefaultboolean

Whether this is a system-created default consent group

createdAtdatetime

UTC date-time when the consent group was created (YYYY-MM-DDTHH:mm:ss.SSSZ)

updatedAtdatetime

UTC date-time when the consent group was last updated (YYYY-MM-DDTHH:mm:ss.SSSZ)

descriptionstring
Optional description of the consent group

Errors

400
Bad Request Error
403
Forbidden Error
409
Conflict Error