Widgets

To be used in our widgets. This API set Legal Monster tracking and finds the current user, her location and the documents the user needs to consent to.

This API is intended to be used in our widgets, we have made it public to let people expand on our platform, but you should be aware that this specific API will be changed and updated more frequently than the rest of our API's. This enables us to be more agile, but also gives you an API that is less stable, so use with caution.

get
Current widget

https//app.legalmonster.com/api/v1/widgets/current
Request
Response
Query Parameters
lmsid
required
string
The current cookie value of lmsid as set by legal.js
email
optional
string
Email of the user.
name
optional
string
Name of the user.
identifier
optional
string
Identify the user.
project_public_key
required
string
The public_key of your current project.
200: OK
{
"session": {
"sid": "lkshjf"
},
"project": {
"public_key": "BGpHozcMSU6TPg6H4VvXEhEK",
"name": "Project 1"
},
"company": {
"name": "ACME, Inc."
},
"user": {
"public_key": "q3fDqfyTcfyAcqAYfam3uUoR",
"identifier": null
},
"location": {
"ip": "127.0.0.1",
"is_eu": false,
"country_name": "Unknown",
"country_code": null,
"continent_name": "Unknown",
"continent_code": null,
"created_at": "2019-03-08 12:42:29 UTC"
},
"documents": [
{
"document": {
"public_key": "EHsiBBS1LRTVbrN595JbUjGR",
"title": "Test Document"
}
},
{
"document": {
"public_key": "5pYJfscLRVXhChxrRn5BrU7e",
"title": "Test"
}
}
],
"documents_not_consented_to": [
{
"documents_not_consented_to": {
"public_key": "5pYJfscLRVXhChxrRn5BrU7e",
"title": "Test"
}
},
{
"documents_not_consented_to": {
"public_key": "EHsiBBS1LRTVbrN595JbUjGR",
"title": "Test Document"
}
}
],
"translations": {
"embed": {
"v1": {
"documents": {
"show": {
"powered_by": "Powered by"
},
"iframe": {
"new_user_title": "%{document_name}",
"new_user_button_copy": "Close"
},
"signup": {
"new_user_title": "%{document_name}",
"new_user_button_copy": "Close"
}
},
"projects": {
"signup": {
"active_consent": "I agree to the",
"missing_consent": "You must agree to our terms.",
"passive_consent": "By signing up to our service you accept our",
"two_words_connector": " and ",
"last_word_connector": ", and "
},
"list_documents_and_accept": {
"new_user_title": "%{document_name}",
"new_user_button_copy": "Accept & continue"
}
}
}
}
},
"locale": "en"
}
403: Forbidden
{ "message": "project_public_key not defined" }
404: Not Found
{ "message": "Project not found" }

get
Get document

