support home

Back to website
Welcome
Login  Sign up

How do I create and synchronise a custom document with the Consent Database?

Hello user,

Thank you for contacting iubenda Support Team.

If you wish to link your own custom document with the Consent Solution, you must create a new "legal_notice" using our API https://www.iubenda.com/en/help/6484-consent-solution-http-api-documentation#legal-notices-examples and give it a new name (different from the 3 names used by default -privacy_policy, cookie_policy, term).

Here is a call that creates a legal_notice named "conditions" with "document text" content:

curl https://consent.iubenda.com/legal_notices \
-X POST \
-H "ApiKey: your-private-api-key" \
-H "Content-Type: application/json" \
-d '{ "identifier": "conditions”, "content": “document” text }'

If you download Postman (easy method) from this link https://www.postman.com/downloads/ you can import our pre-compiled call (attached to this email) using the Import function (here's a screenshot for more clarity).

Before importing the call on Postman, remember to change the api key parameter with your private api key - you can find it on the dashboard of the Consent Solution on your iubenda account.

Here is the part to edit:
--header 'apikey: your-private-api-key' \

You can change the document name and content in these two parameters within the file:
--data-raw '{
"identifier": "name_of_the_Document",
"content": "Text_of_your_document" }‘

After this, you will hit “send” and you will launch the call that creates the customised legal document (legal_notice) within the Consent Solution (screenshot).

In order to synchronise the new consents with this document, you will need to modify the “legal_notices" section of our LOAD / SUBMIT functions, if you use the JS method: https://www.iubenda.com/en/help/6473-consent-solution-js-documentation

In this example, in a LOAD function, we will insert the name of the newly created document after the “identifier”:
consent:{
legal_notices:[{
identifier:"name_of_newly_created_document”,
}]

If you use our WordPress plugin https://www.iubenda.com/en/help/21330-consent-solution-wordpress-plugin-installation-guide, you will just need to indicate the document to synchronise in the mapping section, specifically in the Legal Notices section, by clicking on "Add new document” (screenshot).

Don’t hesitate to contact me should you have additional questions.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.