> For the complete documentation index, see [llms.txt](https://developer.jylo.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.jylo.ai/api-reference/projects/documents.md).

# Documents

## Get all documents for a project.

> Retrieves a paginated list of documents for the specified project, optionally filtered and sorted.

```json
{"openapi":"3.0.4","info":{"title":"Project API","version":"v1"},"servers":[{"url":"https://api.{tenant}.{region}.jylo.ai","variables":{"tenant":{"default":"example","description":"Tenant name"},"region":{"default":"uk","description":"Region","enum":["uk","us","eu","au","jp"]}}}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Bearer authentication with JWT","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Jylo.Toolkit.Constants.DocumentIndexingStatus":{"enum":["completed","failed","inProgress"],"type":"string"},"Jylo.Toolkit.Sorting.ItemSorting":{"enum":["dateAdded","name","description","isDirectory","playbookName","projectName","extension","size","pageCount","isAdminACL","documentsCount","totalFileSizeBytes","promptCount","estimatedTokenCount","latestMessageDate","flowsCount","orgWide","flowCredits","assistantsCount","assistantCredits","pages","fileCreditsCost","ocrCreditsCost","layoutCreditsCost","totalCredits","loginsCount","lastLoginDate","playbookDescription"],"type":"string"},"PaginationListModel.DocumentReadModel":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentReadModel"},"nullable":true},"totalCount":{"type":"integer","format":"int32"}},"additionalProperties":false},"Jylo.Toolkit.API.Models.Documents.DocumentReadModel":{"required":["documentUploadObjectIdentifier","name"],"type":"object","properties":{"name":{"type":"string","nullable":true},"parentObjectIdentifier":{"type":"string","format":"uuid","nullable":true},"isDirectory":{"type":"boolean"},"documentUploadObjectIdentifier":{"type":"string","format":"uuid"},"contentType":{"type":"string","nullable":true},"size":{"type":"integer","format":"int64","nullable":true},"objectIdentifier":{"type":"string","format":"uuid"},"dateAdded":{"type":"string","format":"date-time"},"uploadSuccessful":{"type":"boolean","nullable":true},"tokenCount":{"type":"integer","format":"int64","nullable":true},"metadataTokenCount":{"type":"integer","format":"int64","nullable":true},"indexingNotPossible":{"type":"boolean","nullable":true},"unsupportedFileType":{"type":"boolean","nullable":true},"unPackingComplete":{"type":"boolean","nullable":true},"unPackingFailed":{"type":"boolean","nullable":true},"uploadInProgress":{"type":"boolean","nullable":true},"url":{"type":"string","nullable":true},"hasChildren":{"type":"boolean","nullable":true},"extension":{"type":"string","nullable":true},"convertedToPdf":{"type":"boolean"},"fileType":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.FileType"},"uploadFailedReason":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.UploadFailedReason"},"resourceOwner":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.OrganizationMemberModel"},"progress":{"type":"number","format":"double","nullable":true},"path":{"type":"string","nullable":true},"parent":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.BreadcrumbModel"},"ocrStrategy":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.OCRStrategy"},"ocrEngine":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.OCREngine"},"coordinateExtractionStrategy":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.CoordinateExtractionStrategy"},"documentUploadSource":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.DocumentUploadSource"},"pageCount":{"type":"integer","format":"int32","nullable":true},"metadata":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentMetadataReadModel"},"nullable":true}},"additionalProperties":false},"Jylo.Toolkit.Constants.FileType":{"enum":["unknown","image","video","text","audio","directory"],"type":"string"},"Jylo.Toolkit.Constants.UploadFailedReason":{"enum":["outOfMemory","unsupportedFileType","badFile","uploadFailure","ocrPageLimitExceeded","unknownException","insufficientCredits","maliciousFile","fileScanTimedOut"],"type":"string"},"Jylo.Toolkit.API.Models.OrganizationMemberModel":{"required":["id","name"],"type":"object","properties":{"email":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"id":{"type":"string","nullable":true}},"additionalProperties":false},"Jylo.Toolkit.API.Models.BreadcrumbModel":{"required":["name"],"type":"object","properties":{"objectIdentifier":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true},"isDirectory":{"type":"boolean"}},"additionalProperties":false},"Jylo.Toolkit.Constants.OCRStrategy":{"enum":["never","detect","always"],"type":"string"},"Jylo.Toolkit.Constants.OCREngine":{"enum":["azureDocumentIntelligence","aspose"],"type":"string"},"Jylo.Toolkit.Constants.CoordinateExtractionStrategy":{"enum":["never","apryse","azureDocumentIntelligence","spreadsheet"],"type":"string"},"Jylo.Toolkit.Constants.DocumentUploadSource":{"enum":["local","iManage","sharePoint"],"type":"string"},"Jylo.Toolkit.API.Models.Documents.DocumentMetadataReadModel":{"type":"object","properties":{"objectIdentifier":{"type":"string","format":"uuid"},"key":{"type":"string","nullable":true},"value":{"type":"string","nullable":true}},"additionalProperties":false},"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/projects/{projectIdentifier}/documents":{"get":{"tags":["Documents"],"summary":"Get all documents for a project.","description":"Retrieves a paginated list of documents for the specified project, optionally filtered and sorted.","parameters":[{"name":"pageNumber","in":"query","schema":{"type":"integer","format":"int32"}},{"name":"parentObjectIdentifier","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"flattenList","in":"query","schema":{"type":"boolean"}},{"name":"pageSize","in":"query","schema":{"type":"integer","format":"int32"}},{"name":"searchText","in":"query","schema":{"type":"string"}},{"name":"hidePackagedFiles","in":"query","schema":{"type":"boolean","default":true}},{"name":"includePath","in":"query","schema":{"type":"boolean","default":false}},{"name":"indexingStatus","in":"query","schema":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.DocumentIndexingStatus"}},{"name":"uploadObjectIdentifier","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"sorting","in":"query","schema":{"$ref":"#/components/schemas/Jylo.Toolkit.Sorting.ItemSorting"}},{"name":"desc","in":"query","schema":{"type":"boolean","default":true}},{"name":"projectIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/PaginationListModel.DocumentReadModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/PaginationListModel.DocumentReadModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/PaginationListModel.DocumentReadModel"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## Upload a new document.

> Uploads a new document to the specified project.

```json
{"openapi":"3.0.4","info":{"title":"Project API","version":"v1"},"servers":[{"url":"https://api.{tenant}.{region}.jylo.ai","variables":{"tenant":{"default":"example","description":"Tenant name"},"region":{"default":"uk","description":"Region","enum":["uk","us","eu","au","jp"]}}}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Bearer authentication with JWT","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Jylo.Toolkit.Constants.DocumentUploadSource":{"enum":["local","iManage","sharePoint"],"type":"string"},"Jylo.Toolkit.Constants.OCREngine":{"enum":["azureDocumentIntelligence","aspose"],"type":"string"},"Jylo.Toolkit.Constants.OCRStrategy":{"enum":["never","detect","always"],"type":"string"},"Jylo.Toolkit.Constants.CoordinateExtractionStrategy":{"enum":["never","apryse","azureDocumentIntelligence","spreadsheet"],"type":"string"},"Jylo.Toolkit.API.Models.Documents.DocumentReadModel":{"required":["documentUploadObjectIdentifier","name"],"type":"object","properties":{"name":{"type":"string","nullable":true},"parentObjectIdentifier":{"type":"string","format":"uuid","nullable":true},"isDirectory":{"type":"boolean"},"documentUploadObjectIdentifier":{"type":"string","format":"uuid"},"contentType":{"type":"string","nullable":true},"size":{"type":"integer","format":"int64","nullable":true},"objectIdentifier":{"type":"string","format":"uuid"},"dateAdded":{"type":"string","format":"date-time"},"uploadSuccessful":{"type":"boolean","nullable":true},"tokenCount":{"type":"integer","format":"int64","nullable":true},"metadataTokenCount":{"type":"integer","format":"int64","nullable":true},"indexingNotPossible":{"type":"boolean","nullable":true},"unsupportedFileType":{"type":"boolean","nullable":true},"unPackingComplete":{"type":"boolean","nullable":true},"unPackingFailed":{"type":"boolean","nullable":true},"uploadInProgress":{"type":"boolean","nullable":true},"url":{"type":"string","nullable":true},"hasChildren":{"type":"boolean","nullable":true},"extension":{"type":"string","nullable":true},"convertedToPdf":{"type":"boolean"},"fileType":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.FileType"},"uploadFailedReason":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.UploadFailedReason"},"resourceOwner":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.OrganizationMemberModel"},"progress":{"type":"number","format":"double","nullable":true},"path":{"type":"string","nullable":true},"parent":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.BreadcrumbModel"},"ocrStrategy":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.OCRStrategy"},"ocrEngine":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.OCREngine"},"coordinateExtractionStrategy":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.CoordinateExtractionStrategy"},"documentUploadSource":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.DocumentUploadSource"},"pageCount":{"type":"integer","format":"int32","nullable":true},"metadata":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentMetadataReadModel"},"nullable":true}},"additionalProperties":false},"Jylo.Toolkit.Constants.FileType":{"enum":["unknown","image","video","text","audio","directory"],"type":"string"},"Jylo.Toolkit.Constants.UploadFailedReason":{"enum":["outOfMemory","unsupportedFileType","badFile","uploadFailure","ocrPageLimitExceeded","unknownException","insufficientCredits","maliciousFile","fileScanTimedOut"],"type":"string"},"Jylo.Toolkit.API.Models.OrganizationMemberModel":{"required":["id","name"],"type":"object","properties":{"email":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"id":{"type":"string","nullable":true}},"additionalProperties":false},"Jylo.Toolkit.API.Models.BreadcrumbModel":{"required":["name"],"type":"object","properties":{"objectIdentifier":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true},"isDirectory":{"type":"boolean"}},"additionalProperties":false},"Jylo.Toolkit.API.Models.Documents.DocumentMetadataReadModel":{"type":"object","properties":{"objectIdentifier":{"type":"string","format":"uuid"},"key":{"type":"string","nullable":true},"value":{"type":"string","nullable":true}},"additionalProperties":false},"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/projects/{projectIdentifier}/documents":{"post":{"tags":["Documents"],"summary":"Upload a new document.","description":"Uploads a new document to the specified project.","parameters":[{"name":"parentObjectIdentifier","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"documentUploadIdentifier","in":"query","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"source","in":"query","schema":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.DocumentUploadSource"}},{"name":"projectIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"},"ocrEngine":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.OCREngine"},"ocrStrategy":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.OCRStrategy"},"coordinateExtractionStrategy":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.CoordinateExtractionStrategy"},"metadataJson":{"type":"string"}}},"encoding":{"file":{"style":"form"},"ocrEngine":{"style":"form"},"ocrStrategy":{"style":"form"},"coordinateExtractionStrategy":{"style":"form"},"metadataJson":{"style":"form"}}}}},"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentReadModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentReadModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentReadModel"}}}},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## Record a failed document upload attempt.

