# Documents (V1)

Documents endpoints

## Returns a list of documents based on filter criteria

 - [GET /v1/documents](https://papidocs.hs1api.com/publicapi/api-document-management/documents-(v1)/getdocumentsv1.md): Query shape: Prefer a narrow filter—combine scoping filters with lastModified or date bounds where supported. A very wide date range with no other scoping can 408 (timeout) on large tenants; retry with a smaller window or use cursor pagination (lastId with lastModified—see parameter descriptions).

Empty results: 200 with data: [] means no documents matched; it does not indicate invalid filter values.

responseFields: Use only names allowed on this operation (see the responseFields parameter). Use ALL or the documented flat field list.

Pagination: The page query parameter is deprecated where lastId is supported; lastModified / lastId style pagination is preferred.

## Returns document which has been created

 - [POST /v1/documents](https://papidocs.hs1api.com/publicapi/api-document-management/documents-(v1)/postdocumentsv1.md): Creates a resource from the request body. Validation errors return 400; a successful create returns 201 with the created resource in data. S3 storage failures return 500.

## Returns a document by documentId.

 - [GET /v1/documents/{documentId}](https://papidocs.hs1api.com/publicapi/api-document-management/documents-(v1)/getdocumentsbydocumentidv1.md): Returns the document identified by the path parameter. 404 when the resource is missing or not accessible in the organization context.

## Returns the updated document.

 - [PUT /v1/documents/{documentId}](https://papidocs.hs1api.com/publicapi/api-document-management/documents-(v1)/putdocumentsbydocumentidv1.md): Updates the resource identified by the path parameter. Validation errors return 400; 404 when the resource is missing.

## Delete desired document by ID

 - [DELETE /v1/documents/{documentId}](https://papidocs.hs1api.com/publicapi/api-document-management/documents-(v1)/deletedocumentsbydocumentidv1.md): Permanently deletes the document, its tags, and stored file content. 404 when the resource is missing or already deleted.

