Document Create
Creates a new document.
JWT token to authenticate the request.
In: header
API key, sent as a request header.
In: header
Request Body
application/json
The DocumentModel payload to create. Server-managed fields (ids, timestamps, links, isDeleted) are ignored.
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/documents/document/create" \ -H "Content-Type: application/json" \ -d '{ "title": "Invoice INV-2026-000123", "urn": "e3b0c442-98fc-4e1a-8a3d-2c1b5f6e9a70", "url": "https://storage.example.com/documents/inv-2026-000123.pdf", "path": "documents/inv-2026-000123.pdf", "fileFormat": "pdf", "deliveryMethod": "Email", "succeededViewUserEmailList": "alice@example.com", "succeededEditUserEmailList": "bob@example.com", "failedViewUserEmailList": "ops@example.com", "failedEditUserEmailList": "ops@example.com" }'{ "result": { "data": { "document": { "documentGuid": "16fd2706-8baf-433b-82eb-8c7fada847da", "subscriptionGuid": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", "ownerGuid": "1a2b3c4d-5e6f-4a1b-8c2d-3e4f5a6b7c8d", "lastModifiedUserGuid": "1a2b3c4d-5e6f-4a1b-8c2d-3e4f5a6b7c8d", "title": "Invoice INV-2026-000123", "urn": "e3b0c442-98fc-4e1a-8a3d-2c1b5f6e9a70", "url": "https://storage.example.com/documents/inv-2026-000123.pdf", "path": "documents/inv-2026-000123.pdf", "fileFormat": "pdf", "deliveryMethod": "Email", "viewAnonymousLink": "", "editAnonymousLink": "", "viewUserLink": "", "editUserLink": "", "viewOrganizationLink": "", "editOrganizationLink": "", "succeededViewUserEmailList": "alice@example.com", "succeededEditUserEmailList": "bob@example.com", "failedViewUserEmailList": "ops@example.com", "failedEditUserEmailList": "ops@example.com", "createdDate": "2026-07-14T09:30:00.000Z", "lastModifiedDate": "2026-07-14T09:30:00.000Z", "isDeleted": false } }, "statusCode": 200, "message": "OK" }, "origin": "POST https://api.doctavian.com/v1/documents/document/create", "dateTime": "2026-07-14T09:30:00.000Z", "operationId": "ee0b95c80c358f2d17c60ae645210c81", "userId": "82130e15-abb8-4350-9c10-58beca60e51e"}{ "userId": "98bd2cd7-854f-4cc6-942a-b42a5692bf01", "error": { "statusCode": 400, "message": "Name is required.", "innerErrors": [ { "code": "DATA_NAME_REQUIRED", "message": "Name is required.", "userMessage": "Name is required." } ] }, "origin": "POST https://api.doctavian.com/v1/documents/document/create", "dateTime": "2026-01-02T12:34:56.000Z", "operationId": "40652611457e316f734f19a781f8af8d"}{ "error": { "statusCode": 401, "message": "The request could not be authenticated.", "innerErrors": [ { "code": "UNAUTHORIZED", "message": "The request could not be authenticated.", "userMessage": "Your session has expired or is invalid. Please sign in again." } ] }, "origin": "POST https://api.doctavian.com/v1/documents/document/create", "dateTime": "2026-01-02T12:34:56.000Z", "operationId": "3a93449dbdda127423f135138ad56644", "userId": "748b2a39-7231-4b49-832b-9ef189074a21"}{ "error": { "statusCode": 404, "message": "The requested resource was not found.", "innerErrors": [ { "code": "NOT_FOUND_BY_ID", "message": "The requested resource was not found.", "userMessage": "We couldn't find that resource. Check the id and try again." } ] }, "origin": "POST https://api.doctavian.com/v1/documents/document/create", "dateTime": "2026-01-02T12:34:56.000Z", "operationId": "19d14f828d70632c5d743bf2b078e8ed", "userId": "748b2a39-7231-4b49-832b-9ef189074a21"}{ "userId": "11695af2-7fc7-4949-aee4-47142279b379", "error": { "statusCode": 500, "message": "An unexpected error occurred.", "innerErrors": [ { "code": "GET_DATA_SOURCE_ERROR", "message": "An unexpected error occurred.", "userMessage": "An unexpected error occurred." } ] }, "origin": "POST https://api.doctavian.com/v1/documents/document/create", "dateTime": "2026-01-02T12:34:56.000Z", "operationId": "ad85a86aef12b052df3e368c95a62292"}