Generate a document from its template as a new revision, or start a blank one for an uploaded document type
__Secure-guidelab-prod.session_token<token>
Production session cookie set for the guidelab.co domain by Better Auth
In: cookie
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/compliance/documents" \ -H "Content-Type: application/json" \ -d '{ "typeKey": "string" }'{ "document": { "id": "string", "typeKey": "string", "subjectKey": "string", "shared": true, "latestRevision": { "number": 1, "source": "generated", "language": "en", "templateVersion": 1, "note": "string", "createdAt": "string", "createdByName": "string", "issuedOn": "string", "expiresOn": "string", "file": { "name": "string", "contentType": "string", "sizeBytes": 0 } } }, "revision": { "number": 1, "source": "generated", "language": "en", "templateVersion": 1, "note": "string", "createdAt": "string", "createdByName": "string", "issuedOn": "string", "expiresOn": "string", "file": { "name": "string", "contentType": "string", "sizeBytes": 0 }, "content": { "version": 1, "doc": { "type": "doc", "attrs": { "property1": null, "property2": null }, "content": [ { "type": "doc", "attrs": { "property1": null, "property2": null }, "content": [], "text": "string", "marks": [ { "type": "bold" } ] } ], "text": "string", "marks": [ { "type": "bold" } ] } } }, "revisions": [ { "number": 1, "source": "generated", "language": "en", "templateVersion": 1, "note": "string", "createdAt": "string", "createdByName": "string", "issuedOn": "string", "expiresOn": "string", "file": { "name": "string", "contentType": "string", "sizeBytes": 0 } } ]}{ "document": { "id": "string", "typeKey": "string", "subjectKey": "string", "shared": true, "latestRevision": { "number": 1, "source": "generated", "language": "en", "templateVersion": 1, "note": "string", "createdAt": "string", "createdByName": "string", "issuedOn": "string", "expiresOn": "string", "file": { "name": "string", "contentType": "string", "sizeBytes": 0 } } }, "revision": { "number": 1, "source": "generated", "language": "en", "templateVersion": 1, "note": "string", "createdAt": "string", "createdByName": "string", "issuedOn": "string", "expiresOn": "string", "file": { "name": "string", "contentType": "string", "sizeBytes": 0 }, "content": { "version": 1, "doc": { "type": "doc", "attrs": { "property1": null, "property2": null }, "content": [ { "type": "doc", "attrs": { "property1": null, "property2": null }, "content": [], "text": "string", "marks": [ { "type": "bold" } ] } ], "text": "string", "marks": [ { "type": "bold" } ] } } }, "revisions": [ { "number": 1, "source": "generated", "language": "en", "templateVersion": 1, "note": "string", "createdAt": "string", "createdByName": "string", "issuedOn": "string", "expiresOn": "string", "file": { "name": "string", "contentType": "string", "sizeBytes": 0 } } ]}{ "error": "string"}{ "error": "string"}{ "error": "string"}{ "error": "string"}