Define what contacts can agree to, such as receiving newsletters, and record the consents they give or revoke. Each consent type can have translations.
Get consent types by site
Returns the consent types shown on a subscription site, using the latest translation revision in the site's language. Consent types that have no translation in the site's language are not included.
Get consent types by site › Request Body
siteDomain name of the subscription site.
Get consent types by site › Responses
OK
succeedResponse status.
Add consent to contact
Records that a contact has given a consent. Consent IDs, revisions and languages are listed by getConsentTypes.
If the contact already has the same consent revision in the same language, it is renewed, and a revoked consent becomes valid again.
Add consent to contact › Request Body
member_idContact ID.
consent_idConsent ID.
consent_revisionConsent revision number.
langConsent language code, e.g. EN.
sourceSource of the consent. REST API callers should use api.
source_dataFree-text description of where the consent was given, e.g. a subscription page URL.
Add consent to contact › Responses
OK
succeedResponse status.
resultMember consent ID.
Revoke consent
Revokes a contact's consent. All revisions of the consent in the given language are revoked.
Revoke consent › Request Body
member_idContact ID.
consent_idConsent ID.
consent_revisionConsent revision number.
langConsent language code, e.g. EN.
Revoke consent › Responses
OK
succeedResponse status.
resultReturns null.
Get contact consent updates
Returns changes in contacts' consents since from_date.
Returns at most 1000 updates per call, 100 by default. Use offset with the pagination data in the response to get more.
Get contact consent updates › Request Body
from_dateStart date and time as YYYY-MM-DD HH:MM:SS. getUnsubscriptions accepts only YYYY-MM-DD.
Get contact consent updates › Responses
OK
succeedResponse status.
Create consent type
Creates a consent type and returns its ID. The new type has no translations: add the title and description shown to contacts with editConsentTranslation.
Create consent type › Request Body
nameConsent type name.
is_revokableWhether the consent can be revoked.
Create consent type › Responses
OK
succeedResponse status.
resultConsent ID.
Edit consent type
Changes the name and revocability of a consent type. Translations are not changed and no new revision is created; use editConsentTranslation to change the text shown to contacts. Returns 1 even if no consent type has the given ID.
Edit consent type › Request Body
consent_idConsent ID.
nameConsent type name.
is_revokableWhether the consent can be revoked.
Edit consent type › Responses
OK
succeedResponse status.
resultReturns 1 on success.
Edit consent translation
Saves a new revision of the consent title and description in one language and returns the revision number. Use this also to add a new language. Earlier revisions are kept, and consents that contacts have already given keep referring to the revision they were given for.
Edit consent translation › Request Body
consent_idConsent ID.
langConsent language code, e.g. EN.
titleConsent title.
descriptionConsent description text.
Edit consent translation › Responses
OK
succeedResponse status.
resultConsent revision number.
Delete consent type
Permanently deletes a consent type with all its translations. This also deletes all consents that contacts have given for it and removes it from subscription sites. This cannot be undone. Returns 1 even if no consent type has the given ID.
Delete consent type › Request Body
consent_idConsent ID.
Delete consent type › Responses
OK
succeedResponse status.
resultReturns 1 on success.