Skip to content

Consents / Opt-ins

Communication consents refer to a contact's acceptance to be contacted through a specific channel (SMS, email, postal mail) for a specific type of communication (commercial, legal, etc.).

Glossary

Communication channels

  • email: Via email
  • text_message: Via SMS
  • postal_mail: Via postal mail

Communication types

  • news: Newsletters
  • legal: Mandatory/legal information — This opt-in cannot be disabled
  • advertising: Advertising
  • partners: Partner communications

Default consents

By default, when a contact is created — whether via the API, the member area registration, or through the back office — all opt-ins are disabled except for legal opt-ins, which are enabled across all channels.

You cannot create a contact with different default opt-ins through the API.

Retrieve consents

Use the endpoint GET /{client_token}/optins
This endpoint allows you to filter using ?contactId=/{client_token}/contacts/12345 to retrieve the opt-ins of a specific contact.

Modify opt-ins

You can modify opt-ins (except those of type legal).

However, only the isAuthorized property of opt-ins can be modified.
You cannot change the channel, type, or contact associated with an opt-in.
You cannot delete or add a new opt-in.

To update an opt-in, use the endpoint PUT /{client_token}/optins/{id}
Your payload should only contain the isAuthorized field modification:

json
{
    "isAuthorized": true
}

WARNING

Warning, to comply with GDPR, you must obviously obtain the contact's prior consent before enabling their consents.

NOTE

You cannot modify multiple opt-ins at once; you will need to call the update for each opt-in individually.