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
Headers
x-api-key
required
string
You API key
Query Parameters
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 CTA where the user gave consent.
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.
200: OK
Cake successfully retrieved.
{
"consent"=> {
"public_key"=>"3NmuXfi3Qt94t1Y8ZkoUzrzs",
"state"=>"active",
"consentet_to_text"=>"<h1>Lorem ipsum dolor sit 17</h1>",
"ip"=>"0.0.0.0",
"source"=>"API",
"created_at"=>"2018-08-21T17:02:10.099Z",
"active_consent": true,
"cta_to_consent_text": "By signing up to this service you consent to our terms."
}
}
302: Found
{ "message": "No identifier provided" }
403: Forbidden
{ "message": "API key not found" }
404: Not Found
Could not find a cake matching this query.
{ "message": "Document not found" }
422: Unprocessable Entity
{ "revision": "must exist" }
https://app.legalmonster.com/api/v1/consent/withdraw
If the user wishes to withdraw his or her consent to a document use this endpoint.
Request
Response
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.
200: OK
[
{
"consent":{
"public_key":"K2jUXEgVksCtBjMBA13hAtqc",
"state":"withdrawn",
"consentet_to_text":"<h1>Lorem ipsum dolor sit 5</h1>",
"ip":"0.0.0.0",
"source":"API",
"created_at":"2018-08-22T14:57:39.191Z"
}
}
]
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/to_all_documents
Consent to all documents with one API call.
Request
Response
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.
cta_to_consent_text
required
string
The CTA in connection with collecting the consent.
active_consent
required
boolean
Did the user give active consent? If yes true, if no, false.
identifier
required
string
The users identifier.
200: OK
[
{
"consent": {
"public_key":"3NmuXfi3Qt94t1Y8ZkoUzrzs",
"state":"active",
"consentet_to_text":"<h1>Lorem ipsum dolor sit 17</h1>",
"ip":"0.0.0.0",
"source":"API",
"created_at":"2018-08-21T17:02:10.099Z",
"active_consent": true,
"cta_to_consent_text": "By signing up to this service you consent to our terms."
}
},
{
"consent": {
"public_key":"BanBi7xmUgsyd7athLqgqPnW",
"state":"active",
"consentet_to_text":"<h1>Lorem ipsum dolor sit 21</h1>",
"ip":"0.0.0.0",
"source":"API",
"created_at":"2018-08-21T17:02:10.099Z",
"active_consent": true,
"cta_to_consent_text": "By signing up to this service you consent to our terms."
}
}
]
403: Forbidden
{ "message": "API key not found" }
422: Unprocessable Entity
{ "message": "No identifier provided" }