> Records a failed document upload attempt for the specified project.

```json
{"openapi":"3.0.4","info":{"title":"Project API","version":"v1"},"servers":[{"url":"https://api.{tenant}.{region}.jylo.ai","variables":{"tenant":{"default":"example","description":"Tenant name"},"region":{"default":"uk","description":"Region","enum":["uk","us","eu","au","jp"]}}}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Bearer authentication with JWT","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Jylo.Toolkit.API.Models.Documents.FailedDocumentUploadModel":{"required":["contentType","fileName"],"type":"object","properties":{"fileName":{"type":"string","nullable":true},"contentType":{"type":"string","nullable":true},"size":{"type":"integer","format":"int32"},"documentUploadObjectIdentifier":{"type":"string","format":"uuid"},"parentObjectIdentifier":{"type":"string","format":"uuid","nullable":true}},"additionalProperties":false},"Jylo.Toolkit.API.Models.Documents.DocumentReadModel":{"required":["documentUploadObjectIdentifier","name"],"type":"object","properties":{"name":{"type":"string","nullable":true},"parentObjectIdentifier":{"type":"string","format":"uuid","nullable":true},"isDirectory":{"type":"boolean"},"documentUploadObjectIdentifier":{"type":"string","format":"uuid"},"contentType":{"type":"string","nullable":true},"size":{"type":"integer","format":"int64","nullable":true},"objectIdentifier":{"type":"string","format":"uuid"},"dateAdded":{"type":"string","format":"date-time"},"uploadSuccessful":{"type":"boolean","nullable":true},"tokenCount":{"type":"integer","format":"int64","nullable":true},"metadataTokenCount":{"type":"integer","format":"int64","nullable":true},"indexingNotPossible":{"type":"boolean","nullable":true},"unsupportedFileType":{"type":"boolean","nullable":true},"unPackingComplete":{"type":"boolean","nullable":true},"unPackingFailed":{"type":"boolean","nullable":true},"uploadInProgress":{"type":"boolean","nullable":true},"url":{"type":"string","nullable":true},"hasChildren":{"type":"boolean","nullable":true},"extension":{"type":"string","nullable":true},"convertedToPdf":{"type":"boolean"},"fileType":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.FileType"},"uploadFailedReason":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.UploadFailedReason"},"resourceOwner":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.OrganizationMemberModel"},"progress":{"type":"number","format":"double","nullable":true},"path":{"type":"string","nullable":true},"parent":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.BreadcrumbModel"},"ocrStrategy":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.OCRStrategy"},"ocrEngine":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.OCREngine"},"coordinateExtractionStrategy":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.CoordinateExtractionStrategy"},"documentUploadSource":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.DocumentUploadSource"},"pageCount":{"type":"integer","format":"int32","nullable":true},"metadata":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentMetadataReadModel"},"nullable":true}},"additionalProperties":false},"Jylo.Toolkit.Constants.FileType":{"enum":["unknown","image","video","text","audio","directory"],"type":"string"},"Jylo.Toolkit.Constants.UploadFailedReason":{"enum":["outOfMemory","unsupportedFileType","badFile","uploadFailure","ocrPageLimitExceeded","unknownException","insufficientCredits","maliciousFile","fileScanTimedOut"],"type":"string"},"Jylo.Toolkit.API.Models.OrganizationMemberModel":{"required":["id","name"],"type":"object","properties":{"email":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"id":{"type":"string","nullable":true}},"additionalProperties":false},"Jylo.Toolkit.API.Models.BreadcrumbModel":{"required":["name"],"type":"object","properties":{"objectIdentifier":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true},"isDirectory":{"type":"boolean"}},"additionalProperties":false},"Jylo.Toolkit.Constants.OCRStrategy":{"enum":["never","detect","always"],"type":"string"},"Jylo.Toolkit.Constants.OCREngine":{"enum":["azureDocumentIntelligence","aspose"],"type":"string"},"Jylo.Toolkit.Constants.CoordinateExtractionStrategy":{"enum":["never","apryse","azureDocumentIntelligence","spreadsheet"],"type":"string"},"Jylo.Toolkit.Constants.DocumentUploadSource":{"enum":["local","iManage","sharePoint"],"type":"string"},"Jylo.Toolkit.API.Models.Documents.DocumentMetadataReadModel":{"type":"object","properties":{"objectIdentifier":{"type":"string","format":"uuid"},"key":{"type":"string","nullable":true},"value":{"type":"string","nullable":true}},"additionalProperties":false},"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/projects/{projectIdentifier}/documents/failed":{"post":{"tags":["Documents"],"summary":"Record a failed document upload attempt.","description":"Records a failed document upload attempt for the specified project.","parameters":[{"name":"projectIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.FailedDocumentUploadModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.FailedDocumentUploadModel"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.FailedDocumentUploadModel"}}}},"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentReadModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentReadModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentReadModel"}}}},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## Mark a chunk upload as failed.

> Marks a partial document upload as failed in the specified project.

```json
{"openapi":"3.0.4","info":{"title":"Project API","version":"v1"},"servers":[{"url":"https://api.{tenant}.{region}.jylo.ai","variables":{"tenant":{"default":"example","description":"Tenant name"},"region":{"default":"uk","description":"Region","enum":["uk","us","eu","au","jp"]}}}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Bearer authentication with JWT","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Jylo.Toolkit.API.Models.Documents.DocumentReadModel":{"required":["documentUploadObjectIdentifier","name"],"type":"object","properties":{"name":{"type":"string","nullable":true},"parentObjectIdentifier":{"type":"string","format":"uuid","nullable":true},"isDirectory":{"type":"boolean"},"documentUploadObjectIdentifier":{"type":"string","format":"uuid"},"contentType":{"type":"string","nullable":true},"size":{"type":"integer","format":"int64","nullable":true},"objectIdentifier":{"type":"string","format":"uuid"},"dateAdded":{"type":"string","format":"date-time"},"uploadSuccessful":{"type":"boolean","nullable":true},"tokenCount":{"type":"integer","format":"int64","nullable":true},"metadataTokenCount":{"type":"integer","format":"int64","nullable":true},"indexingNotPossible":{"type":"boolean","nullable":true},"unsupportedFileType":{"type":"boolean","nullable":true},"unPackingComplete":{"type":"boolean","nullable":true},"unPackingFailed":{"type":"boolean","nullable":true},"uploadInProgress":{"type":"boolean","nullable":true},"url":{"type":"string","nullable":true},"hasChildren":{"type":"boolean","nullable":true},"extension":{"type":"string","nullable":true},"convertedToPdf":{"type":"boolean"},"fileType":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.FileType"},"uploadFailedReason":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.UploadFailedReason"},"resourceOwner":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.OrganizationMemberModel"},"progress":{"type":"number","format":"double","nullable":true},"path":{"type":"string","nullable":true},"parent":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.BreadcrumbModel"},"ocrStrategy":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.OCRStrategy"},"ocrEngine":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.OCREngine"},"coordinateExtractionStrategy":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.CoordinateExtractionStrategy"},"documentUploadSource":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.DocumentUploadSource"},"pageCount":{"type":"integer","format":"int32","nullable":true},"metadata":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentMetadataReadModel"},"nullable":true}},"additionalProperties":false},"Jylo.Toolkit.Constants.FileType":{"enum":["unknown","image","video","text","audio","directory"],"type":"string"},"Jylo.Toolkit.Constants.UploadFailedReason":{"enum":["outOfMemory","unsupportedFileType","badFile","uploadFailure","ocrPageLimitExceeded","unknownException","insufficientCredits","maliciousFile","fileScanTimedOut"],"type":"string"},"Jylo.Toolkit.API.Models.OrganizationMemberModel":{"required":["id","name"],"type":"object","properties":{"email":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"id":{"type":"string","nullable":true}},"additionalProperties":false},"Jylo.Toolkit.API.Models.BreadcrumbModel":{"required":["name"],"type":"object","properties":{"objectIdentifier":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true},"isDirectory":{"type":"boolean"}},"additionalProperties":false},"Jylo.Toolkit.Constants.OCRStrategy":{"enum":["never","detect","always"],"type":"string"},"Jylo.Toolkit.Constants.OCREngine":{"enum":["azureDocumentIntelligence","aspose"],"type":"string"},"Jylo.Toolkit.Constants.CoordinateExtractionStrategy":{"enum":["never","apryse","azureDocumentIntelligence","spreadsheet"],"type":"string"},"Jylo.Toolkit.Constants.DocumentUploadSource":{"enum":["local","iManage","sharePoint"],"type":"string"},"Jylo.Toolkit.API.Models.Documents.DocumentMetadataReadModel":{"type":"object","properties":{"objectIdentifier":{"type":"string","format":"uuid"},"key":{"type":"string","nullable":true},"value":{"type":"string","nullable":true}},"additionalProperties":false},"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/projects/{projectIdentifier}/documents/{documentObjectIdentifier}/failed-chunk":{"post":{"tags":["Documents"],"summary":"Mark a chunk upload as failed.","description":"Marks a partial document upload as failed in the specified project.","parameters":[{"name":"documentObjectIdentifier","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"projectIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentReadModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentReadModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentReadModel"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## Create an empty document record.

> Creates an empty document record in the specified project.

```json
{"openapi":"3.0.4","info":{"title":"Project API","version":"v1"},"servers":[{"url":"https://api.{tenant}.{region}.jylo.ai","variables":{"tenant":{"default":"example","description":"Tenant name"},"region":{"default":"uk","description":"Region","enum":["uk","us","eu","au","jp"]}}}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Bearer authentication with JWT","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Jylo.Toolkit.API.Models.Documents.CreateEmptyDocumentModel":{"required":["contentType","fileName","uploadSettings"],"type":"object","properties":{"metadataJson":{"type":"string","nullable":true},"uploadSettings":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.UploadSettingsModel"},"fileName":{"type":"string","nullable":true},"contentType":{"type":"string","nullable":true},"documentUploadIdentifier":{"type":"string","format":"uuid"},"source":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.DocumentUploadSource"},"parentObjectIdentifier":{"type":"string","format":"uuid","nullable":true}},"additionalProperties":false},"Jylo.Toolkit.API.Models.Documents.UploadSettingsModel":{"type":"object","properties":{"ocrEngine":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.OCREngine"},"ocrStrategy":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.OCRStrategy"},"coordinateExtractionStrategy":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.CoordinateExtractionStrategy"}},"additionalProperties":false},"Jylo.Toolkit.Constants.OCREngine":{"enum":["azureDocumentIntelligence","aspose"],"type":"string"},"Jylo.Toolkit.Constants.OCRStrategy":{"enum":["never","detect","always"],"type":"string"},"Jylo.Toolkit.Constants.CoordinateExtractionStrategy":{"enum":["never","apryse","azureDocumentIntelligence","spreadsheet"],"type":"string"},"Jylo.Toolkit.Constants.DocumentUploadSource":{"enum":["local","iManage","sharePoint"],"type":"string"},"Jylo.Toolkit.API.Models.Documents.DocumentReadModel":{"required":["documentUploadObjectIdentifier","name"],"type":"object","properties":{"name":{"type":"string","nullable":true},"parentObjectIdentifier":{"type":"string","format":"uuid","nullable":true},"isDirectory":{"type":"boolean"},"documentUploadObjectIdentifier":{"type":"string","format":"uuid"},"contentType":{"type":"string","nullable":true},"size":{"type":"integer","format":"int64","nullable":true},"objectIdentifier":{"type":"string","format":"uuid"},"dateAdded":{"type":"string","format":"date-time"},"uploadSuccessful":{"type":"boolean","nullable":true},"tokenCount":{"type":"integer","format":"int64","nullable":true},"metadataTokenCount":{"type":"integer","format":"int64","nullable":true},"indexingNotPossible":{"type":"boolean","nullable":true},"unsupportedFileType":{"type":"boolean","nullable":true},"unPackingComplete":{"type":"boolean","nullable":true},"unPackingFailed":{"type":"boolean","nullable":true},"uploadInProgress":{"type":"boolean","nullable":true},"url":{"type":"string","nullable":true},"hasChildren":{"type":"boolean","nullable":true},"extension":{"type":"string","nullable":true},"convertedToPdf":{"type":"boolean"},"fileType":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.FileType"},"uploadFailedReason":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.UploadFailedReason"},"resourceOwner":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.OrganizationMemberModel"},"progress":{"type":"number","format":"double","nullable":true},"path":{"type":"string","nullable":true},"parent":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.BreadcrumbModel"},"ocrStrategy":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.OCRStrategy"},"ocrEngine":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.OCREngine"},"coordinateExtractionStrategy":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.CoordinateExtractionStrategy"},"documentUploadSource":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.DocumentUploadSource"},"pageCount":{"type":"integer","format":"int32","nullable":true},"metadata":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentMetadataReadModel"},"nullable":true}},"additionalProperties":false},"Jylo.Toolkit.Constants.FileType":{"enum":["unknown","image","video","text","audio","directory"],"type":"string"},"Jylo.Toolkit.Constants.UploadFailedReason":{"enum":["outOfMemory","unsupportedFileType","badFile","uploadFailure","ocrPageLimitExceeded","unknownException","insufficientCredits","maliciousFile","fileScanTimedOut"],"type":"string"},"Jylo.Toolkit.API.Models.OrganizationMemberModel":{"required":["id","name"],"type":"object","properties":{"email":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"id":{"type":"string","nullable":true}},"additionalProperties":false},"Jylo.Toolkit.API.Models.BreadcrumbModel":{"required":["name"],"type":"object","properties":{"objectIdentifier":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true},"isDirectory":{"type":"boolean"}},"additionalProperties":false},"Jylo.Toolkit.API.Models.Documents.DocumentMetadataReadModel":{"type":"object","properties":{"objectIdentifier":{"type":"string","format":"uuid"},"key":{"type":"string","nullable":true},"value":{"type":"string","nullable":true}},"additionalProperties":false},"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/projects/{projectIdentifier}/documents/empty":{"post":{"tags":["Documents"],"summary":"Create an empty document record.","description":"Creates an empty document record in the specified project.","parameters":[{"name":"projectIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.CreateEmptyDocumentModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.CreateEmptyDocumentModel"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.CreateEmptyDocumentModel"}}}},"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentReadModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentReadModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentReadModel"}}}},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## Upload a new assistant document.

> Uploads a new assistant document to the specified project.

```json
{"openapi":"3.0.4","info":{"title":"Project API","version":"v1"},"servers":[{"url":"https://api.{tenant}.{region}.jylo.ai","variables":{"tenant":{"default":"example","description":"Tenant name"},"region":{"default":"uk","description":"Region","enum":["uk","us","eu","au","jp"]}}}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Bearer authentication with JWT","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Jylo.Toolkit.Constants.DocumentUploadSource":{"enum":["local","iManage","sharePoint"],"type":"string"},"Jylo.Toolkit.Constants.OCREngine":{"enum":["azureDocumentIntelligence","aspose"],"type":"string"},"Jylo.Toolkit.Constants.OCRStrategy":{"enum":["never","detect","always"],"type":"string"},"Jylo.Toolkit.Constants.CoordinateExtractionStrategy":{"enum":["never","apryse","azureDocumentIntelligence","spreadsheet"],"type":"string"},"Jylo.Toolkit.API.Models.Documents.DocumentReadModel":{"required":["documentUploadObjectIdentifier","name"],"type":"object","properties":{"name":{"type":"string","nullable":true},"parentObjectIdentifier":{"type":"string","format":"uuid","nullable":true},"isDirectory":{"type":"boolean"},"documentUploadObjectIdentifier":{"type":"string","format":"uuid"},"contentType":{"type":"string","nullable":true},"size":{"type":"integer","format":"int64","nullable":true},"objectIdentifier":{"type":"string","format":"uuid"},"dateAdded":{"type":"string","format":"date-time"},"uploadSuccessful":{"type":"boolean","nullable":true},"tokenCount":{"type":"integer","format":"int64","nullable":true},"metadataTokenCount":{"type":"integer","format":"int64","nullable":true},"indexingNotPossible":{"type":"boolean","nullable":true},"unsupportedFileType":{"type":"boolean","nullable":true},"unPackingComplete":{"type":"boolean","nullable":true},"unPackingFailed":{"type":"boolean","nullable":true},"uploadInProgress":{"type":"boolean","nullable":true},"url":{"type":"string","nullable":true},"hasChildren":{"type":"boolean","nullable":true},"extension":{"type":"string","nullable":true},"convertedToPdf":{"type":"boolean"},"fileType":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.FileType"},"uploadFailedReason":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.UploadFailedReason"},"resourceOwner":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.OrganizationMemberModel"},"progress":{"type":"number","format":"double","nullable":true},"path":{"type":"string","nullable":true},"parent":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.BreadcrumbModel"},"ocrStrategy":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.OCRStrategy"},"ocrEngine":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.OCREngine"},"coordinateExtractionStrategy":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.CoordinateExtractionStrategy"},"documentUploadSource":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.DocumentUploadSource"},"pageCount":{"type":"integer","format":"int32","nullable":true},"metadata":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentMetadataReadModel"},"nullable":true}},"additionalProperties":false},"Jylo.Toolkit.Constants.FileType":{"enum":["unknown","image","video","text","audio","directory"],"type":"string"},"Jylo.Toolkit.Constants.UploadFailedReason":{"enum":["outOfMemory","unsupportedFileType","badFile","uploadFailure","ocrPageLimitExceeded","unknownException","insufficientCredits","maliciousFile","fileScanTimedOut"],"type":"string"},"Jylo.Toolkit.API.Models.OrganizationMemberModel":{"required":["id","name"],"type":"object","properties":{"email":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"id":{"type":"string","nullable":true}},"additionalProperties":false},"Jylo.Toolkit.API.Models.BreadcrumbModel":{"required":["name"],"type":"object","properties":{"objectIdentifier":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true},"isDirectory":{"type":"boolean"}},"additionalProperties":false},"Jylo.Toolkit.API.Models.Documents.DocumentMetadataReadModel":{"type":"object","properties":{"objectIdentifier":{"type":"string","format":"uuid"},"key":{"type":"string","nullable":true},"value":{"type":"string","nullable":true}},"additionalProperties":false},"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/projects/{projectIdentifier}/documents/assistant":{"post":{"tags":["Documents"],"summary":"Upload a new assistant document.","description":"Uploads a new assistant document to the specified project.","parameters":[{"name":"documentUploadIdentifier","in":"query","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"source","in":"query","schema":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.DocumentUploadSource"}},{"name":"projectIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"},"ocrEngine":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.OCREngine"},"ocrStrategy":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.OCRStrategy"},"coordinateExtractionStrategy":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.CoordinateExtractionStrategy"},"metadataJson":{"type":"string"}}},"encoding":{"file":{"style":"form"},"ocrEngine":{"style":"form"},"ocrStrategy":{"style":"form"},"coordinateExtractionStrategy":{"style":"form"},"metadataJson":{"style":"form"}}}}},"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentReadModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentReadModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentReadModel"}}}},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## Create an empty assistant document record.

> Creates an empty assistant document record in the specified project.

```json
{"openapi":"3.0.4","info":{"title":"Project API","version":"v1"},"servers":[{"url":"https://api.{tenant}.{region}.jylo.ai","variables":{"tenant":{"default":"example","description":"Tenant name"},"region":{"default":"uk","description":"Region","enum":["uk","us","eu","au","jp"]}}}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Bearer authentication with JWT","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Jylo.Toolkit.API.Models.Documents.CreateEmptyDocumentModel":{"required":["contentType","fileName","uploadSettings"],"type":"object","properties":{"metadataJson":{"type":"string","nullable":true},"uploadSettings":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.UploadSettingsModel"},"fileName":{"type":"string","nullable":true},"contentType":{"type":"string","nullable":true},"documentUploadIdentifier":{"type":"string","format":"uuid"},"source":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.DocumentUploadSource"},"parentObjectIdentifier":{"type":"string","format":"uuid","nullable":true}},"additionalProperties":false},"Jylo.Toolkit.API.Models.Documents.UploadSettingsModel":{"type":"object","properties":{"ocrEngine":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.OCREngine"},"ocrStrategy":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.OCRStrategy"},"coordinateExtractionStrategy":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.CoordinateExtractionStrategy"}},"additionalProperties":false},"Jylo.Toolkit.Constants.OCREngine":{"enum":["azureDocumentIntelligence","aspose"],"type":"string"},"Jylo.Toolkit.Constants.OCRStrategy":{"enum":["never","detect","always"],"type":"string"},"Jylo.Toolkit.Constants.CoordinateExtractionStrategy":{"enum":["never","apryse","azureDocumentIntelligence","spreadsheet"],"type":"string"},"Jylo.Toolkit.Constants.DocumentUploadSource":{"enum":["local","iManage","sharePoint"],"type":"string"},"Jylo.Toolkit.API.Models.Documents.DocumentReadModel":{"required":["documentUploadObjectIdentifier","name"],"type":"object","properties":{"name":{"type":"string","nullable":true},"parentObjectIdentifier":{"type":"string","format":"uuid","nullable":true},"isDirectory":{"type":"boolean"},"documentUploadObjectIdentifier":{"type":"string","format":"uuid"},"contentType":{"type":"string","nullable":true},"size":{"type":"integer","format":"int64","nullable":true},"objectIdentifier":{"type":"string","format":"uuid"},"dateAdded":{"type":"string","format":"date-time"},"uploadSuccessful":{"type":"boolean","nullable":true},"tokenCount":{"type":"integer","format":"int64","nullable":true},"metadataTokenCount":{"type":"integer","format":"int64","nullable":true},"indexingNotPossible":{"type":"boolean","nullable":true},"unsupportedFileType":{"type":"boolean","nullable":true},"unPackingComplete":{"type":"boolean","nullable":true},"unPackingFailed":{"type":"boolean","nullable":true},"uploadInProgress":{"type":"boolean","nullable":true},"url":{"type":"string","nullable":true},"hasChildren":{"type":"boolean","nullable":true},"extension":{"type":"string","nullable":true},"convertedToPdf":{"type":"boolean"},"fileType":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.FileType"},"uploadFailedReason":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.UploadFailedReason"},"resourceOwner":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.OrganizationMemberModel"},"progress":{"type":"number","format":"double","nullable":true},"path":{"type":"string","nullable":true},"parent":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.BreadcrumbModel"},"ocrStrategy":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.OCRStrategy"},"ocrEngine":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.OCREngine"},"coordinateExtractionStrategy":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.CoordinateExtractionStrategy"},"documentUploadSource":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.DocumentUploadSource"},"pageCount":{"type":"integer","format":"int32","nullable":true},"metadata":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentMetadataReadModel"},"nullable":true}},"additionalProperties":false},"Jylo.Toolkit.Constants.FileType":{"enum":["unknown","image","video","text","audio","directory"],"type":"string"},"Jylo.Toolkit.Constants.UploadFailedReason":{"enum":["outOfMemory","unsupportedFileType","badFile","uploadFailure","ocrPageLimitExceeded","unknownException","insufficientCredits","maliciousFile","fileScanTimedOut"],"type":"string"},"Jylo.Toolkit.API.Models.OrganizationMemberModel":{"required":["id","name"],"type":"object","properties":{"email":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"id":{"type":"string","nullable":true}},"additionalProperties":false},"Jylo.Toolkit.API.Models.BreadcrumbModel":{"required":["name"],"type":"object","properties":{"objectIdentifier":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true},"isDirectory":{"type":"boolean"}},"additionalProperties":false},"Jylo.Toolkit.API.Models.Documents.DocumentMetadataReadModel":{"type":"object","properties":{"objectIdentifier":{"type":"string","format":"uuid"},"key":{"type":"string","nullable":true},"value":{"type":"string","nullable":true}},"additionalProperties":false},"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/projects/{projectIdentifier}/documents/empty-assistant":{"post":{"tags":["Documents"],"summary":"Create an empty assistant document record.","description":"Creates an empty assistant document record in the specified project.","parameters":[{"name":"projectIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.CreateEmptyDocumentModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.CreateEmptyDocumentModel"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.CreateEmptyDocumentModel"}}}},"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentReadModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentReadModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentReadModel"}}}},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## Append a chunk to a document.

> Appends a chunk to a partially uploaded document.

```json
{"openapi":"3.0.4","info":{"title":"Project API","version":"v1"},"servers":[{"url":"https://api.{tenant}.{region}.jylo.ai","variables":{"tenant":{"default":"example","description":"Tenant name"},"region":{"default":"uk","description":"Region","enum":["uk","us","eu","au","jp"]}}}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Bearer authentication with JWT","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Jylo.Toolkit.API.Models.Documents.DocumentReadModel":{"required":["documentUploadObjectIdentifier","name"],"type":"object","properties":{"name":{"type":"string","nullable":true},"parentObjectIdentifier":{"type":"string","format":"uuid","nullable":true},"isDirectory":{"type":"boolean"},"documentUploadObjectIdentifier":{"type":"string","format":"uuid"},"contentType":{"type":"string","nullable":true},"size":{"type":"integer","format":"int64","nullable":true},"objectIdentifier":{"type":"string","format":"uuid"},"dateAdded":{"type":"string","format":"date-time"},"uploadSuccessful":{"type":"boolean","nullable":true},"tokenCount":{"type":"integer","format":"int64","nullable":true},"metadataTokenCount":{"type":"integer","format":"int64","nullable":true},"indexingNotPossible":{"type":"boolean","nullable":true},"unsupportedFileType":{"type":"boolean","nullable":true},"unPackingComplete":{"type":"boolean","nullable":true},"unPackingFailed":{"type":"boolean","nullable":true},"uploadInProgress":{"type":"boolean","nullable":true},"url":{"type":"string","nullable":true},"hasChildren":{"type":"boolean","nullable":true},"extension":{"type":"string","nullable":true},"convertedToPdf":{"type":"boolean"},"fileType":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.FileType"},"uploadFailedReason":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.UploadFailedReason"},"resourceOwner":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.OrganizationMemberModel"},"progress":{"type":"number","format":"double","nullable":true},"path":{"type":"string","nullable":true},"parent":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.BreadcrumbModel"},"ocrStrategy":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.OCRStrategy"},"ocrEngine":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.OCREngine"},"coordinateExtractionStrategy":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.CoordinateExtractionStrategy"},"documentUploadSource":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.DocumentUploadSource"},"pageCount":{"type":"integer","format":"int32","nullable":true},"metadata":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentMetadataReadModel"},"nullable":true}},"additionalProperties":false},"Jylo.Toolkit.Constants.FileType":{"enum":["unknown","image","video","text","audio","directory"],"type":"string"},"Jylo.Toolkit.Constants.UploadFailedReason":{"enum":["outOfMemory","unsupportedFileType","badFile","uploadFailure","ocrPageLimitExceeded","unknownException","insufficientCredits","maliciousFile","fileScanTimedOut"],"type":"string"},"Jylo.Toolkit.API.Models.OrganizationMemberModel":{"required":["id","name"],"type":"object","properties":{"email":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"id":{"type":"string","nullable":true}},"additionalProperties":false},"Jylo.Toolkit.API.Models.BreadcrumbModel":{"required":["name"],"type":"object","properties":{"objectIdentifier":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true},"isDirectory":{"type":"boolean"}},"additionalProperties":false},"Jylo.Toolkit.Constants.OCRStrategy":{"enum":["never","detect","always"],"type":"string"},"Jylo.Toolkit.Constants.OCREngine":{"enum":["azureDocumentIntelligence","aspose"],"type":"string"},"Jylo.Toolkit.Constants.CoordinateExtractionStrategy":{"enum":["never","apryse","azureDocumentIntelligence","spreadsheet"],"type":"string"},"Jylo.Toolkit.Constants.DocumentUploadSource":{"enum":["local","iManage","sharePoint"],"type":"string"},"Jylo.Toolkit.API.Models.Documents.DocumentMetadataReadModel":{"type":"object","properties":{"objectIdentifier":{"type":"string","format":"uuid"},"key":{"type":"string","nullable":true},"value":{"type":"string","nullable":true}},"additionalProperties":false},"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/projects/{projectIdentifier}/documents/{objectIdentifier}/append-chunk":{"post":{"tags":["Documents"],"summary":"Append a chunk to a document.","description":"Appends a chunk to a partially uploaded document.","parameters":[{"name":"objectIdentifier","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"chunkIndex","in":"query","schema":{"type":"integer","format":"int32"}},{"name":"lastChunk","in":"query","schema":{"type":"boolean","default":false}},{"name":"projectIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentReadModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentReadModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentReadModel"}}}},"204":{"description":"No Content"},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## Create a new folder.

> Creates a new folder in the specified project.

```json
{"openapi":"3.0.4","info":{"title":"Project API","version":"v1"},"servers":[{"url":"https://api.{tenant}.{region}.jylo.ai","variables":{"tenant":{"default":"example","description":"Tenant name"},"region":{"default":"uk","description":"Region","enum":["uk","us","eu","au","jp"]}}}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Bearer authentication with JWT","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Jylo.Toolkit.API.Models.FolderWriteModel":{"required":["name"],"type":"object","properties":{"name":{"type":"string","nullable":true},"parentObjectIdentifier":{"type":"string","format":"uuid","nullable":true},"documentUploadObjectIdentifier":{"type":"string","format":"uuid","nullable":true}},"additionalProperties":false},"Jylo.Toolkit.API.Models.FolderReadModel":{"required":["dateAdded","name","objectIdentifier"],"type":"object","properties":{"name":{"type":"string","nullable":true},"parentObjectIdentifier":{"type":"string","format":"uuid","nullable":true},"documentUploadObjectIdentifier":{"type":"string","format":"uuid","nullable":true},"dateAdded":{"type":"string","format":"date-time"},"objectIdentifier":{"type":"string","format":"uuid"}},"additionalProperties":false},"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/projects/{projectIdentifier}/documents/folder":{"post":{"tags":["Documents"],"summary":"Create a new folder.","description":"Creates a new folder in the specified project.","parameters":[{"name":"projectIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.FolderWriteModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.FolderWriteModel"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.FolderWriteModel"}}}},"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.FolderReadModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.FolderReadModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.FolderReadModel"}}}},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## Download a document file.

> Downloads a document file by its object identifier.

```json
{"openapi":"3.0.4","info":{"title":"Project API","version":"v1"},"servers":[{"url":"https://api.{tenant}.{region}.jylo.ai","variables":{"tenant":{"default":"example","description":"Tenant name"},"region":{"default":"uk","description":"Region","enum":["uk","us","eu","au","jp"]}}}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Bearer authentication with JWT","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/projects/{projectIdentifier}/documents/{objectIdentifier}/download":{"get":{"tags":["Documents"],"summary":"Download a document file.","description":"Downloads a document file by its object identifier.","parameters":[{"name":"objectIdentifier","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"usePdf","in":"query","schema":{"type":"boolean","default":true}},{"name":"projectIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"type":"string","format":"binary"}},"application/json":{"schema":{"type":"string","format":"binary"}},"text/json":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## Download a document file stream.

> Downloads a document file stream by its object identifier.

```json
{"openapi":"3.0.4","info":{"title":"Project API","version":"v1"},"servers":[{"url":"https://api.{tenant}.{region}.jylo.ai","variables":{"tenant":{"default":"example","description":"Tenant name"},"region":{"default":"uk","description":"Region","enum":["uk","us","eu","au","jp"]}}}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Bearer authentication with JWT","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/projects/{projectIdentifier}/documents/{objectIdentifier}/download-stream":{"get":{"tags":["Documents"],"summary":"Download a document file stream.","description":"Downloads a document file stream by its object identifier.","parameters":[{"name":"objectIdentifier","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"projectIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"type":"string","format":"binary"}},"application/json":{"schema":{"type":"string","format":"binary"}},"text/json":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## Download a document file stream.

> Downloads a document file stream by its object identifier.

```json
{"openapi":"3.0.4","info":{"title":"Project API","version":"v1"},"servers":[{"url":"https://api.{tenant}.{region}.jylo.ai","variables":{"tenant":{"default":"example","description":"Tenant name"},"region":{"default":"uk","description":"Region","enum":["uk","us","eu","au","jp"]}}}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Bearer authentication with JWT","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/projects/{projectIdentifier}/documents/{objectIdentifier}/download-stream":{"head":{"tags":["Documents"],"summary":"Download a document file stream.","description":"Downloads a document file stream by its object identifier.","parameters":[{"name":"objectIdentifier","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"projectIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"type":"string","format":"binary"}},"application/json":{"schema":{"type":"string","format":"binary"}},"text/json":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## Get a document by object identifier.

> Retrieves a document by its object identifier.

```json
{"openapi":"3.0.4","info":{"title":"Project API","version":"v1"},"servers":[{"url":"https://api.{tenant}.{region}.jylo.ai","variables":{"tenant":{"default":"example","description":"Tenant name"},"region":{"default":"uk","description":"Region","enum":["uk","us","eu","au","jp"]}}}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Bearer authentication with JWT","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Jylo.Toolkit.API.Models.Documents.DocumentReadModel":{"required":["documentUploadObjectIdentifier","name"],"type":"object","properties":{"name":{"type":"string","nullable":true},"parentObjectIdentifier":{"type":"string","format":"uuid","nullable":true},"isDirectory":{"type":"boolean"},"documentUploadObjectIdentifier":{"type":"string","format":"uuid"},"contentType":{"type":"string","nullable":true},"size":{"type":"integer","format":"int64","nullable":true},"objectIdentifier":{"type":"string","format":"uuid"},"dateAdded":{"type":"string","format":"date-time"},"uploadSuccessful":{"type":"boolean","nullable":true},"tokenCount":{"type":"integer","format":"int64","nullable":true},"metadataTokenCount":{"type":"integer","format":"int64","nullable":true},"indexingNotPossible":{"type":"boolean","nullable":true},"unsupportedFileType":{"type":"boolean","nullable":true},"unPackingComplete":{"type":"boolean","nullable":true},"unPackingFailed":{"type":"boolean","nullable":true},"uploadInProgress":{"type":"boolean","nullable":true},"url":{"type":"string","nullable":true},"hasChildren":{"type":"boolean","nullable":true},"extension":{"type":"string","nullable":true},"convertedToPdf":{"type":"boolean"},"fileType":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.FileType"},"uploadFailedReason":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.UploadFailedReason"},"resourceOwner":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.OrganizationMemberModel"},"progress":{"type":"number","format":"double","nullable":true},"path":{"type":"string","nullable":true},"parent":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.BreadcrumbModel"},"ocrStrategy":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.OCRStrategy"},"ocrEngine":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.OCREngine"},"coordinateExtractionStrategy":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.CoordinateExtractionStrategy"},"documentUploadSource":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.DocumentUploadSource"},"pageCount":{"type":"integer","format":"int32","nullable":true},"metadata":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentMetadataReadModel"},"nullable":true}},"additionalProperties":false},"Jylo.Toolkit.Constants.FileType":{"enum":["unknown","image","video","text","audio","directory"],"type":"string"},"Jylo.Toolkit.Constants.UploadFailedReason":{"enum":["outOfMemory","unsupportedFileType","badFile","uploadFailure","ocrPageLimitExceeded","unknownException","insufficientCredits","maliciousFile","fileScanTimedOut"],"type":"string"},"Jylo.Toolkit.API.Models.OrganizationMemberModel":{"required":["id","name"],"type":"object","properties":{"email":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"id":{"type":"string","nullable":true}},"additionalProperties":false},"Jylo.Toolkit.API.Models.BreadcrumbModel":{"required":["name"],"type":"object","properties":{"objectIdentifier":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true},"isDirectory":{"type":"boolean"}},"additionalProperties":false},"Jylo.Toolkit.Constants.OCRStrategy":{"enum":["never","detect","always"],"type":"string"},"Jylo.Toolkit.Constants.OCREngine":{"enum":["azureDocumentIntelligence","aspose"],"type":"string"},"Jylo.Toolkit.Constants.CoordinateExtractionStrategy":{"enum":["never","apryse","azureDocumentIntelligence","spreadsheet"],"type":"string"},"Jylo.Toolkit.Constants.DocumentUploadSource":{"enum":["local","iManage","sharePoint"],"type":"string"},"Jylo.Toolkit.API.Models.Documents.DocumentMetadataReadModel":{"type":"object","properties":{"objectIdentifier":{"type":"string","format":"uuid"},"key":{"type":"string","nullable":true},"value":{"type":"string","nullable":true}},"additionalProperties":false},"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/projects/{projectIdentifier}/documents/{objectIdentifier}":{"get":{"tags":["Documents"],"summary":"Get a document by object identifier.","description":"Retrieves a document by its object identifier.","parameters":[{"name":"objectIdentifier","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"projectIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentReadModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentReadModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentReadModel"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## Update a document by object identifier.

> Updates a document by its object identifier.

```json
{"openapi":"3.0.4","info":{"title":"Project API","version":"v1"},"servers":[{"url":"https://api.{tenant}.{region}.jylo.ai","variables":{"tenant":{"default":"example","description":"Tenant name"},"region":{"default":"uk","description":"Region","enum":["uk","us","eu","au","jp"]}}}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Bearer authentication with JWT","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Jylo.Toolkit.API.Models.Documents.DocumentUpdateModel":{"required":["name"],"type":"object","properties":{"name":{"type":"string","nullable":true},"parentObjectIdentifier":{"type":"string","format":"uuid","nullable":true}},"additionalProperties":false},"Jylo.Toolkit.API.Models.Documents.DocumentReadModel":{"required":["documentUploadObjectIdentifier","name"],"type":"object","properties":{"name":{"type":"string","nullable":true},"parentObjectIdentifier":{"type":"string","format":"uuid","nullable":true},"isDirectory":{"type":"boolean"},"documentUploadObjectIdentifier":{"type":"string","format":"uuid"},"contentType":{"type":"string","nullable":true},"size":{"type":"integer","format":"int64","nullable":true},"objectIdentifier":{"type":"string","format":"uuid"},"dateAdded":{"type":"string","format":"date-time"},"uploadSuccessful":{"type":"boolean","nullable":true},"tokenCount":{"type":"integer","format":"int64","nullable":true},"metadataTokenCount":{"type":"integer","format":"int64","nullable":true},"indexingNotPossible":{"type":"boolean","nullable":true},"unsupportedFileType":{"type":"boolean","nullable":true},"unPackingComplete":{"type":"boolean","nullable":true},"unPackingFailed":{"type":"boolean","nullable":true},"uploadInProgress":{"type":"boolean","nullable":true},"url":{"type":"string","nullable":true},"hasChildren":{"type":"boolean","nullable":true},"extension":{"type":"string","nullable":true},"convertedToPdf":{"type":"boolean"},"fileType":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.FileType"},"uploadFailedReason":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.UploadFailedReason"},"resourceOwner":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.OrganizationMemberModel"},"progress":{"type":"number","format":"double","nullable":true},"path":{"type":"string","nullable":true},"parent":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.BreadcrumbModel"},"ocrStrategy":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.OCRStrategy"},"ocrEngine":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.OCREngine"},"coordinateExtractionStrategy":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.CoordinateExtractionStrategy"},"documentUploadSource":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.DocumentUploadSource"},"pageCount":{"type":"integer","format":"int32","nullable":true},"metadata":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentMetadataReadModel"},"nullable":true}},"additionalProperties":false},"Jylo.Toolkit.Constants.FileType":{"enum":["unknown","image","video","text","audio","directory"],"type":"string"},"Jylo.Toolkit.Constants.UploadFailedReason":{"enum":["outOfMemory","unsupportedFileType","badFile","uploadFailure","ocrPageLimitExceeded","unknownException","insufficientCredits","maliciousFile","fileScanTimedOut"],"type":"string"},"Jylo.Toolkit.API.Models.OrganizationMemberModel":{"required":["id","name"],"type":"object","properties":{"email":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"id":{"type":"string","nullable":true}},"additionalProperties":false},"Jylo.Toolkit.API.Models.BreadcrumbModel":{"required":["name"],"type":"object","properties":{"objectIdentifier":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true},"isDirectory":{"type":"boolean"}},"additionalProperties":false},"Jylo.Toolkit.Constants.OCRStrategy":{"enum":["never","detect","always"],"type":"string"},"Jylo.Toolkit.Constants.OCREngine":{"enum":["azureDocumentIntelligence","aspose"],"type":"string"},"Jylo.Toolkit.Constants.CoordinateExtractionStrategy":{"enum":["never","apryse","azureDocumentIntelligence","spreadsheet"],"type":"string"},"Jylo.Toolkit.Constants.DocumentUploadSource":{"enum":["local","iManage","sharePoint"],"type":"string"},"Jylo.Toolkit.API.Models.Documents.DocumentMetadataReadModel":{"type":"object","properties":{"objectIdentifier":{"type":"string","format":"uuid"},"key":{"type":"string","nullable":true},"value":{"type":"string","nullable":true}},"additionalProperties":false},"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/projects/{projectIdentifier}/documents/{objectIdentifier}":{"put":{"tags":["Documents"],"summary":"Update a document by object identifier.","description":"Updates a document by its object identifier.","parameters":[{"name":"objectIdentifier","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"projectIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentUpdateModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentUpdateModel"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentUpdateModel"}}}},"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentReadModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentReadModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentReadModel"}}}},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## Delete a document by object identifier.

