Upload an issued document as the next revision
Multipart form with `typeKey`, optional `subjectKey`, `file` (PDF, PNG, JPEG or WebP, up to 20 MB) and optional `issuedOn`, `expiresOn` (YYYY-MM-DD) and `note`. The type is read from the file's content, never from its name.
Multipart form with typeKey, optional subjectKey, file (PDF, PNG, JPEG or WebP, up to 20 MB) and optional issuedOn, expiresOn (YYYY-MM-DD) and note. The type is read from the file's content, never from its name.
__Secure-guidelab-prod.session_token<token>
Production session cookie set for the guidelab.co domain by Better Auth
In: cookie
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/compliance/uploads"{ "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"}