https://app.legalmonster.com/api/v1/widgets/documents/:public_key
Important to note that this API will save a entry in the audit trail when called, it should therefor only be called with the document is showed to the end user.
Request
Response
Query Parameters
project_public_key
required
string
The public_key of your current project.
user_public_key
required
string
The public key of the user as returned from the current API.
200: OK
{
"document": {
"public_key": "EHsiBBS1LRTVbrN595JbUjGR",
"title": "Test Document",
"created_at": "2018-10-25 13:36:49 UTC",
"current_revision": {
"public_key": "WpB7B2XUGvBDFhqLeWZfxbis",
"text": "<h3>1. Terms</h3><p>By accessing the website at&nbsp;<a href="http://www.legalmonster.io/">http://www.legalmonster.io</a>, you are agreeing to be bound by these terms of service, all applicable laws and regulations, and agree that you are responsible for compliance with any applicable local laws. If you do not agree with any of these terms, you are prohibited from using or accessing this site. The materials contained in this website are protected by applicable copyright and trademark law.</p><h3>2. Use License</h3><ol type="a"><li>Permission is granted to temporarily download one copy of the materials (information or software) on Legal Monster's website for personal, non-commercial transitory viewing only. This is the grant of a license, not a transfer of title, and under this license you may not:<ol type="i"><li>modify or copy the materials;</li><li>use the materials for any commercial purpose, or for any public display (commercial or non-commercial);</li><li>attempt to decompile or reverse engineer any software contained on Legal Monster's website;</li><li>remove any copyright or other proprietary notations from the materials; or</li><li>transfer the materials to another person or "mirror" the materials on any other server.</li></ol></li><li>This license shall automatically terminate if you violate any of these restrictions and may be terminated by Legal Monster at any time. Upon terminating your viewing of these materials or upon the termination of this license, you must destroy any downloaded materials in your possession whether in electronic or printed format.</li></ol><h3>3. Disclaimer</h3><ol type="a"><li>The materials on Legal Monster's website are provided on an 'as is' basis. Legal Monster makes no warranties, expressed or implied, and hereby disclaims and negates all other warranties including, without limitation, implied warranties or conditions of merchantability, fitness for a particular purpose, or non-infringement of intellectual property or other violation of rights.</li><li>Further, Legal Monster does not warrant or make any representations concerning the accuracy, likely results, or reliability of the use of the materials on its website or otherwise relating to such materials or on any sites linked to this site.</li></ol><h3>4. Limitations</h3><p>In no event shall Legal Monster or its suppliers be liable for any damages (including, without limitation, damages for loss of data or profit, or due to business interruption) arising out of the use or inability to use the materials on Legal Monster's website, even if Legal Monster or a Legal Monster authorized representative has been notified orally or in writing of the possibility of such damage. Because some jurisdictions do not allow limitations on implied warranties, or limitations of liability for consequential or incidental damages, these limitations may not apply to you.</p><h3>5. Accuracy of materials</h3><p>The materials appearing on Legal Monster's website could include technical, typographical, or photographic errors. Legal Monster does not warrant that any of the materials on its website are accurate, complete or current. Legal Monster may make changes to the materials contained on its website at any time without notice. However Legal Monster does not make any commitment to update the materials.</p><h3>6. Links</h3><p>Legal Monster has not reviewed all of the sites linked to its website and is not responsible for the contents of any such linked site. The inclusion of any link does not imply endorsement by Legal Monster of the site. Use of any such linked website is at the user's own risk.</p><h3>7. Modifications</h3><p>Legal Monster may revise these terms of service for its website at any time without notice. By using this website you are agreeing to be bound by the then current version of these terms of service.</p><h3>8. Governing Law</h3><p>These terms and conditions are governed by and construed in accordance with the laws of Denmark and you irrevocably submit to the exclusive jurisdiction of the courts in that State or location.</p><section><p>This policy is effective as of 1 June 2018.</p></section>",
"created_at": "2019-01-18 08:48:13 UTC",
"updated_at": "2019-01-18 08:48:16 UTC"
}
}
https://app.legalmonster.com/api/v1/widgets/consents/to_all
Request
Response
Query Parameters
active_consent
required
string
Did the user give active consent? True or False.
cta_to_consent_text
required
string
The text that was presented to the user when consent was collected.
user_public_key
required
string
The public_key of your current user.
project_public_key
required
string
The public_key of your current project.
200: OK
{
"consents": [
{
"id": 5041,
"user_id": 5044,
"revision_id": 7,
"consentet_to_text": "<h3>1. Terms</h3><p>By accessing the website at&nbsp;<a href="http://www.legalmonster.io/">http://www.legalmonster.io</a>, you are agreeing to be bound by these terms of service, all applicable laws and regulations, and agree that you are responsible for compliance with any applicable local laws. If you do not agree with any of these terms, you are prohibited from using or accessing this site. The materials contained in this website are protected by applicable copyright and trademark law.</p><h3>2. Use License</h3><ol type="a"><li>Permission is granted to temporarily download one copy of the materials (information or software) on Legal Monster's website for personal, non-commercial transitory viewing only. This is the grant of a license, not a transfer of title, and under this license you may not:<ol type="i"><li>modify or copy the materials;</li><li>use the materials for any commercial purpose, or for any public display (commercial or non-commercial);</li><li>attempt to decompile or reverse engineer any software contained on Legal Monster's website;</li><li>remove any copyright or other proprietary notations from the materials; or</li><li>transfer the materials to another person or "mirror" the materials on any other server.</li></ol></li><li>This license shall automatically terminate if you violate any of these restrictions and may be terminated by Legal Monster at any time. Upon terminating your viewing of these materials or upon the termination of this license, you must destroy any downloaded materials in your possession whether in electronic or printed format.</li></ol><h3>3. Disclaimer</h3><ol type="a"><li>The materials on Legal Monster's website are provided on an 'as is' basis. Legal Monster makes no warranties, expressed or implied, and hereby disclaims and negates all other warranties including, without limitation, implied warranties or conditions of merchantability, fitness for a particular purpose, or non-infringement of intellectual property or other violation of rights.</li><li>Further, Legal Monster does not warrant or make any representations concerning the accuracy, likely results, or reliability of the use of the materials on its website or otherwise relating to such materials or on any sites linked to this site.</li></ol><h3>4. Limitations</h3><p>In no event shall Legal Monster or its suppliers be liable for any damages (including, without limitation, damages for loss of data or profit, or due to business interruption) arising out of the use or inability to use the materials on Legal Monster's website, even if Legal Monster or a Legal Monster authorized representative has been notified orally or in writing of the possibility of such damage. Because some jurisdictions do not allow limitations on implied warranties, or limitations of liability for consequential or incidental damages, these limitations may not apply to you.</p><h3>5. Accuracy of materials</h3><p>The materials appearing on Legal Monster's website could include technical, typographical, or photographic errors. Legal Monster does not warrant that any of the materials on its website are accurate, complete or current. Legal Monster may make changes to the materials contained on its website at any time without notice. However Legal Monster does not make any commitment to update the materials.</p><h3>6. Links</h3><p>Legal Monster has not reviewed all of the sites linked to its website and is not responsible for the contents of any such linked site. The inclusion of any link does not imply endorsement by Legal Monster of the site. Use of any such linked website is at the user's own risk.</p><h3>7. Modifications</h3><p>Legal Monster may revise these terms of service for its website at any time without notice. By using this website you are agreeing to be bound by the then current version of these terms of service.</p><h3>8. Governing Law</h3><p>These terms and conditions are governed by and construed in accordance with the laws of Denmark and you irrevocably submit to the exclusive jurisdiction of the courts in that State or location.</p><section><p>This policy is effective as of 1 June 2018.</p></section>",
"ip": "127.0.0.1",
"source": "Embedded",
"created_at": "2019-03-07T14:03:25.913Z",
"updated_at": "2019-03-07T14:03:25.925Z",
"referer": null,
"state": "active",
"withdrawn_at": null,
"public_key": "fWRs6spGsFQEcT1hkXqy8Tg6",
"document_id": 1,
"project_id": 1,
"active_consent": false,
"cta_to_consent_text": null
},
{
"id": 5042,
"user_id": 5044,
"revision_id": 6,
"consentet_to_text": "<p>This is a te</p><p><br></p><p><table cellpadding="5" border="1" class="table table-bordered"> <tr> <th>Subprocessor</th> <th>Purpose</th> </tr> <tr> <td> Temp </td> <td> <p><br>Personal information shared: Bahh, </p> </td> </tr> </table> </p>",
"ip": "127.0.0.1",
"source": "Embedded",
"created_at": "2019-03-07T14:03:25.992Z",
"updated_at": "2019-03-07T14:03:26.001Z",
"referer": null,
"state": "active",
"withdrawn_at": null,
"public_key": "ZJu9ERQJzkUYwF9mtJDMbUCZ",
"document_id": 3,
"project_id": 1,
"active_consent": false,
"cta_to_consent_text": null
}
],
}
https://app.legalmonster.com/api/v1/widgets/consents
Request
Response
Query Parameters
revision_public_key
required
string
The public_key of the revision the user is giving consent to.
active_consent
required
string
Did the user give active consent? True or False.
cta_to_consent_text
required
string
The text that was presented to the user when consent was collected.
user_public_key
required
string
The public_key of the your current user.
project_public_key
required
string
The public_key of your current project.
200: OK

post
Update user

https://app.legalmonster.com/api/v1/widgets/users/:user_public_key
Request
Response
Query Parameters
project_public_key
required
string
The public_key of your current project
name
optional
string
The name of the user.
email
optional
string
The email of the user.
200: OK