> Deletes a document by its object identifier.

```json
{"openapi":"3.0.4","info":{"title":"Project API","version":"v1"},"servers":[{"url":"https://api.{tenant}.{region}.jylo.ai","variables":{"tenant":{"default":"example","description":"Tenant name"},"region":{"default":"uk","description":"Region","enum":["uk","us","eu","au","jp"]}}}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Bearer authentication with JWT","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/projects/{projectIdentifier}/documents/{objectIdentifier}":{"delete":{"tags":["Documents"],"summary":"Delete a document by object identifier.","description":"Deletes a document by its object identifier.","parameters":[{"name":"objectIdentifier","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"projectIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## Update a folder by object identifier.

> Updates a folder by its object identifier.

```json
{"openapi":"3.0.4","info":{"title":"Project API","version":"v1"},"servers":[{"url":"https://api.{tenant}.{region}.jylo.ai","variables":{"tenant":{"default":"example","description":"Tenant name"},"region":{"default":"uk","description":"Region","enum":["uk","us","eu","au","jp"]}}}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Bearer authentication with JWT","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Jylo.Toolkit.API.Models.FolderWriteModel":{"required":["name"],"type":"object","properties":{"name":{"type":"string","nullable":true},"parentObjectIdentifier":{"type":"string","format":"uuid","nullable":true},"documentUploadObjectIdentifier":{"type":"string","format":"uuid","nullable":true}},"additionalProperties":false},"Jylo.Toolkit.API.Models.FolderReadModel":{"required":["dateAdded","name","objectIdentifier"],"type":"object","properties":{"name":{"type":"string","nullable":true},"parentObjectIdentifier":{"type":"string","format":"uuid","nullable":true},"documentUploadObjectIdentifier":{"type":"string","format":"uuid","nullable":true},"dateAdded":{"type":"string","format":"date-time"},"objectIdentifier":{"type":"string","format":"uuid"}},"additionalProperties":false},"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/projects/{projectIdentifier}/documents/folder/{objectIdentifier}":{"put":{"tags":["Documents"],"summary":"Update a folder by object identifier.","description":"Updates a folder by its object identifier.","parameters":[{"name":"objectIdentifier","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"projectIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.FolderWriteModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.FolderWriteModel"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.FolderWriteModel"}}}},"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.FolderReadModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.FolderReadModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.FolderReadModel"}}}},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## Get all child documents of specified documents/folders.

> Returns a collection of documents which are descendents of given objectIdentifiers

```json
{"openapi":"3.0.4","info":{"title":"Project API","version":"v1"},"servers":[{"url":"https://api.{tenant}.{region}.jylo.ai","variables":{"tenant":{"default":"example","description":"Tenant name"},"region":{"default":"uk","description":"Region","enum":["uk","us","eu","au","jp"]}}}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Bearer authentication with JWT","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Jylo.Toolkit.API.Models.Documents.DocumentIdsQueryModel":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","format":"uuid"},"nullable":true}},"additionalProperties":false},"Jylo.Toolkit.API.Models.Documents.DocumentReadModel":{"required":["documentUploadObjectIdentifier","name"],"type":"object","properties":{"name":{"type":"string","nullable":true},"parentObjectIdentifier":{"type":"string","format":"uuid","nullable":true},"isDirectory":{"type":"boolean"},"documentUploadObjectIdentifier":{"type":"string","format":"uuid"},"contentType":{"type":"string","nullable":true},"size":{"type":"integer","format":"int64","nullable":true},"objectIdentifier":{"type":"string","format":"uuid"},"dateAdded":{"type":"string","format":"date-time"},"uploadSuccessful":{"type":"boolean","nullable":true},"tokenCount":{"type":"integer","format":"int64","nullable":true},"metadataTokenCount":{"type":"integer","format":"int64","nullable":true},"indexingNotPossible":{"type":"boolean","nullable":true},"unsupportedFileType":{"type":"boolean","nullable":true},"unPackingComplete":{"type":"boolean","nullable":true},"unPackingFailed":{"type":"boolean","nullable":true},"uploadInProgress":{"type":"boolean","nullable":true},"url":{"type":"string","nullable":true},"hasChildren":{"type":"boolean","nullable":true},"extension":{"type":"string","nullable":true},"convertedToPdf":{"type":"boolean"},"fileType":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.FileType"},"uploadFailedReason":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.UploadFailedReason"},"resourceOwner":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.OrganizationMemberModel"},"progress":{"type":"number","format":"double","nullable":true},"path":{"type":"string","nullable":true},"parent":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.BreadcrumbModel"},"ocrStrategy":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.OCRStrategy"},"ocrEngine":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.OCREngine"},"coordinateExtractionStrategy":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.CoordinateExtractionStrategy"},"documentUploadSource":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.DocumentUploadSource"},"pageCount":{"type":"integer","format":"int32","nullable":true},"metadata":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentMetadataReadModel"},"nullable":true}},"additionalProperties":false},"Jylo.Toolkit.Constants.FileType":{"enum":["unknown","image","video","text","audio","directory"],"type":"string"},"Jylo.Toolkit.Constants.UploadFailedReason":{"enum":["outOfMemory","unsupportedFileType","badFile","uploadFailure","ocrPageLimitExceeded","unknownException","insufficientCredits","maliciousFile","fileScanTimedOut"],"type":"string"},"Jylo.Toolkit.API.Models.OrganizationMemberModel":{"required":["id","name"],"type":"object","properties":{"email":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"id":{"type":"string","nullable":true}},"additionalProperties":false},"Jylo.Toolkit.API.Models.BreadcrumbModel":{"required":["name"],"type":"object","properties":{"objectIdentifier":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true},"isDirectory":{"type":"boolean"}},"additionalProperties":false},"Jylo.Toolkit.Constants.OCRStrategy":{"enum":["never","detect","always"],"type":"string"},"Jylo.Toolkit.Constants.OCREngine":{"enum":["azureDocumentIntelligence","aspose"],"type":"string"},"Jylo.Toolkit.Constants.CoordinateExtractionStrategy":{"enum":["never","apryse","azureDocumentIntelligence","spreadsheet"],"type":"string"},"Jylo.Toolkit.Constants.DocumentUploadSource":{"enum":["local","iManage","sharePoint"],"type":"string"},"Jylo.Toolkit.API.Models.Documents.DocumentMetadataReadModel":{"type":"object","properties":{"objectIdentifier":{"type":"string","format":"uuid"},"key":{"type":"string","nullable":true},"value":{"type":"string","nullable":true}},"additionalProperties":false},"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/projects/{projectIdentifier}/documents/query-all-children":{"post":{"tags":["Documents"],"summary":"Get all child documents of specified documents/folders.","description":"Returns a collection of documents which are descendents of given objectIdentifiers","parameters":[{"name":"projectIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentIdsQueryModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentIdsQueryModel"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentIdsQueryModel"}}}},"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentReadModel"}}},"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentReadModel"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentReadModel"}}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## Create a new document comparison file.

> Creates a new document comparison file and returns the read model

```json
{"openapi":"3.0.4","info":{"title":"Project API","version":"v1"},"servers":[{"url":"https://api.{tenant}.{region}.jylo.ai","variables":{"tenant":{"default":"example","description":"Tenant name"},"region":{"default":"uk","description":"Region","enum":["uk","us","eu","au","jp"]}}}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Bearer authentication with JWT","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Jylo.Toolkit.API.Models.Documents.DocumentIdsQueryModel":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","format":"uuid"},"nullable":true}},"additionalProperties":false},"Jylo.Projects.Models.Chat.AssistantDocumentComparisonResponse":{"type":"object","properties":{"document":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentReadModel"},"documentMetadata":{"$ref":"#/components/schemas/Jylo.Toolkit.Entities.DocumentEntities.DocumentMetadataProperties"}},"additionalProperties":false},"Jylo.Toolkit.API.Models.Documents.DocumentReadModel":{"required":["documentUploadObjectIdentifier","name"],"type":"object","properties":{"name":{"type":"string","nullable":true},"parentObjectIdentifier":{"type":"string","format":"uuid","nullable":true},"isDirectory":{"type":"boolean"},"documentUploadObjectIdentifier":{"type":"string","format":"uuid"},"contentType":{"type":"string","nullable":true},"size":{"type":"integer","format":"int64","nullable":true},"objectIdentifier":{"type":"string","format":"uuid"},"dateAdded":{"type":"string","format":"date-time"},"uploadSuccessful":{"type":"boolean","nullable":true},"tokenCount":{"type":"integer","format":"int64","nullable":true},"metadataTokenCount":{"type":"integer","format":"int64","nullable":true},"indexingNotPossible":{"type":"boolean","nullable":true},"unsupportedFileType":{"type":"boolean","nullable":true},"unPackingComplete":{"type":"boolean","nullable":true},"unPackingFailed":{"type":"boolean","nullable":true},"uploadInProgress":{"type":"boolean","nullable":true},"url":{"type":"string","nullable":true},"hasChildren":{"type":"boolean","nullable":true},"extension":{"type":"string","nullable":true},"convertedToPdf":{"type":"boolean"},"fileType":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.FileType"},"uploadFailedReason":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.UploadFailedReason"},"resourceOwner":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.OrganizationMemberModel"},"progress":{"type":"number","format":"double","nullable":true},"path":{"type":"string","nullable":true},"parent":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.BreadcrumbModel"},"ocrStrategy":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.OCRStrategy"},"ocrEngine":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.OCREngine"},"coordinateExtractionStrategy":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.CoordinateExtractionStrategy"},"documentUploadSource":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.DocumentUploadSource"},"pageCount":{"type":"integer","format":"int32","nullable":true},"metadata":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentMetadataReadModel"},"nullable":true}},"additionalProperties":false},"Jylo.Toolkit.Constants.FileType":{"enum":["unknown","image","video","text","audio","directory"],"type":"string"},"Jylo.Toolkit.Constants.UploadFailedReason":{"enum":["outOfMemory","unsupportedFileType","badFile","uploadFailure","ocrPageLimitExceeded","unknownException","insufficientCredits","maliciousFile","fileScanTimedOut"],"type":"string"},"Jylo.Toolkit.API.Models.OrganizationMemberModel":{"required":["id","name"],"type":"object","properties":{"email":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"id":{"type":"string","nullable":true}},"additionalProperties":false},"Jylo.Toolkit.API.Models.BreadcrumbModel":{"required":["name"],"type":"object","properties":{"objectIdentifier":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true},"isDirectory":{"type":"boolean"}},"additionalProperties":false},"Jylo.Toolkit.Constants.OCRStrategy":{"enum":["never","detect","always"],"type":"string"},"Jylo.Toolkit.Constants.OCREngine":{"enum":["azureDocumentIntelligence","aspose"],"type":"string"},"Jylo.Toolkit.Constants.CoordinateExtractionStrategy":{"enum":["never","apryse","azureDocumentIntelligence","spreadsheet"],"type":"string"},"Jylo.Toolkit.Constants.DocumentUploadSource":{"enum":["local","iManage","sharePoint"],"type":"string"},"Jylo.Toolkit.API.Models.Documents.DocumentMetadataReadModel":{"type":"object","properties":{"objectIdentifier":{"type":"string","format":"uuid"},"key":{"type":"string","nullable":true},"value":{"type":"string","nullable":true}},"additionalProperties":false},"Jylo.Toolkit.Entities.DocumentEntities.DocumentMetadataProperties":{"type":"object","properties":{"paragraphs":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.Entities.DocumentEntities.Paragraph"},"nullable":true},"documentObjectIdentifier":{"type":"string","format":"uuid"},"documentType":{"$ref":"#/components/schemas/Jylo.Toolkit.Entities.DocumentEntities.EDocumentType"},"comparedDocumentObjectIdentifiers":{"type":"array","items":{"type":"string","format":"uuid"},"nullable":true}},"additionalProperties":false},"Jylo.Toolkit.Entities.DocumentEntities.Paragraph":{"required":["boundingRegions","content","objectIdentifier"],"type":"object","properties":{"objectIdentifier":{"type":"string","format":"uuid"},"content":{"type":"string","nullable":true},"boundingRegions":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.Entities.DocumentEntities.Bounding"},"nullable":true},"role":{"$ref":"#/components/schemas/Jylo.Toolkit.Entities.DocumentEntities.Role"}},"additionalProperties":false},"Jylo.Toolkit.Entities.DocumentEntities.Bounding":{"required":["points"],"type":"object","properties":{"points":{"type":"array","items":{"type":"number","format":"float"},"nullable":true},"page":{"type":"integer","format":"int32"}},"additionalProperties":false},"Jylo.Toolkit.Entities.DocumentEntities.Role":{"enum":["title","sectionHeading","pageHeader","pageFooter","pageNumber"],"type":"string"},"Jylo.Toolkit.Entities.DocumentEntities.EDocumentType":{"enum":["standard","comparison"],"type":"string"},"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/projects/{projectIdentifier}/documents/compare-documents":{"post":{"tags":["Documents"],"summary":"Create a new document comparison file.","description":"Creates a new document comparison file and returns the read model","parameters":[{"name":"projectIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentIdsQueryModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentIdsQueryModel"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentIdsQueryModel"}}}},"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Jylo.Projects.Models.Chat.AssistantDocumentComparisonResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Projects.Models.Chat.AssistantDocumentComparisonResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Projects.Models.Chat.AssistantDocumentComparisonResponse"}}}},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## Get all folders for a project.

> Retrieves a paginated list of folders for the specified project with indication of subfolders.

```json
{"openapi":"3.0.4","info":{"title":"Project API","version":"v1"},"servers":[{"url":"https://api.{tenant}.{region}.jylo.ai","variables":{"tenant":{"default":"example","description":"Tenant name"},"region":{"default":"uk","description":"Region","enum":["uk","us","eu","au","jp"]}}}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Bearer authentication with JWT","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Jylo.Toolkit.Sorting.ItemSorting":{"enum":["dateAdded","name","description","isDirectory","playbookName","projectName","extension","size","pageCount","isAdminACL","documentsCount","totalFileSizeBytes","promptCount","estimatedTokenCount","latestMessageDate","flowsCount","orgWide","flowCredits","assistantsCount","assistantCredits","pages","fileCreditsCost","ocrCreditsCost","layoutCreditsCost","totalCredits","loginsCount","lastLoginDate","playbookDescription"],"type":"string"},"PaginationListModel.DocumentReadModel":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentReadModel"},"nullable":true},"totalCount":{"type":"integer","format":"int32"}},"additionalProperties":false},"Jylo.Toolkit.API.Models.Documents.DocumentReadModel":{"required":["documentUploadObjectIdentifier","name"],"type":"object","properties":{"name":{"type":"string","nullable":true},"parentObjectIdentifier":{"type":"string","format":"uuid","nullable":true},"isDirectory":{"type":"boolean"},"documentUploadObjectIdentifier":{"type":"string","format":"uuid"},"contentType":{"type":"string","nullable":true},"size":{"type":"integer","format":"int64","nullable":true},"objectIdentifier":{"type":"string","format":"uuid"},"dateAdded":{"type":"string","format":"date-time"},"uploadSuccessful":{"type":"boolean","nullable":true},"tokenCount":{"type":"integer","format":"int64","nullable":true},"metadataTokenCount":{"type":"integer","format":"int64","nullable":true},"indexingNotPossible":{"type":"boolean","nullable":true},"unsupportedFileType":{"type":"boolean","nullable":true},"unPackingComplete":{"type":"boolean","nullable":true},"unPackingFailed":{"type":"boolean","nullable":true},"uploadInProgress":{"type":"boolean","nullable":true},"url":{"type":"string","nullable":true},"hasChildren":{"type":"boolean","nullable":true},"extension":{"type":"string","nullable":true},"convertedToPdf":{"type":"boolean"},"fileType":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.FileType"},"uploadFailedReason":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.UploadFailedReason"},"resourceOwner":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.OrganizationMemberModel"},"progress":{"type":"number","format":"double","nullable":true},"path":{"type":"string","nullable":true},"parent":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.BreadcrumbModel"},"ocrStrategy":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.OCRStrategy"},"ocrEngine":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.OCREngine"},"coordinateExtractionStrategy":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.CoordinateExtractionStrategy"},"documentUploadSource":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.DocumentUploadSource"},"pageCount":{"type":"integer","format":"int32","nullable":true},"metadata":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.DocumentMetadataReadModel"},"nullable":true}},"additionalProperties":false},"Jylo.Toolkit.Constants.FileType":{"enum":["unknown","image","video","text","audio","directory"],"type":"string"},"Jylo.Toolkit.Constants.UploadFailedReason":{"enum":["outOfMemory","unsupportedFileType","badFile","uploadFailure","ocrPageLimitExceeded","unknownException","insufficientCredits","maliciousFile","fileScanTimedOut"],"type":"string"},"Jylo.Toolkit.API.Models.OrganizationMemberModel":{"required":["id","name"],"type":"object","properties":{"email":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"id":{"type":"string","nullable":true}},"additionalProperties":false},"Jylo.Toolkit.API.Models.BreadcrumbModel":{"required":["name"],"type":"object","properties":{"objectIdentifier":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true},"isDirectory":{"type":"boolean"}},"additionalProperties":false},"Jylo.Toolkit.Constants.OCRStrategy":{"enum":["never","detect","always"],"type":"string"},"Jylo.Toolkit.Constants.OCREngine":{"enum":["azureDocumentIntelligence","aspose"],"type":"string"},"Jylo.Toolkit.Constants.CoordinateExtractionStrategy":{"enum":["never","apryse","azureDocumentIntelligence","spreadsheet"],"type":"string"},"Jylo.Toolkit.Constants.DocumentUploadSource":{"enum":["local","iManage","sharePoint"],"type":"string"},"Jylo.Toolkit.API.Models.Documents.DocumentMetadataReadModel":{"type":"object","properties":{"objectIdentifier":{"type":"string","format":"uuid"},"key":{"type":"string","nullable":true},"value":{"type":"string","nullable":true}},"additionalProperties":false},"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/projects/{projectIdentifier}/documents/folders":{"get":{"tags":["Documents"],"summary":"Get all folders for a project.","description":"Retrieves a paginated list of folders for the specified project with indication of subfolders.","parameters":[{"name":"pageNumber","in":"query","schema":{"type":"integer","format":"int32","default":1}},{"name":"pageSize","in":"query","schema":{"type":"integer","format":"int32"}},{"name":"parentObjectIdentifier","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"searchText","in":"query","schema":{"type":"string"}},{"name":"sorting","in":"query","schema":{"$ref":"#/components/schemas/Jylo.Toolkit.Sorting.ItemSorting"}},{"name":"desc","in":"query","schema":{"type":"boolean","default":true}},{"name":"projectIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/PaginationListModel.DocumentReadModel"}},"application/json":{"schema":{"$ref":"#/components/schemas/PaginationListModel.DocumentReadModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/PaginationListModel.DocumentReadModel"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## Get breadcrumbs for a document.

> Retrieves the breadcrumb trail for a document from root to the specified document.

```json
{"openapi":"3.0.4","info":{"title":"Project API","version":"v1"},"servers":[{"url":"https://api.{tenant}.{region}.jylo.ai","variables":{"tenant":{"default":"example","description":"Tenant name"},"region":{"default":"uk","description":"Region","enum":["uk","us","eu","au","jp"]}}}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Bearer authentication with JWT","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Jylo.Toolkit.API.Models.BreadcrumbModel":{"required":["name"],"type":"object","properties":{"objectIdentifier":{"type":"string","format":"uuid"},"name":{"type":"string","nullable":true},"isDirectory":{"type":"boolean"}},"additionalProperties":false},"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/projects/{projectIdentifier}/documents/{objectIdentifier}/breadcrumbs":{"get":{"tags":["Documents"],"summary":"Get breadcrumbs for a document.","description":"Retrieves the breadcrumb trail for a document from root to the specified document.","parameters":[{"name":"objectIdentifier","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"projectIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.BreadcrumbModel"}}},"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.BreadcrumbModel"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.BreadcrumbModel"}}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## Re-trigger document processing for a document

> Re-trigger document processing for a specific document

```json
{"openapi":"3.0.4","info":{"title":"Project API","version":"v1"},"servers":[{"url":"https://api.{tenant}.{region}.jylo.ai","variables":{"tenant":{"default":"example","description":"Tenant name"},"region":{"default":"uk","description":"Region","enum":["uk","us","eu","au","jp"]}}}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Bearer authentication with JWT","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Jylo.Toolkit.API.Models.Documents.UploadSettingsModel":{"type":"object","properties":{"ocrEngine":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.OCREngine"},"ocrStrategy":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.OCRStrategy"},"coordinateExtractionStrategy":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.CoordinateExtractionStrategy"}},"additionalProperties":false},"Jylo.Toolkit.Constants.OCREngine":{"enum":["azureDocumentIntelligence","aspose"],"type":"string"},"Jylo.Toolkit.Constants.OCRStrategy":{"enum":["never","detect","always"],"type":"string"},"Jylo.Toolkit.Constants.CoordinateExtractionStrategy":{"enum":["never","apryse","azureDocumentIntelligence","spreadsheet"],"type":"string"},"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/projects/{projectIdentifier}/documents/{objectIdentifier}/re-index":{"post":{"tags":["Documents"],"summary":"Re-trigger document processing for a document","description":"Re-trigger document processing for a specific document","parameters":[{"name":"objectIdentifier","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"projectIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.UploadSettingsModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.UploadSettingsModel"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.UploadSettingsModel"}}}},"responses":{"202":{"description":"Accepted"},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## Retry failed documents in an upload

> Re-triggers document processing for every failed document in the specified upload session.

```json
{"openapi":"3.0.4","info":{"title":"Project API","version":"v1"},"servers":[{"url":"https://api.{tenant}.{region}.jylo.ai","variables":{"tenant":{"default":"example","description":"Tenant name"},"region":{"default":"uk","description":"Region","enum":["uk","us","eu","au","jp"]}}}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Bearer authentication with JWT","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Jylo.Toolkit.API.Models.Documents.UploadSettingsModel":{"type":"object","properties":{"ocrEngine":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.OCREngine"},"ocrStrategy":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.OCRStrategy"},"coordinateExtractionStrategy":{"$ref":"#/components/schemas/Jylo.Toolkit.Constants.CoordinateExtractionStrategy"}},"additionalProperties":false},"Jylo.Toolkit.Constants.OCREngine":{"enum":["azureDocumentIntelligence","aspose"],"type":"string"},"Jylo.Toolkit.Constants.OCRStrategy":{"enum":["never","detect","always"],"type":"string"},"Jylo.Toolkit.Constants.CoordinateExtractionStrategy":{"enum":["never","apryse","azureDocumentIntelligence","spreadsheet"],"type":"string"},"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/projects/{projectIdentifier}/documents/retry-failed-upload":{"post":{"tags":["Documents"],"summary":"Retry failed documents in an upload","description":"Re-triggers document processing for every failed document in the specified upload session.","parameters":[{"name":"documentUploadObjectIdentifier","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"projectIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.UploadSettingsModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.UploadSettingsModel"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.UploadSettingsModel"}}}},"responses":{"202":{"description":"Accepted"},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```

## Bulk move documents within a project

> Updates the parent folder for a list of documents

```json
{"openapi":"3.0.4","info":{"title":"Project API","version":"v1"},"servers":[{"url":"https://api.{tenant}.{region}.jylo.ai","variables":{"tenant":{"default":"example","description":"Tenant name"},"region":{"default":"uk","description":"Region","enum":["uk","us","eu","au","jp"]}}}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"Bearer authentication with JWT","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Jylo.Toolkit.API.Models.Documents.MoveDocumentsRequestModel":{"type":"object","properties":{"newParentObjectIdentifier":{"type":"string","format":"uuid","nullable":true},"objectIdentifiersToMove":{"type":"array","items":{"type":"string","format":"uuid"},"nullable":true}},"additionalProperties":false},"Microsoft.AspNetCore.Mvc.ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}},"paths":{"/projects/{projectIdentifier}/documents/bulk-move":{"post":{"tags":["Documents"],"summary":"Bulk move documents within a project","description":"Updates the parent folder for a list of documents","parameters":[{"name":"projectIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.MoveDocumentsRequestModel"}},"text/json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.MoveDocumentsRequestModel"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.Documents.MoveDocumentsRequestModel"}}}},"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developer.jylo.ai/api-reference/projects/documents.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
