# Documents

## Retrieves a paginated list of documents for the specified 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.Sorting.ItemSorting":{"enum":[0],"type":"integer","format":"int32"},"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},"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},"resourceOwner":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.OrganizationMemberModel"}},"additionalProperties":false},"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},"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":"Retrieves a paginated list of documents for the specified project.","description":"Retrieves a paginated list of documents for the specified project, optionally filtered and sorted.","parameters":[{"name":"pageNumber","in":"query","description":"The page number to retrieve.","schema":{"type":"integer","format":"int32"}},{"name":"parentObjectIdentifier","in":"query","description":"The parent folder's object identifier (optional).","schema":{"type":"string","format":"uuid"}},{"name":"flattenList","in":"query","description":"Whether to flatten the folder structure.","schema":{"type":"boolean"}},{"name":"pageSize","in":"query","description":"The number of items per page.","schema":{"type":"integer","format":"int32"}},{"name":"searchText","in":"query","description":"Optional search text to filter documents.","schema":{"type":"string"}},{"name":"sorting","in":"query","description":"The sorting option for the results.","schema":{"$ref":"#/components/schemas/Jylo.Toolkit.Sorting.ItemSorting"}},{"name":"desc","in":"query","description":"Whether to sort in descending order.","schema":{"type":"boolean","default":true}},{"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.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"}}}}},"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"}}}}}}}}}
```

## Uploads a new document to the specified project.

> 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.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},"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},"resourceOwner":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.OrganizationMemberModel"}},"additionalProperties":false},"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},"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":"Uploads a new document to the specified project.","description":"Uploads a new document to the specified project.","parameters":[{"name":"parentObjectIdentifier","in":"query","description":"The parent folder's object identifier (optional).","schema":{"type":"string","format":"uuid"}},{"name":"documentUploadIdentifier","in":"query","description":"The unique identifier for the document upload session.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"projectIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","description":"The file to upload.","format":"binary"}}},"encoding":{"file":{"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"}}}},"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"}}}}}}}}}
```

## Creates an empty document record in the specified project.

> 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.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},"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},"resourceOwner":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.OrganizationMemberModel"}},"additionalProperties":false},"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},"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":"Creates an empty document record in the specified project.","description":"Creates an empty document record in the specified project.","parameters":[{"name":"parentObjectIdentifier","in":"query","description":"The parent folder's object identifier (optional).","schema":{"type":"string","format":"uuid"}},{"name":"fileName","in":"query","description":"The name of the file.","required":true,"schema":{"type":"string"}},{"name":"contentType","in":"query","description":"The content type of the file.","required":true,"schema":{"type":"string"}},{"name":"documentUploadIdentifier","in":"query","description":"The unique identifier for the document upload session.","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"}}}},"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"}}}},"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"}}}}}}}}}
```

## Appends a chunk to a partially uploaded 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},"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},"resourceOwner":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.OrganizationMemberModel"}},"additionalProperties":false},"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},"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":"Appends a chunk to a partially uploaded document.","description":"Appends a chunk to a partially uploaded document.","parameters":[{"name":"objectIdentifier","in":"path","description":"The unique identifier of the document.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"chunkIndex","in":"query","description":"The index of the chunk.","schema":{"type":"integer","format":"int32"}},{"name":"lastChunk","in":"query","description":"Whether this is the last chunk.","schema":{"type":"boolean","default":false}},{"name":"projectIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","description":"The file chunk to append.","format":"binary"}}},"encoding":{"file":{"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"}}}},"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"}}}}}}}}}
```

## Creates a new folder in the specified project.

> 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}},"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},"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},"resourceOwner":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.OrganizationMemberModel"}},"additionalProperties":false},"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},"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":"Creates a new folder in the specified project.","description":"Creates a new folder in the specified project.","parameters":[{"name":"projectIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The folder data to create.","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.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"}}}},"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"}}}}}}}}}
```

## Downloads a document file by its object identifier.

> 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":"Downloads a document file by its object identifier.","description":"Downloads a document file by its object identifier.","parameters":[{"name":"objectIdentifier","in":"path","description":"The unique identifier of the document.","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"}}}},"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"}}}}}}}}}
```

## Downloads a document file stream by its object identifier.

> 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":"Downloads a document file stream by its object identifier.","description":"Downloads a document file stream by its object identifier.","parameters":[{"name":"objectIdentifier","in":"path","description":"The unique identifier of the document.","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"}}}},"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"}}}}}}}}}
```

## Downloads a document file stream by its object identifier.

> 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":"Downloads a document file stream by its object identifier.","description":"Downloads a document file stream by its object identifier.","parameters":[{"name":"objectIdentifier","in":"path","description":"The unique identifier of the document.","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"}}}},"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"}}}}}}}}}
```

## Retrieves a document by its 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},"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},"resourceOwner":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.OrganizationMemberModel"}},"additionalProperties":false},"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},"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":"Retrieves a document by its object identifier.","description":"Retrieves a document by its object identifier.","parameters":[{"name":"objectIdentifier","in":"path","description":"The unique identifier of the document.","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"}}}},"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"}}}}}}}}}
```

## Updates a document by its 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},"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},"resourceOwner":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.OrganizationMemberModel"}},"additionalProperties":false},"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},"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":"Updates a document by its object identifier.","description":"Updates a document by its object identifier.","parameters":[{"name":"objectIdentifier","in":"path","description":"The unique identifier of the document to update.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"projectIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The updated document data.","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"}}}},"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"}}}}}}}}}
```

## Deletes a document by its 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":"Deletes a document by its object identifier.","description":"Deletes a document by its object identifier.","parameters":[{"name":"objectIdentifier","in":"path","description":"The unique identifier of the document to delete.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"projectIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"},"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"}}}}}}}}}
```

## Updates a folder by its 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}},"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},"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},"resourceOwner":{"$ref":"#/components/schemas/Jylo.Toolkit.API.Models.OrganizationMemberModel"}},"additionalProperties":false},"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},"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":"Updates a folder by its object identifier.","description":"Updates a folder by its object identifier.","parameters":[{"name":"objectIdentifier","in":"path","description":"The unique identifier of the folder to update.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"projectIdentifier","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The updated folder data.","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.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"}}}},"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"}}}}}}}}}
```
