Skip to main content

Registering a new consent

The easiest way to register a consent is by using the Consent Banner. Whenever the user interacts with it, a consent is immediately sent to our public API, therefore adding it to the Consent Log. However, it is also possible to create a new consent by using the API directly.

In order to do so, a POST request must be sent to the following endpoint:

https://api.platform.illow.io/public/cookie-consent/{siteId}

Where the siteId is the UUID returned when creating the consent banner.

Consent API

Request Body

Format: JSON

PropertyTypeRequired?Description
categoriesCategories ObjectYesThe consent categories to give or revoke.
gpcbooleanNoThe Global Privacy Control signal
tcStringstringNoIAB's TCF v2.2 consent string
userIdstringNoAn optional user ID to authenticate the consent sent

Categories object

Format: JSON

PropertyTypeDescription
marketingbooleanIf the user agreed to have cookies of type marketing
preferencesbooleanIf the user agreed to have cookies of type preferences
statisticsbooleanIf the user agreed to have cookies of type analytics/statistics
unclassifiedbooleanIf the user agreed to have unclassified cookies, this will be always true
necessarybooleanThe status of the necessary cookies, will be always on true, as the user can't opt out of this ones
optedInbooleanIf the user opted in for the consent, only valid when the banner is a ccpaBanner
info

To grant a consent for a category, the value sent to the API must be true. In order to revoke it, a false value must be posted.