Documents

Document Update

PUT
/documents/document/{documentGuid}/update

Updates an existing document.

Authorization

AuthorizationBearer <token>

JWT token to authenticate the request.

In: header

X-Api-Key<token>

API key, sent as a request header.

In: header

Path Parameters

documentGuid*string

GUID of the document to update.

Formatuuid

Request Body

application/json

The DocumentModel payload to update. 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 PUT "https://example.com/documents/document/16fd2706-8baf-433b-82eb-8c7fada847da/update" \  -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": "PUT https://api.doctavian.com/v1/documents/document/{documentGuid}/update",  "dateTime": "2026-07-14T09:30:00.000Z",  "operationId": "5889a1140d99b42766a6124292a450f6",  "userId": "4cfe173d-d861-488a-b90a-451c47df524a"}
{  "userId": "e2045758-5a26-4928-904d-3e980e91471c",  "error": {    "statusCode": 400,    "message": "Name is required.",    "innerErrors": [      {        "code": "DATA_NAME_REQUIRED",        "message": "Name is required.",        "userMessage": "Name is required."      }    ]  },  "origin": "PUT https://api.doctavian.com/v1/documents/document/{documentGuid}/update",  "dateTime": "2026-01-02T12:34:56.000Z",  "operationId": "e65019c953513b590d81d17f4791ab94"}
{  "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": "PUT https://api.doctavian.com/v1/documents/document/{documentGuid}/update",  "dateTime": "2026-01-02T12:34:56.000Z",  "operationId": "25aea5d642c4dcf9c496231a5e207fab",  "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": "PUT https://api.doctavian.com/v1/documents/document/{documentGuid}/update",  "dateTime": "2026-01-02T12:34:56.000Z",  "operationId": "2a7a08414999cf1fff73337c4412570d",  "userId": "748b2a39-7231-4b49-832b-9ef189074a21"}
{  "userId": "f21081d6-71bb-460a-a2cc-b1b26fabd934",  "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": "PUT https://api.doctavian.com/v1/documents/document/{documentGuid}/update",  "dateTime": "2026-01-02T12:34:56.000Z",  "operationId": "83ace55d135415b57cc5cf994a01c9cd"}