Iubenda logo
Start generating

Documentation

Table of Contents

Consent Database Delivery Channels

iubenda’s Consent Database is available via two different channels which allow you to choose the cycle of periodic updates that best suits your needs:

  1. Current – By default, the iubenda Consent Database is accessed via the Current channel. This channel is quite stable and all features released on this channel are fully tested in a wide range of scenarios. The Current channel receives regular updates and fixes are applied as soon as they are available. If you wish to use this channel, you do not need to make any changes to the code automatically generated when the Consent Database is activated.
  2. Beta – Once they’ve been tested internally, all the latest features are released on the Beta channel first, before being merged into the more stable “current” channel. Releases to this channel occur more frequently, and, as with the Current channel, fixes are applied here as soon as they become available.

How to change the release channel

You can specify the channel you want to use by using the dedicated dropdown menu next to “Sync your iubenda legal documents with the Consent Database” (to get there: Dashboard > [Your site] > Consent Database > Embed):

Consent Solution - Changing release channel

JavaScript library

Let’s assume that you want to use the beta channel. The code generated for the current channel is:

<script type="text/javascript">
    var _iub = _iub || {};
    _iub.cons_instructions = _iub.cons_instructions || [];
    _iub.cons_instructions.push(["init", {
        api_key: "XXXXXXXX" //use you api_key
    }]);
</script>
<script type="text/javascript" src="https://cdn.iubenda.com/cons/iubenda_cons.js" async></script>

Once selected “Beta” from the dropdown menu, it will become:

<script type="text/javascript">
    var _iub = _iub || {};
    _iub.cons_instructions = _iub.cons_instructions || [];
    _iub.cons_instructions.push(["init", {
        api_key: "XXXXXXXX" //use you api_key
    }]);
</script>
<script type="text/javascript" src="https://cdn.iubenda.com/cons/beta/iubenda_cons.js" async></script>

Copy the resulting code (make sure to use your api_key) and paste it into the HEAD tag of your site, replacing the default one.

HTTP API

The examples suggested for the current channel are:

//Create consent
curl -H "ApiKey: XXXXXXXX" -X POST "https://consent.iubenda.com/consent/"

//Create subjects
curl -H "ApiKey: XXXXXXXX" -X POST "https://consent.iubenda.com/subjects/"

Once selected “Beta” from the dropdown menu, they’ll become:

//Create consent
curl -H "ApiKey: XXXXXXXX" -X POST "https://consent.iubenda.com/beta/consent/"

//Create subjects
curl -H "ApiKey: XXXXXXXX" -X POST "https://consent.iubenda.com/beta/subjects/"

More on the HTTP API documentation.

Changelog

The complete changelog is available at this link.