Documents

get
Get all documents

https://app.legalmonster.com/api/v1/documents
List all published documents from current project.
Request
Response
Headers
x-api-key
required
string
Your API key
Query Parameters
email
optional
string
Email of the user.
name
optional
string
Name of the user.
identifier
optional
string
The identifier of the user.
200: OK
Cake successfully retrieved.
[
{
"document": {
"public_key":"zjdBfMN2iXtCQ2DP2cnr7RNy",
"title":"Title 105",
"created_at":"2018-08-21T16:32:18.364Z",
"updated_at":"2018-08-21T16:32:18.364Z",
"revisions":[
{
"revision":{
"text":"<h1>Lorem ipsum dolor sit 105</h1>",
"created_at":"2018-08-21T16:32:18.369Z",
"updated_at":"2018-08-21T16:32:18.369Z"
}
}
]
}
},
{
"document": {
"public_key":"Ytnno6vZkcb1CmiCkM7qQDAb",
"title":"Title 106",
"created_at":"2018-08-21T16:32:18.372Z",
"updated_at":"2018-08-21T16:32:18.372Z",
"revisions":[
{
"revision": {
"text":"<h1>Lorem ipsum dolor sit 106</h1>",
"created_at":"2018-08-21T16:32:18.375Z",
"updated_at":"2018-08-21T16:32:18.375Z"
}
}
]
}
}
]
403: Forbidden
Could not find a cake matching this query.
{ "message": "API key not found" }

get
Show document

https://app.legalmonster.com/api/v1/documents/:public_key
Request
Response
Path Parameters
public_key
required
string
The public key of the document.
Headers
x-api-key
required
string
‚Äč
Query Parameters
email
optional
string
The email of the user.
name
optional
string
The name of the user.
identifier
optional
string
The identifier of the user.
200: OK
{
"document": {
"public_key":"5ejwvx7xTvLDP92cxSzJ4Ls3",
"title":"Title 5",
"created_at":"2018-08-21T16:37:37.865Z",
"current_revision":{
"text":"<h1>Lorem ipsum dolor sit 5</h1>",
"created_at":"2018-08-21T16:37:37.871Z",
"updated_at":"2018-08-21T16:37:37.871Z"
},
"user": {
"public_key":"gfZFHFCtYRZ4JB77Mu8aPr2e",
"name":"test user",
"email":"email@legalmonster.io",
"identifier":"user-identifier",
"consented_to_latest_revision":false
},
"revisions": [
{
"revision":{
"text":"<h1>Lorem ipsum dolor sit 5</h1>",
"created_at":"2018-08-21T16:37:37.871Z",
"updated_at":"2018-08-21T16:37:37.871Z"
}
}
]
}
}
302: Found
{ "message": "API key not found" }
304: Not Modified
{ "message": "Document not found" }
404: Not Found
{ "message": "Document has no revisions yet" }