Consents

API access to consents in Legal Monster.
https://app.legalmonster.com/api/v1/consents
This endpoint allows you to create a new consent.
Request
Response
Request
Headers
x-api-key
required
string
Your API key
Query Parameters
language
optional
string
The language code of the consent text that the user accepts (i.e. "EN" for english or "DA" for danish)
consent_method
optional
string
The method used to collect consent. (opt-in, double-opt-in or implicit-informed)
user_agent
optional
string
The browser user agent of the user
agreement_group_text
optional
string
The actual text text asking for the consent (like: I agree to the privacy policy of Legal Monster ApS)
ip
optional
string
The IP of the user who gave consent. If not defined it will be saved as the IP sending the request to our API
page_url
optional
string
The URL of the page where the consent was collected. If not defined it will be saved as the referer sending the request to our API.
email
optional
string
The e-mail of the user.
name
optional
string
The name of the user.
cta_to_consent_text
required
string
The text on the button that submitted the form.
active_consent
required
boolean
Did the user give an active consent to the terms in the documents?
identifier
required
string
Identifier to identify the current user.
document_public_key
required
string
The public_key of the document you are consenting to.
Response
204: No Content
302: Found
{ "message": "No identifier provided" }
304: Not Modified
400: Bad Request
403: Forbidden
{ "message": "API key not found" }
404: Not Found
{ "message": "Document not found" }
422: Unprocessable Entity
{ "revision": "must exist" }
https://app.legalmonster.com/api/v1/consents/withdraw
If the user wishes to withdraw his or her consent to a document use this endpoint.
Request
Response
Request
Headers
x-api-key
required
string
Your API key
Query Parameters
email
optional
string
The email of the user.
name
optional
string
The name of the user.
document_public_key
required
string
The public_key of the document that the user wishes to withdraw his or her consent from.
identifier
required
string
Identify the current user.
Response
204: No Content
403: Forbidden
{ "message": "API key not found" }
404: Not Found
{ "message": "Document not found" }
422: Unprocessable Entity
{ "message": "No identifier provided" }
https://app.legalmonster.com/api/v1/consents/withdraw_all_email_marketing_consent
Whenever a user unsubscribes from a newsletter you must use this endpoint to ensure that your audit trail is up-to-date and that the user's email marketing consent is withdrawn
Request
Response
Request
Headers
x-api-key
required
string
Your API key
Query Parameters
email
required
string
The email of the user
Response
200: OK
The request was successful, but no user found with the requested e-mail
{ "message": "No e-mail marketing consent for specified user" }
204: No Content
The request was successful and the consent is withdrawn